I am using magento 1.8.
I have requirement that need to save the order details in separate custom table.
for this I need to execute saveorder method using observer event sales_order_place_after But when I am clicking place order, My observer function is not executing,
My config.xml file content
<?xml version="1.0"?>
<config>
<modules>
<Npm_Commission>
<version>0.1.0</version>
</Npm_Commission>
</modules>
<global>
<events>
<sales_order_place_after>
<observers>
<npm_commission>
<type>singleton</type>
<class>Npm_Commission_Model_Observer</class>
<method>saveorder</method>
</npm_commission>
</observers>
</sales_order_place_after>
</events>
....
my observer method
<?php
class Npm_Commission_Model_Observer extends Varien_Event_Observer
{
public function saveorder($observer)
{
die('sales_order_place_after');
$params = Mage::app()->getFrontController()->getRequest()->getParams();
echo "<pre>";print_r($params);die();
}
If this information is not enough, add in comment for other part of code.
And suggest any other idea for this issue, Or my faults in this code.
Thank you friends:)