// Fix #PSCFV-4052
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17349 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -645,7 +645,8 @@ class CategoryCore extends ObjectModel
|
|||||||
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m
|
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m
|
||||||
ON m.`id_manufacturer` = p.`id_manufacturer`
|
ON m.`id_manufacturer` = p.`id_manufacturer`
|
||||||
WHERE product_shop.`id_shop` = '.(int)$context->shop->id.'
|
WHERE product_shop.`id_shop` = '.(int)$context->shop->id.'
|
||||||
AND (pa.id_product_attribute IS NULL OR product_attribute_shop.id_product_attribute IS NOT NULL)
|
AND ((product_attribute_shop.id_product_attribute IS NOT NULL OR pa.id_product_attribute IS NULL)
|
||||||
|
OR (product_attribute_shop.id_product_attribute IS NULL AND pa.default_on=1))
|
||||||
AND cp.`id_category` = '.(int)$this->id
|
AND cp.`id_category` = '.(int)$this->id
|
||||||
.($active ? ' AND product_shop.`active` = 1' : '')
|
.($active ? ' AND product_shop.`active` = 1' : '')
|
||||||
.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '')
|
.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '')
|
||||||
|
|||||||
+1
-1
@@ -2484,7 +2484,7 @@ class ProductCore extends ObjectModel
|
|||||||
$sql->where('p.`id_product` = '.(int)$id_product);
|
$sql->where('p.`id_product` = '.(int)$id_product);
|
||||||
if (Combination::isFeatureActive())
|
if (Combination::isFeatureActive())
|
||||||
{
|
{
|
||||||
$sql->select('pa.id_product_attribute, product_attribute_shop.`price` AS attribute_price, product_attribute_shop.default_on');
|
$sql->select('product_attribute_shop.id_product_attribute, product_attribute_shop.`price` AS attribute_price, product_attribute_shop.default_on');
|
||||||
$sql->leftJoin('product_attribute', 'pa', 'pa.`id_product` = p.`id_product`');
|
$sql->leftJoin('product_attribute', 'pa', 'pa.`id_product` = p.`id_product`');
|
||||||
$sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.id_shop = p.id_shop_default'));
|
$sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.id_shop = p.id_shop_default'));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user