In the default glass gray template of TomatoCart, it is necessary to click the popup cart to show it. And the popup cart can’t be closed automatically when the customer’s mouse leave out it. So, I have improved the popup cart feature as follows:
- When the customer put the mouse on the popup cart, the popup cart will be displayed automatically.
- When the customer put the mouse on the popup cart, the cart contents will not be closed automatically unless the customer’s mouse leave from it.
- If the mouse leave out from the popup cart, it will be closed immediately. If the customer do the other actions, it will be closed automatically after 3 seconds.
How to install it?
- Please download the popupcart.zip from TomatoCart extension manager.
- Please unzip the popupcart.zip and then copy the ‘includes’ directory into the TomatoCart root directory on your web server. Please just override it. It will not impact your system because it just update the script which is responsible for the popup cart effect.
How to adjust the popup speed?
- Find the index.php in templates/glass_gray directory
- Find the following code:
Replace it with the following code:
As shown above, I just add autoCloseDuration: 5000 into the code. It tells the script the cart should be closed automatically after 5 seconds. So, you just need to adjust the value of autoCloseDuration depending on your own requirements.