diff --git a/classes/module/Module.php b/classes/module/Module.php index 84aa206bc..af8430c6e 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -1254,8 +1254,9 @@ abstract class ModuleCore FROM `'._DB_PREFIX_.'module_country` mc LEFT JOIN `'._DB_PREFIX_.'module` m ON m.`id_module` = mc.`id_module` INNER JOIN `'._DB_PREFIX_.'module_group` mg ON (m.`id_module` = mg.`id_module`) - INNER JOIN `'._DB_PREFIX_.'customer_group` cg on (cg.`id_group` = mg.`id_group` - '.(isset($context->customer) ? 'AND cg.`id_customer` = '.(int)$context->customer->id : '').') + '.(isset($context->customer) + ? 'INNER JOIN `'._DB_PREFIX_.'customer_group` cg on (cg.`id_group` = mg.`id_group`AND cg.`id_customer` = '.(int)$context->customer->id.')' + : '').' LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` WHERE h.`name` = \''.pSQL($hookPayment).'\'