Woocommerce add to cart popup
I’ve done a bit of customising to a woothemes.com theme (superstore) so that it now loads a popup div when a product is added to the cart, this enables a customer to either continue shopping or checkout at the click of a button – so pretty useful. This works fine on the single product page e.g – http://pbs.transparentwebdesigns.co.uk/shop/hand-saws/bahco-244-rough-cut-saw-22-7-tpi
I’ve also edited the category pages to include a grid/list view toggle:
on the list view toggle an add to cart button is displayed. This works fine in that if you click the add to cart button the correct item is added to the cart, the issue is that the popup displays the name of the first product that was added. So the first time you add a product the popup displays the correct product name, but if you don’t refresh the page and add a different product the popup still shows the first product name – I think this is because the popup div needs refreshing but I’m not sure how to do this, can anyone help?
Feel free to use this code on your own project:
then in themefolder/woocommerce/single-product/add-to-cart:
YITH WooCommerce Added to Cart Popup
YITH WooCommerce Added To Cart Popup gives you the freedom to continue browsing the shop or going directly to the cart.
Feel free to browse your favorite shop.
A simple plugin that offers an extremely useful option: with YITH WooCommerce Added To Cart Popup you will be free to add all the products you want to your cart without being forced to go to the cart page. Customize its style and its button, and offer the perfect bridge between the product page and the cart.
- Open popup after add to cart in archive page
- Select to show buttons ‘Continue Shopping’ and ‘View Cart’
- Customize button style
If you have suggestions about how to improve YITH WooCommerce Added to Cart Popup, you can write us so we can bundle them into YITH WooCommerce Added to Cart Popup.
If you can’t find this plugin in your language and want to translate it, use the dedicated tool at Translating WordPress.
Or, if you have created your own language pack, or have an update for an existing one, you can send it as an email attachment from our Contacts page and we will bundle into YITH WooCommerce Added to Cart Popup.