Skip to content

Commit 0847c79

Browse files
committed
AC-872 Catalog product list widget sort order configured in backend does not match in frontend
1 parent 724953d commit 0847c79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/CatalogWidget/Block/Product/ProductsList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Magento\Catalog\Model\Product\Visibility;
1515
use Magento\Catalog\Model\ResourceModel\Product\Collection;
1616
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
17+
use Magento\Catalog\Model\Product\ProductList\Toolbar as ToolbarModel;
1718
use Magento\Catalog\Pricing\Price\FinalPrice;
1819
use Magento\CatalogWidget\Model\Rule;
1920
use Magento\Framework\App\ActionInterface;
@@ -31,7 +32,6 @@
3132
use Magento\Rule\Model\Condition\Sql\Builder as SqlBuilder;
3233
use Magento\Widget\Block\BlockInterface;
3334
use Magento\Widget\Helper\Conditions;
34-
3535
/**
3636
* Catalog Products List widget block
3737
*
@@ -343,7 +343,7 @@ public function createCollection()
343343
*/
344344
$collection = $this->_addProductAttributesAndPrices($collection)
345345
->addStoreFilter()
346-
->addAttributeToSort('entity_id', 'desc')
346+
->addAttributeToSort('position', 'asc')
347347
->setPageSize($this->getPageSize())
348348
->setCurPage($this->getRequest()->getParam($this->getData('page_var_name'), 1));
349349

0 commit comments

Comments
 (0)