I am new in magento. I created a custom observer to trigger on the event sales_order_place_before
, but its not working.
Here's my code:
app/etc/modules/CustomPriceUpdate_Checkout.xml
<?xml version="1.0"?>
<config>
<modules>
<CustomPriceUpdate_Checkout>
<codePool>local</codePool>
<active>true</active>
<depends>
<Mage_Catalog />
</depends>
</CustomPriceUpdate_Checkout>
</modules>
</config>
app/code/local/CustomPriceUpdate/Checkout/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<CustomPriceUpdate_Checkout>
<version>0.0.1</version>
</CustomPriceUpdate_Checkout>
</modules>
<global>
<models>
<myCustomPriceUpdate_Checkout>
<class>CustomCheckout_Event_Model</class>
</myCustomPriceUpdate_Checkout>
</models>
<events>
<sales_order_place_before>
<observers>
<modify_product_price>
<type>singleton</type>
<class>myCustomPriceUpdate_Checkout/observer</class>
<method>update_price</method>
</modify_product_price>
</observers>
</sales_order_place_before>
</events>
</global>
</config>
app/code/local/CustomPriceUpdate/Checkout/Model/Observer.php
<?php
class CustomCheckout_Event_Model_Observer{
public function update_price($observer){
Mage::log("Order is placed");
}
}
When I check the system.log file, I am seeing following error:
Warning: include(CustomCheckout/Event/Model/Observer.php): failed to open stream: No such file or directory in /var/www/html/lib/Va$
Warning: include(): Failed opening 'CustomCheckout/Event/Model/Observer.php' for inclusion (include_path='/var/www/html/app/code/loc$
Can anyone please suggest, what's wrong in the code ?