-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.2
-- PHP version -- : 7.1
Hi, I've been trying to create a function when admin modifies a order from backend, and I've had no luck.. I've tried using variations of below code in order.php (classes and controllers) any help would be appreciate! ( I want to create a function when admin cancels an order, needs to send an API to outside affiliate) Thanks!
function onAfterOrderUpdate (&$order,&$send_email) {
var_dump('ahasdh'); exit;
$config =& hikashop_config();
$confirmed = $config->get('order_confirmed_status');
$orderClass = hikashop_get('class.order');
$orderInDb = $orderClass->loadFullOrder($order->order_id);
if (!isset ($order->order_status))
return true;
if ($order->order_status = $confirmed) {
return true;
}
if ($order->order_status == $confirmed) {
// my simple action to test
}
}