I have created a module to change the prices of a product when added to cart, but the module doesn't get to the method.
The observer.php file and the class Zain_ProductLabelPricing_Model
is running but the method 'modifyPrice' is not. Can someone guide me how to fix this?
Config.xml
<?xml version="1.0"?>
<config>
...
<global>
<models>
<chdispatcher>
<class>Zain_ProductLabelPricing_Model</class>
</chdispatcher>
</models>
</global>
<frontend>
<events>
<checkout_cart_product_add_after>
<observers>
<modify_to_custom_price>
<class>chdispatcher/observer</class>
<method>modifyPrice</method>
</modify_to_custom_price>
</observers>
</checkout_cart_product_add_after>
</events>
</frontend>
...
</config>
Observer.php
<?php
// die(); this is working
class Zain_ProductLabelPricing_Model {
public function modifyPrice(Varien_Event_Observer $obs) {
//die(); this is not working
Mage::log('This worked');
}
}