What are the best events to observe? When
- A cart is created
- Updates a cart
- A cart is deleted
Below Are the list of Events for cart :
checkout_cart_update_items_after
checkout_cart_save_before
For Use of each refer this url - https://cyrillschumacher.com/magento-2.1-list-of-all-dispatched-events/
You probably need one of these:
checkout_cart_product_add_after
checkout_cart_update_items_before
checkout_cart_update_items_after
checkout_cart_save_before
checkout_cart_save_after
checkout_cart_product_update_after
Have a look at this.
https://www.mageplaza.com/magento-2-module-development/magento-2-events.html
checkout_cart_product_update_after
dispatched inside updateItem(params) method, checkout_cart_update_items_after
dispatched inside updateItems($data) method. One for single item, one for bulk items in cart.
Commented
Jul 10, 2017 at 7:00
If you are using Magento 2.3.3 or newer you should check sales_quote events.
For example sales_quote_remove_item when you want to observe the delete action on cart