I want to open modal confirmation dialogue and based on that I'm operating some database operation as my need. So please suggest me the best way to open modal confirmation popup that should work even varnish cache or any cache is there.


As refereed by @MichaelHa

Try this Code:

<div id="popup-modal">
    <h1> Hi I'm here.... </h1>
        ) {
            var options = {
                type: 'popup',
                responsive: true,
                innerScroll: true,
                title: 'popup modal title',
                buttons: [{
                    text: $.mage.__('Continue'),
                    class: '',
                    click: function () {

            var popup = modal(options, $('#popup-modal'));


Hope this will help You!!

| improve this answer | |
  • Please don't take other people's answers. – MichaelHa Nov 8 '19 at 8:37
  • Please check answer, Refereed by @MichaelHa – Oscprofessionals Nov 8 '19 at 8:38

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.