Hi there!
I am developing a payment extension and at the end of payroll process I want to update the order status.
I was calling update function from Checkout order model, but I noticed a strange rule is in place:
$order_query = $this->db->query("SELECT *
FROM `" . $this->db->table("orders") . "` o
LEFT JOIN " . $this->db->table("languages") . " l ON (o.language_id = l.language_id)
WHERE o.order_id = '" . (int)$order_id . "' AND o.order_status_id > '0'");
if ($order_query->num_rows){ ...
Why is that? Why can I only update order statuses greater than '0'?
So I decided to Hook up the function adding the following code to my core extension php:
public function onModelCheckoutOrder_update()
{
// ...
}
But the hook is not triggering! Any ideas?
Thank you!
Best Regards,
Renato