// Context part 15

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7658 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-19 16:17:14 +00:00
parent 3baf0f02a5
commit 4ae81d8acd
39 changed files with 231 additions and 198 deletions
+2 -2
View File
@@ -387,8 +387,8 @@ 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', true, $context).'
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::sqlLang('pl', $context).')
'.$context->shop->sqlAsso('product', 'p', true).'
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.$context->shop->sqlLang('pl').')
'.Product::sqlStock('p', 0).'
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = '.(int)$context->language->id.')