Reply 345945 to: single product – Add to cart – Can the action is to open the cart in a slide?

Avatar: Rose Tyler
Rose Tyler
Support staff
February 3, 2023 at 09:34

Hello,

We asked you to contact the plugin support because there is no a hook (means a quick) solution from the theme side. If you want to know the hook/action we “touch” to show popup added to cart then it is located in JS. Woocommerce on ajax add to cart action makes next document trigger ->
$( document.body ).trigger( 'adding_to_cart', [ $thisbutton, data ] ); ( https://prnt.sc/ya_4D4LaIB_d ) and after successful adding product to cart WooCommerce makes next trigger -> $( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $thisbutton ] );
https://prnt.sc/lOwiHyh2VWNf . In our theme’s scripts we have part of the code which starts on such triggers and one of them is called on success ‘added_to_cart’ trigger -> https://prnt.sc/M_qqUCouAsNh and below we call our popup after added to cart with ajax -> https://prnt.sc/quAVrr-inPss

Kind Regards,
8theme team

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.