// Improve multishop API

This commit is contained in:
rMalie
2012-02-23 15:54:10 +00:00
parent 6afc517815
commit dfdce557ee
6 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -411,7 +411,7 @@ class StockAvailableCore extends ObjectModel
$stock_available->quantity = (int)$quantity;
// if we are in group_shop context
if ($context->shop() == Shop::CONTEXT_GROUP)
if (Shop::getContext() == Shop::CONTEXT_GROUP)
{
$group_shop = $context->shop->getGroup();
@@ -577,7 +577,7 @@ class StockAvailableCore extends ObjectModel
}
}
// else if we are in group context
else if ($context->shop() == Shop::CONTEXT_GROUP)
else if (Shop::getContext() == Shop::CONTEXT_GROUP)
{
if (is_object($sql))
$sql->where(pSQL($alias).'id_shop IN ('.implode(', ', Shop::getShops(true, $group_shop->id, true)).')');