1

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?

1

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

  • Hi, Thanks for your answer!! But it's not working on my site Please check my site and update me. – Rajiv Apr 20 '17 at 7:45
  • @Rajiv after add to cart this message showing in all page just visit the page, I am teting your site and message showing me in all page after add to cart, clear your browser cache and visit site again – Murtuza Zabuawala Apr 20 '17 at 7:53
  • Yes, It is working. But still, it's not showing on MainPage(index.php) – Rajiv Apr 20 '17 at 9:34
0

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>
  • Thanks for your answer. I am new to Magento please explain step by step that will help me most. – Rajiv Apr 19 '17 at 18:38
  • Like the answer of @Murtuza Zabuawala <controller_action_predispatch> – PЯINCƏ Apr 20 '17 at 12:30

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.