Skip to content

Commit a0d739b

Browse files
committed
AC-711::CR Changes done
1 parent 15957c9 commit a0d739b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,19 +2062,18 @@ protected function _applyZeroStoreProductLimitations()
20622062
$filters = $this->_productLimitationFilters;
20632063
$categories = $this->getChildrenCategories((int)$filters['category_id']);
20642064

2065-
$categoryProductSelect = $this->getConnection()->select();
2066-
$categoryProductSelect->from($this->getTable('catalog_category_product'))
2065+
$categoryProductSelect = $this->getConnection()->select()
2066+
->from($this->getTable('catalog_category_product'))
20672067
->reset(Select::ORDER)
20682068
->reset(Select::LIMIT_COUNT)
20692069
->reset(Select::LIMIT_OFFSET)
2070-
->reset(Select::COLUMNS);
2071-
2072-
$categoryProductSelect->columns([
2073-
"product_id" => "product_id",
2074-
"min_position" => new Zend_Db_Expr("MIN(position)")
2075-
]);
2076-
$categoryProductSelect->where("category_id IN (?)", $categories);
2077-
$categoryProductSelect->group("product_id");
2070+
->reset(Select::COLUMNS)
2071+
->columns([
2072+
"product_id" => "product_id",
2073+
"min_position" => new Zend_Db_Expr("MIN(position)")
2074+
])
2075+
->where("category_id IN (?)", $categories)
2076+
->group("product_id");
20782077

20792078
$joinCond = 'cat_pro.product_id = e.entity_id';
20802079

0 commit comments

Comments
 (0)