How to show popup?
-
08-10-2020 - |
Вопрос
I am using Custom Message Based on Total for free Delivery Module on my site, but it's showing , its only showing on checkout/cart page.
"How can I show module instead of the only checkout page to all the pages when adding the product to cart?"
Is it possible to show a popup for this case?
Решение
in your config.xml
file change below line
instead of
<controller_action_predispatch_checkout_cart_index>
replace with
<controller_action_predispatch>
change closing tags as well
Другие советы
Following the tutorial that you used, the message is displayed when the event triggers controller_action_predispatch_checkout_cart_index
thats why its showing only in checkout/cart
page, to display it in the other pages, it will be necessary to add the other events appropriate to these pages in your config.xml
in events
tag as you did for checkout/cart
<events>
<controller_action_predispatch>
<observers>
<stackexchange_freeshipping>
<class>stackexchange_freeshipping/observer</class>
<method>checkFreeShipping</method>
</stackexchange_freeshipping>
</observers>
</controller_action_predispatch>
</events>