File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/Catalog/Model/Category/Product Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,18 +51,18 @@ public function getPositions(int $categoryId): array
51
51
}
52
52
53
53
/**
54
- * Get category product positions
54
+ * Get category product minimum position
55
55
*
56
56
* @param int $categoryId
57
57
* @return int
58
58
*/
59
- public function getLastPosition (int $ categoryId ): int
59
+ public function getMinPosition (int $ categoryId ): int
60
60
{
61
61
$ connection = $ this ->getConnection ();
62
62
63
63
$ select = $ connection ->select ()->from (
64
64
['cpe ' => $ this ->getTable ('catalog_product_entity ' )],
65
- ['position ' => new \Zend_Db_Expr ('MAX (position) ' )]
65
+ ['position ' => new \Zend_Db_Expr ('MIN (position) ' )]
66
66
)->joinLeft (
67
67
['ccp ' => $ this ->getTable ('catalog_category_product ' )],
68
68
'ccp.product_id=cpe.entity_id '
You can’t perform that action at this time.
0 commit comments