2

I want to perform an action whenever a wishlist is updated or created, but I am not able to find that event. If anyone knows that event, please let me know.

Thanks in Advance.

4 Answers 4

2

You can use wishlist_save_before or wishlist_save_after event.

Those events are dispatched whenever a wishlist is saved so it'll be triggered for both creation and update

6
  • Out of three answers, this is the right solution. Nov 14, 2016 at 10:19
  • When I update wishlist from product page, it works but if I update from wishlist page it doesn't work. Why? Any Idea? Nov 14, 2016 at 10:21
  • @GauravAgrawal those events are always triggered whenever a wishlist is saved. If that does not work when you update from wishlist page maybe it's because you did not make any change to the wishlist and thus, it is not being saved ? Nov 14, 2016 at 10:31
  • @RaphaelatDigitalPianism I have updated its quantity but this event doesn't triggers. Nov 14, 2016 at 10:48
  • @GauravAgrawal in that case it is not a wishlist update but a wishlist item update and you should use wishlist_item_save_before or wishlist_item_save_after ;) Nov 14, 2016 at 10:49
1

You can try this event :

<wishlist_item_add_after>
    <observers>
        <wishlist_change_event>         
            <class>Your_Class_Name</class>
            <method>yourMethodName</method>           
        </wishlist_change_event>
    </observers>
</wishlist_item_add_after>
2
  • When I update wishlist from product page, it works but if I update from wishlist page it doesn't work. Why? Any Idea? Nov 14, 2016 at 10:28
  • not sure but you can try this for update :: wishlist_item_update_after OR wishlist_update_item Nov 14, 2016 at 10:31
0

Magento Core events to save and update Wishlist :

wishlist_add_product at Mage/Wishlist/controllers/IndexController.php (line 212)

wishlist_update_item at Mage/Wishlist/controllers/IndexController.php (line 329)

0

You can use below events for your purpose:

please check and try and let me know which work best for you

1) wishlist_add_product

2) wishlist_update_item

3) wishlist_add_item

4) wishlist_product_add_after

5) wishlist_items_renewed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.