[Prestashop help] Disable or Automatic hidden add-to-cart popup after a few seconds in Prestashop 1.7
In Product page of Prestashop 1.7, when you click add to cart button in a Product page, a confirmation popup will display to customer with message “Product successfully added to your shopping cart”
like this image
1.if you want disable this confirmation popup, you can go to file: PRESTASHOP_ROOT\modules\ps_shoppingcart\ps_shoppingcart.js
Change
showModal(resp.modal);
to
//showModal(resp.modal);
for an example:
2. if you want display that popup, but it automatic hidden this confirmation popup after a few seconds (ex: Hidden it after 5 seconds)
You can add this code block after line: showModal(resp.modal);
setTimeout(function(){
var $blockCartModal = $(‘#blockcart-modal’);
if ($blockCartModal.length) {
$(‘#blockcart-modal’).fadeOut().remove();
$(‘.modal-backdrop’).fadeOut().remove();
$(“body”).removeClass(“modal-open”);
}
}, 5000);
5000 is 5000 miliseconds = 5 seconds, you can change this to another number
Step 2: Clear cache and reload your website
- Clear cache of your prestashop website,
- Clear of your Prestashop theme, some themes stored CSS, JS cached files in it’s assets
- Press CTRL + F5 to clear Cache of your browser
- Reload your Prestashop website
Leave a reply
You must be logged in to post a comment.