0

User Product Add to the cart after Success Message is Open to the Popup Box

2

Popup modal add to the catalog-add-to-cart.js File to the below Code Center

success: function(res) {

                if (self.isLoaderEnabled()) {
                    $('body').trigger(self.options.processStop);
                }

                if (res.backUrl) {
                    window.location = res.backUrl;
                    return;
                }
                if (res.messages) {
                    $(self.options.messagesSelector).html(res.messages);
                }
                if (res.minicart) {
                    $(self.options.minicartSelector).replaceWith(res.minicart);
                    $(self.options.minicartSelector).trigger('contentUpdated');
                }
                if (res.product && res.product.statusText) {
                    $(self.options.productStatusSelector)
                        .removeClass('available')
                        .addClass('unavailable')
                        .find('span')
                        .html(res.product.statusText);
                }


var popup = $('<div class="themecafe-free-popup"/>').html('<h1>Product is add To Successfully in Your Cart</h1>').modal({
                        modalClass: 'changelog',
                        title: $.mage.__("onfiguration Message"),
                        buttons: [{
                                text: 'Continue Shopping',
                                click: function () {
                                    this.closeModal();
                                }
                            }]
                    });
                    popup.modal('openModal');
                    setTimeout(function() { popup.modal('closeModal'); 
}, 2000);

      self.enableAddToCartButton(form);
                }
            });
        },

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.