// improve multishop code, id_shop has an id different than 0 even if share_customer or share_order is true

This commit is contained in:
mBertholino
2011-12-13 13:37:59 +00:00
parent 79b74dc597
commit d189fd8ed0
4 changed files with 45 additions and 50 deletions
+2 -3
View File
@@ -758,13 +758,12 @@ class ShopCore extends ObjectModel
}
else
{
if ($shop_group_id && ($share == Shop::SHARE_CUSTOMER || $share == Shop::SHARE_ORDER))
$restriction = ' AND '.$alias.'id_group_shop = '.$shop_group_id.' AND '.$alias.'id_shop = 0';
else if ($shop_id || $shop_group_id)
if ($shop_id || $shop_group_id)
$restriction = ' AND '.$alias.'id_shop IN ('.implode(', ', $this->getListOfID($share)).') ';
//else if ($share == Shop::SHARE_STOCK)
// $restriction = ' AND '.$alias.'id_shop = '.$this->getID(true);
}
return $restriction;
}