From 7492cd60f87bd3bf5318f16102805faeebef117a Mon Sep 17 00:00:00 2001 From: bMancone Date: Wed, 11 Jan 2012 10:11:24 +0000 Subject: [PATCH] // Fixed OrderHistory for Packs git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12343 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/order/OrderHistory.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php index a66ee1f35..dc28feb69 100644 --- a/classes/order/OrderHistory.php +++ b/classes/order/OrderHistory.php @@ -170,6 +170,7 @@ class OrderHistoryCore extends ObjectModel true ); } + StockAvailable::updateQuantity($pack_product->id, 0, (int)$pack_product->pack_quantity * $product['product_quantity'], $order->id_shop); } } } @@ -189,12 +190,12 @@ class OrderHistoryCore extends ObjectModel true ); } - } - if (StockAvailable::dependsOnStock($product['product_id'], $order->id_shop)) - StockAvailable::synchronize($product['product_id']); - else - StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['physical_quantity'], $order->id_shop); + if (StockAvailable::dependsOnStock($product['product_id'], $order->id_shop)) + StockAvailable::synchronize($product['product_id']); + else + StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['physical_quantity'], $order->id_shop); + } } }