当用户单击“添加到购物车”按钮时,会出现一个模式窗口进行确认。 这是没有必要的。 我想在几秒钟后自动隐藏添加到购物车的模式确认(prestashop 8)。
我正在寻找脚本或插件。我正在使用 prestashop 8
$(document).ready(function() {
// Find the add to cart button and attach a click event
$('.add-to-cart').on('click', function() {
// Show the confirmation modal or element
$('#confirmation-modal').modal('show');
// After 3 seconds (3000 milliseconds), hide the modal
setTimeout(function() {
$('#confirmation-modal').modal('hide');
}, 3000); // Adjust the time delay (in milliseconds) as needed
});
});