Can anyone let me know, How an alert box getting delete an item popup, from minicart: location below:

line 71:


Where defined the alert for this, Please let me know the location of alert. in magento2.


I you are still looking for an answer, the modal confirmation is created in vendor/magento/module-checkout/view/frontend/web/js/sidebar.js and it's a parameter named confirm:

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

                    /** @inheritdoc */
                    always: function (e) {
  • In template/minicart/item/default.html this code create delete button <div class="secondary"> <a href="#" data-bind="attr: {'data-cart-item': item_id, title: $t('Remove item')}" class="action delete"> <span data-bind="i18n: 'Remove'"></span> </a> </div> in this code where is define to call click event in sidebar.js – HaFiz Umer Oct 28 '19 at 12:23

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.