function onAfterOrderUpdate(&$order,&$send_email)
{
try {
if(!@include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')){ return false; }
if($order->order_status =='confirmed')
{
.....
$orderClass = hikashop_get('class.order');
$fullorder = $orderClass->loadFullOrder($order->order_id, false, false);
foreach ($fullorder->products as $product) {
/*
* Creating position object using array object class
*/
//jdbg::p($product);
$db->setQuery('SELECT product_invoice_description FROM #__hikashop_product WHERE product_id =' . (int) $product->product_id);
$dbproduct = $db->loadObject();
$objPosition = new ArrayObject(array(
'type' => 2,
'number' => $product->order_product_code,
'name' => $product->order_product_name,
'description' => $dbproduct->product_invoice_description,
'cost' => $product->flo_originalprice,
'unit' => 7,
'amount' => $product->order_product_quantity,
'vat' => 0,
'discount' => $product->flo_discount
));
$objPositions[$cnt] = $objPosition;
$cnt++;
}
.......