From bc710b37bc99b16ce0c71a603124bde671996fe0 Mon Sep 17 00:00:00 2001 From: jBreux Date: Thu, 22 Dec 2011 21:54:38 +0000 Subject: [PATCH] // Fix adding pack to cart --- classes/Cart.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/classes/Cart.php b/classes/Cart.php index e8c6ce0e9..fc16952b4 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -828,6 +828,12 @@ class CartCore extends ObjectModel $result2 = Db::getInstance()->getRow($sql); + // Quantity for product pack + if (Pack::isPack($id_product)) + { + $result2['quantity'] = Pack::getQuantity($id_product, $id_product_attribute); + } + if (!Product::isAvailableWhenOutOfStock((int)$result2['out_of_stock'])) if ((int)$quantity > $result2['quantity']) return false;