diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php index 56c59f2bd..2da637539 100644 --- a/modules/blocklayered/blocklayered.php +++ b/modules/blocklayered/blocklayered.php @@ -2396,10 +2396,14 @@ class BlockLayered extends Module $alias = 'asso_shop_product'; } $this->products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' - SELECT p.id_product, p.on_sale, p.out_of_stock, p.available_for_order, p.quantity, p.minimal_quantity, '.$alias.'.id_category_default, p.customizable, p.show_price, p.`weight`, - p.ean13, pl.available_later, pl.description_short, pl.link_rewrite, pl.name, i.id_image, il.legend, m.name manufacturer_name, p.condition, p.id_manufacturer, - DATEDIFF(p.`date_add`, - DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new + SELECT + p.*, + '.$alias.'.id_category_default, + pl.available_later, pl.description_short, pl.link_rewrite, pl.name, + i.id_image, + il.legend, + m.name manufacturer_name, + DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category) LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product`