Вопрос

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

Это было полезно?

Решение

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);
                }
            });
        },
Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top