diff --git a/view/frontend/templates/modal_container.phtml b/view/frontend/templates/modal_container.phtml index 45f5918..6fa7d34 100644 --- a/view/frontend/templates/modal_container.phtml +++ b/view/frontend/templates/modal_container.phtml @@ -18,7 +18,7 @@ ?> showModal()): ?> -
"}}' id="language-modal" style="display:none;"> +
"}}' id="language-modal" class="hide-country-popup" style="display:none;">
diff --git a/view/frontend/web/js/country_modal.js b/view/frontend/web/js/country_modal.js index 775fd47..ce62df3 100644 --- a/view/frontend/web/js/country_modal.js +++ b/view/frontend/web/js/country_modal.js @@ -78,11 +78,12 @@ define([ responsive: this.options.modal_responsive, innerScroll: true, wrapperClass: 'hint-country-modal' - }, - popup = modal(options, this.element); + }; if (!this.options.show_modal && !this.options.default_store) { - setTimeout(function () { + // only init modal dialog if necessary + modal(options, this.element); + this.element.removeClass('hide-country-popup'); that.element.modal('openModal', true); if (!that.options.show_modal_overlay) { $('.hint-country-modal').addClass('no-overlay');