// 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:
bMancone
2011-10-18 08:59:31 +00:00
parent 8c5430133d
commit e5ae345855
2 changed files with 15 additions and 13 deletions
+7 -3
View File
@@ -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;
}