// Perfs and clean
This commit is contained in:
+3
-3
@@ -260,15 +260,15 @@ class HookCore extends ObjectModel
|
||||
// For payment modules, we check that they are available in the contextual country
|
||||
if (Validate::isLoadedObject($context->country))
|
||||
$sql->where('(h.name != "displayPayment" OR (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.')');
|
||||
$sql->where('hm.id_shop IN('.implode(', ', $shop_list).')');
|
||||
$sql->where('hm.id_shop IN ('.implode(', ', $shop_list).')');
|
||||
|
||||
if (isset($context->customer) && $context->customer->isLogged())
|
||||
{
|
||||
$sql->leftJoin('module_group', 'mg', 'mg.`id_module` = m.`id_module`');
|
||||
$sql->where('mg.`id_group` IN('.implode(', ', $groups).')');
|
||||
$sql->where('mg.`id_group` IN ('.implode(', ', $groups).')');
|
||||
$sql->groupBy('hm.id_hook, hm.id_module');
|
||||
}
|
||||
|
||||
$sql->groupBy('hm.id_hook, hm.id_module');
|
||||
$sql->orderBy('hm.`position`');
|
||||
|
||||
// Store results per hook name
|
||||
|
||||
+1
-2
@@ -1874,9 +1874,8 @@ class ProductCore extends ObjectModel
|
||||
if (Combination::isFeatureActive())
|
||||
{
|
||||
$sql->select('pa.id_product_attribute');
|
||||
$sql->leftOuterJoin('product_attribute', 'pa', 'p.`id_product` = pa.`id_product`');
|
||||
$sql->leftOuterJoin('product_attribute', 'pa', 'p.`id_product` = pa.`id_product` AND pa.default_on = 1');
|
||||
$sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false));
|
||||
$sql->where('(product_attribute_shop.default_on = 1 OR product_attribute_shop.default_on IS NULL)');
|
||||
}
|
||||
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
|
||||
@@ -1870,6 +1870,7 @@ CREATE TABLE `PREFIX_tax_rule` (
|
||||
PRIMARY KEY (`id_tax_rule`),
|
||||
KEY `id_tax_rules_group` (`id_tax_rules_group`),
|
||||
KEY `id_tax` (`id_tax`)
|
||||
KEY `category_getproducts` ( `id_tax_rules_group` , `id_country` , `id_state` , `zipcode_from` )
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `PREFIX_tax_rules_group` (
|
||||
|
||||
@@ -11,3 +11,5 @@ DELETE FROM `PREFIX_tab_lang` WHERE `id_tab` NOT IN (SELECT `id_tab` FROM `PREFI
|
||||
DELETE FROM `PREFIX_access` WHERE `id_tab` NOT IN (SELECT `id_tab` FROM `PREFIX_tab`);
|
||||
|
||||
UPDATE `PREFIX_employee` SET bo_theme = 'default';
|
||||
|
||||
ALTER TABLE `PREFIX_tax_rule` ADD INDEX `category_getproducts` ( `id_tax_rules_group` , `id_country` , `id_state` , `zipcode_from` )
|
||||
|
||||
Reference in New Issue
Block a user