// Updated OrderHistory / StockManager. Added feature to StockCover: it is now possible to display the number of sales per product / and highlight products which coverage is less than a given threshold

This commit is contained in:
bMancone
2011-12-13 09:48:52 +00:00
parent 133de02a11
commit 4180588c40
7 changed files with 132 additions and 36 deletions

View File

@@ -127,6 +127,11 @@ class OrderHistoryCore extends ObjectModel
true,
(int)$id_order
);
if (StockAvailable::dependsOnStock($product['id_product'], $order->id_shop))
StockAvailable::synchronize($product['id_product']);
else
StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity'], $order->id_shop);
}
else if ($newOS->shipped == 0 && $oldOrderStatus->shipped == 1 && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
{