[-] BO : Bug fixed related to #PSCFV-1354 - Specific price with multishop, groups/currencies/countries should vary in function of the selected shop

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15353 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fBrignoli
2012-05-16 15:51:22 +00:00
parent 232d487b67
commit ae47d8b9f2
5 changed files with 57 additions and 6 deletions
+11
View File
@@ -147,6 +147,17 @@ class CountryCore extends ObjectModel
return $countries;
}
public static function getCountriesByIdShop($id_shop, $id_lang)
{
$sql = 'SELECT *
FROM `'._DB_PREFIX_.'country` c
LEFT JOIN `'._DB_PREFIX_.'country_shop` cs ON (cs.`id_country`= c.`id_country`)
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int)$id_lang.')
WHERE `id_shop` = '.(int)$id_shop;
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
}
/**
* Get a country ID with its iso code
*