Search code examples
phpopencart

Opencart: After placing / confirming an order, where in the code is the stock quantity updated?


I'm trying to update the ean value every time a product is purchased (ie, order confirmed). However, no matter how hard I look I can't seem to find any sort of code that updates the product quantity in the database.

Where is the stock updated?


Solution

  • Via API in: catalog/controller/api/order.php triggering function: $this->model_checkout_order->addOrderHistory($json['order_id'], $order_status_id); In: catalog/model/checkout/order.php