Created
October 27, 2015 14:24
-
-
Save herveguetin/64f4b818407c03434f74 to your computer and use it in GitHub Desktop.
In Magento, when adding a product to wishlist, force redirection to wishlist page after customer login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 1. Observe the following event: controller_action_predispatch_wishlist_index_add which calls, for example, the `forceReferer()` method | |
// 2. In your observer class, implement the `forceReferer()` method | |
/** | |
* When adding a product to wishlist, | |
* force redirection to wishlist page after customer login | |
* | |
*/ | |
public function forceReferer(Varien_Event_Observer $observer) | |
{ | |
Mage::getSingleton('customer/session')->setNoReferer(false); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment