Reputation: 139
It works in my local windows machine, but not working in centos server.
My config is My folder structure is
Caitlinhavener\Dynamicprice\Model\Observer.php Caitlinhavener\Dynamicprice\etc\config.xml
My config file is :
<?xml version="1.0"?>
<config>
<modules>
<Caitlinhavener_Dynamicprice>
<version>0.1.0</version>
</Caitlinhavener_Dynamicprice>
</modules>
<global>
<models>
<chdispatcher>
<class>Caitlinhavener_Dynamicprice_Model</class>
</chdispatcher>
</models>
</global>
<frontend>
<events>
<checkout_cart_product_add_after>
<observers>
<modify_to_custom_price>
<type>singleton</type>
<class>chdispatcher/observer</class>
<method>modifyPrice</method>
</modify_to_custom_price>
</observers>
</checkout_cart_product_add_after>
</events>
</frontend>
</config>
Observer.php
<?php
Mage::log('Im here')
or exit("unable to log");
class Caitlinhavener_Dynamicprice_Model_Observer
{
public function modifyPrice(Varien_Event_Observer $obs)
{
echo "inside";exit;
}
}
?>
Upvotes: 2
Views: 150
Reputation: 41
Problem not surely in this config. If you module work under windows I assume that somewhere in module troubles with capitalization character (small/big characters). That's maybe wrong characters of module name, namespace, class name, Caitlinhavener_Dynamicprice.xml or another file paths etc.. For windows no difference between small and big letters but for Unix that is important. You can try your observer in another module to check it. Sorry for my English.
Upvotes: 1