Merge pull request #881 from shreesh-webkul/gli-1078

Improvement: Address is not required in booking/order flow
This commit is contained in:
Rohit Jain
2024-03-17 14:37:16 +05:30
committed by GitHub
20 changed files with 114 additions and 213 deletions

View File

@@ -2069,9 +2069,6 @@ abstract class ModuleCore
public static function getPaymentModules()
{
$context = Context::getContext();
if (isset($context->cart)) {
$billing = new Address((int)$context->cart->id_address_invoice);
}
$use_groups = Group::isFeatureActive();
@@ -2101,7 +2098,6 @@ abstract class ModuleCore
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($hook_payment).'\'
'.(isset($billing) && $frontend ? 'AND mc.id_country = '.(int)$billing->id_country : '').'
AND (SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN('.implode(', ', $list).')) = '.count($list).'
AND hm.id_shop IN('.implode(', ', $list).')
'.((count($groups) && $frontend && $use_groups) ? 'AND (mg.`id_group` IN ('.implode(', ', $groups).'))' : '').'