// Stock : fixed Pack & Product
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9406 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+7
-3
@@ -91,10 +91,14 @@ class PackCore extends Product
|
||||
if (!self::isFeatureActive())
|
||||
return true;
|
||||
|
||||
$items = self::getItems((int)($id_product), Configuration::get('PS_LANG_DEFAULT'));
|
||||
foreach ($items AS $item)
|
||||
if ($item->quantity < $item->pack_quantity AND !$item->isAvailableWhenOutOfStock((int)($item->out_of_stock)))
|
||||
$items = self::getItems((int)$id_product, Configuration::get('PS_LANG_DEFAULT'));
|
||||
|
||||
foreach ($items as $item)
|
||||
{
|
||||
// Updated for 1.5.0
|
||||
if ($item->getQuantity() < $item->pack_quantity || !$item->isAvailableWhenOutOfStock((int)$item->getOutOfStock()))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user