I need to change the default action after adding item to cart from wishlist. By default when you hit "Add to basket" button you will be redirected to the cart. I want user to be redirected back to wishlist.
I also know that going to Admin > System > Configuration > Default Config > Sales > Checkout > Shopping Cart > “After adding a product redirect to shopping cart”: Yes or No fixes my problem but I want to be able to do this only for wishlist and not globally, for one store only!
Best Answer
You can write an observer listen to the post_dispatch event
and change the response to a redirect to the wishlist.
So create a new module/extension and add the following to your
config.xml
:Then in your
Observer.php
add the following method:That's it. Every time you will try to add something from your wishlist to your cart you will be redirected back to wishlist.