yaKay Posted April 12, 2021 Share Posted April 12, 2021 Hi to you all, I'm trying to set the "add to cart popup" with a timeout of a few seconds: the customers, after adding an item on the cart, will display the popup that will close automatically after a few seconds! I have tried by editing the ps_shoppingcart.js adding a timeout function right after the "showModal(resp.modal);" line (the same line which can be commented/removed to hide the popup alert). the commands that I have tried, and founded on the web, are above all two: 1) setTimeout(function() { $('#myModal').modal('show'); }, 3000); 2) setTimeout(function(){ var $blockCartModal = $(‘#blockcart-modal’); if ($blockCartModal.length) { $(‘#blockcart-modal’).fadeOut().remove(); $(‘.modal-backdrop’).fadeOut().remove(); $(“body”).removeClass(“modal-open”); } }, 3000); 3) other commands similar to the 1st one. However noone is working as whished. May someone can help me on it? Thanking in advance, the yaKay staff Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now