// Fix multishop bug on product_attribute list

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14847 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-04-24 13:48:23 +00:00
parent 336fd07a4e
commit 21037010d2
3 changed files with 13 additions and 10 deletions
+2 -1
View File
@@ -647,7 +647,7 @@ class CategoryCore extends ObjectModel
ON p.`id_product` = cp.`id_product`
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
ON (p.`id_product` = pa.`id_product`)
'.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.default_on = 1').'
'.Shop::addSqlAssociation('product_attribute', 'pa', false).'
'.Shop::addSqlAssociation('product', 'p').'
'.Product::sqlStock('p', 'pa', false, $context->shop).'
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl
@@ -675,6 +675,7 @@ class CategoryCore extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m
ON m.`id_manufacturer` = p.`id_manufacturer`
WHERE product_shop.`id_shop` = '.(int)Context::getContext()->shop->id.'
AND (product_attribute_shop.default_on = 1 OR product_attribute_shop.default_on IS NULL)
AND cp.`id_category` = '.(int)$this->id
.($active ? ' AND product_shop.`active` = 1' : '')
.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '')