diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index f4089b0cb..2f86626b5 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -943,7 +943,10 @@ class ShopCore extends ObjectModel public static function addSqlRestrictionOnLang($alias = null, $id_shop = null) { if (is_null($id_shop)) - $id_shop = Shop::getContextShopID(); + $id_shop = (int)Context::getContext()->shop->id; + if (!$id_shop) + $id_shop = (int)Configuration::get('PS_SHOP_DEFAULT'); + return ' AND '.(($alias) ? $alias.'.' : '').'id_shop = '.$id_shop.' '; }