I need to detect whenever the inventory level of a product changes. I've had some success using the cataloginventory_stock_item_save_after
event which is triggered when inventory is changed in the backend, or when an order is cancelled on the frontend (via Paypal), but is not triggered when a product is purchased from the frontend.
I'm hooking into the cataloginventory_stock_item_save_after
event like this:
<global>
<events>
<cataloginventory_stock_item_save_after>
<observers>
<cataloginventory_stock_item_save_after_handler>
<type>model</type>
<class>stockchange/observer</class>
<method>stockChange</method>
</cataloginventory_stock_item_save_after_handler>
</observers>
</cataloginventory_stock_item_save_after>
</events>
<?php
class FashionBunker_StockChange_Model_Observer {
public function stockChange(Varien_Event_Observer $observer) {
Do I need to use another event to capture the inventory change when a customer purchases something, or is there something wrong with the way I've hooked into the event?