[-] Classes : Hook - Display payment method & shop default currency bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17796 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+1
-1
@@ -278,7 +278,7 @@ class HookCore extends ObjectModel
|
||||
if (Validate::isLoadedObject($context->country))
|
||||
$sql->where('(h.name = "displayPayment" AND (SELECT id_country FROM '._DB_PREFIX_.'module_country mc WHERE mc.id_module = m.id_module AND id_country = '.(int)$context->country->id.' LIMIT 1) = '.(int)$context->country->id.')');
|
||||
if (Validate::isLoadedObject($context->currency))
|
||||
$sql->where('(h.name = "displayPayment" AND (SELECT id_currency FROM '._DB_PREFIX_.'module_currency mcr WHERE mcr.id_module = m.id_module AND id_currency = '.(int)$context->currency->id.' LIMIT 1) = '.(int)$context->currency->id.')');
|
||||
$sql->where('(h.name = "displayPayment" AND (SELECT id_currency FROM '._DB_PREFIX_.'module_currency mcr WHERE mcr.id_module = m.id_module AND id_currency IN ('.(int)$context->currency->id.', -2) LIMIT 1) IN ('.(int)$context->currency->id.', -2))');
|
||||
}
|
||||
if (Validate::isLoadedObject($context->shop))
|
||||
$sql->where('hm.id_shop = '.(int)$context->shop->id);
|
||||
|
||||
@@ -1311,6 +1311,7 @@ abstract class ModuleCore
|
||||
$paypal_condition = ' AND m.`name` = \'paypal\'';
|
||||
|
||||
$list = Shop::getContextListShopID();
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT DISTINCT m.`id_module`, h.`id_hook`, m.`name`, hm.`position`
|
||||
FROM `'._DB_PREFIX_.'module` m
|
||||
'.($frontend ? 'LEFT JOIN `'._DB_PREFIX_.'module_country` mc ON (m.`id_module` = mc.`id_module` AND mc.id_shop = '.(int)$context->shop->id.')' : '').'
|
||||
|
||||
Reference in New Issue
Block a user