Skip to content

Commit 5543a9f

Browse files
MC-38306: [Cloud] Adding new disabled products to Magento flushes categories cache
1 parent fa2e1bc commit 5543a9f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Catalog/Model/Category/Product/PositionResolver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ public function getPositions(int $categoryId): array
5151
}
5252

5353
/**
54-
* Get category product positions
54+
* Get category product minimum position
5555
*
5656
* @param int $categoryId
5757
* @return int
5858
*/
59-
public function getLastPosition(int $categoryId): int
59+
public function getMinPosition(int $categoryId): int
6060
{
6161
$connection = $this->getConnection();
6262

6363
$select = $connection->select()->from(
6464
['cpe' => $this->getTable('catalog_product_entity')],
65-
['position' => new \Zend_Db_Expr('MAX(position)')]
65+
['position' => new \Zend_Db_Expr('MIN(position)')]
6666
)->joinLeft(
6767
['ccp' => $this->getTable('catalog_category_product')],
6868
'ccp.product_id=cpe.entity_id'

0 commit comments

Comments
 (0)