I am using Magento 2.
I made an observer that observes anytime a new item is added to the cart. The observer works properly, I also managed to create a single product discount with this observer, here is the events.xml file:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="checkout_cart_product_add_after"> <observer name="PerfectStorm_Pricecalculations_Addtocart" instance="PerfectStorm\Pricecalculations\Observer\PricecalculationsAfterAddtoCart" /> </event>
The problem is, I want to do the same in order to change and intercept the calculation of the subtotals in the cart for each item. But I don't know what event should I observe.
Can you please advice?