// Context in modules + Shop::sql* methods

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7648 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-19 09:23:10 +00:00
parent 2c493137c3
commit 8a0a62ae03
25 changed files with 127 additions and 263 deletions
+1 -1
View File
@@ -387,7 +387,7 @@ class BlockLayered extends Module
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, stock.quantity,
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_.'product p
'.Shop::sqlAsso('product', 'p', $context).'
'.Shop::sqlAsso('product', 'p', true, $context).'
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::sqlLang('pl', $context).')
'.Product::sqlStock('p', 0).'
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)