0

I disabled the redirect to cart after adding a product so users can continue from where they were, which works great on category page and search results.

But when you are on advanced search page, the "product successfully added to your cart" message doesn't appear, even though the $this->getMessagesBlock()->toHtml(); exists in app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml

For example, you might add 3 products while on advanced search results, no message will appear, and as soon as you navigate to a category/product page, the success message appear for all products previously added to the cart while been on advanced search results.

Any ideas why messages are not fetched while on advanced results page? I am on Magento 1.9.3.1.

Thanks in advance.

0

I have found the solution to this problem, so decided to post it here in case someone else has the same problem.

You have to navigate to

app/code/core/Mage/CatalogSearch/controllers/AdvancedController.php

and add

$this->_initLayoutMessages('checkout/session');

after

$this->_initLayoutMessages('catalog/session');

Of course its not recommended to edit core files directly, so feel free to use overrides or create an extension about it.

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.