[-] Classes : Bug fix : Mobile hooks, check PayPal for payments only

This commit is contained in:
François Gaillard
2013-04-02 17:52:52 +02:00
parent bc5e93ba20
commit 5fe0acbfcb
+1 -1
View File
@@ -274,6 +274,7 @@ class HookCore extends ObjectModel
// For payment modules, we check that they are available in the contextual country
elseif ($frontend)
{
$sql->where(Module::getPaypalIgnore());
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))
@@ -286,7 +287,6 @@ class HookCore extends ObjectModel
{
$sql->leftJoin('module_group', 'mg', 'mg.`id_module` = m.`id_module`');
$sql->where('mg.`id_group` IN ('.implode(', ', $groups).')');
$sql->where(Module::getPaypalIgnore());
$sql->groupBy('hm.id_hook, hm.id_module');
}