diff --git a/classes/Contact.php b/classes/Contact.php index 1f016a9ed..c8d90a302 100644 --- a/classes/Contact.php +++ b/classes/Contact.php @@ -66,12 +66,15 @@ class ContactCore extends ObjectModel */ public static function getContacts($id_lang) { + $shop_ids = Shop::getContextListShopID(); $sql = 'SELECT * FROM `'._DB_PREFIX_.'contact` c '.Shop::addSqlAssociation('contact', 'c', false).' LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl ON (c.`id_contact` = cl.`id_contact`) WHERE cl.`id_lang` = '.(int)$id_lang.' + AND contact_shop.`id_shop` IN ('.implode(', ', array_map('intval', $shop_ids)).') ORDER BY `name` ASC'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); }