I am using Magento 1.9.1
Here is my config.xml:
<config>
<modules>
<VivasIndustries_Smartparser>
<version>0.1.0</version>
</VivasIndustries_Smartparser>
</modules>
<global>
<models>
<smartparser>
<class>VivasIndustries_Smartparser_Model</class>
</smartparser>
</models>
<events>
<sales_order_place_after>
<observers>
<vivasindustries_smartparser_model_observer>
<type>singleton</type>
<class>VivasIndustries_Smartparser_Model_Observer</class>
<method>clearcartitems</method>
</vivasindustries_smartparser_model_observer>
</observers>
</sales_order_place_after>
</events>
<helpers>
<smartparser>
<class>VivasIndustries_Smartparser_Helper</class>
</smartparser>
</helpers>
<blocks>
<smartparser>
<class>VivasIndustries_Smartparser_Block</class>
</smartparser>
</blocks>
</global>
<adminhtml>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<system>
<children>
<config>
<children>
<vivasparser>
<title>vivasparser - All</title>
</vivasparser>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<smartparser>
<file>smartparser.xml</file>
</smartparser>
</updates>
</layout>
</adminhtml>
</config>
Here is my obsrerver:
<?php
class VivasIndustries_Smartparser__Model_Observer
{
public function checkPound() {
Mage::log("$NowTime has started autmated pound currency check rate of $PoundRate status check!", null, "PoundCurrency.log", true);
}
public function clearcartitems($observer)
{
$data = $observer->getEvent()->getOrder();
Mage::log("Order is placed", null, "Order.log", true);
Mage::log($data->debug(), null, "Order.log", true);
}
}
However when i place an order there nothing happens. The log is not created. Where is my mistake and how can i fix it ?