I am wondering if there is any way to know that product is added to the wishlist from 'Category/List' page OR 'Product View' page. I need this only when product is successfully added to the wishlist. Any help would be appreciated.
1 Answer
You could write your own observer that catches a magento event.
Here is the event cheat sheet , and here is a tutorial by inchoo on how to write an observer.
You can observe wishlist_add_product
and check for the referer url.
See how to here.
-
In this case it will always return you login page url as referral url if a customer try to add without login. As I mentioned earlier - "I need this only when product is successfully added to the wishlist".– vibhuNov 23, 2016 at 7:24