Question

i want to remove minicart product remove confirmation popup in magento 2.3 theme porto smartwave

https://prnt.sc/u3kh1f

Was it helpful?

Solution

Please refer this link to create a new theme: Create a new storefront theme

If frontend theme is already exists then copy your core file into theme folder.

From:

vendor/magento/module-checkout/view/frontend/web/js/sidebar.js

To:

app/design/frontend/<your_vendor_name>/<your_theme_name>/Magento_Checkout/web/js/sidebar.js

And replace the following code:

From:

/**
 * @param {jQuery.Event} event
 */
events['click ' + this.options.button.remove] =  function (event) {
    event.stopPropagation();
    confirm({
        content: self.options.confirmMessage,
        actions: {
            /** @inheritdoc */
            confirm: function () {
                self._removeItem($(event.currentTarget));
            },

            /** @inheritdoc */
            always: function (e) {
                e.stopImmediatePropagation();
            }
        }
    });
};

To:

/**
 * @param {jQuery.Event} event
 */
events['click ' + this.options.button.remove] =  function (event) {
    event.stopPropagation();
    self._removeItem($(event.currentTarget));
};

OTHER TIPS

Your try using js.you want to change magento 2 default js check this link :-

Magento2 mini cart item delete alert

And Second you want to add custom js form.phtml file check this link:-

Confirmation popup before removing item from cart

THANKS.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top