Reputation: 183
I have a scenario where I want to create the order from backend . But I want to call the api when we are selecting products for the order . I want to know which api we need to call when we add item for the order so I may call the API ?
I will really appreciate for any help .
Regards Surjan
Upvotes: 1
Views: 1412
Reputation: 1388
sales_quote_add_item Event will be occured when you add product to order from admin.
follow this steps.
Your config.xml will look like.
<adminhtml>
<events>
<sales_quote_add_item>
<observers>
<unique_event_name>
<class>module/observer</class>
<method>productlevelchanges</method>
</unique_event_name>
</observers>
</sales_quote_add_item>
</events>
</adminhtml>
Observer.php
<?php
class Company_Module_Model_Observer extends Mage_Core_Model_Abstract
{
public function productlevelchanges(Varien_Event_Observer $observer){
$item = $observer->getQuoteItem();
$ProductObject=Mage::getModel('catalog/product')->load($item->getProductId());
}
Upvotes: 1
Reputation: 1096
Below event occure
adminhtml_sales_order_create_process_data
Create new field to order table when order created
trigger event on using event
adminhtml_sales_order_create_process_data event
it s params
$observer->getEvent()->getOrderCreateModel();
$observer->getEvent()->getRequestModel();
$observer->getEvent()->getSession();
Upvotes: 0