How to change the default products ordering direction on the frontend product lists from ascending to descending?

frontend-product-list
product
sort-by
(Shuai Zend) #1

0 Likes

(Dmitry Fedyuk) #2

Use the \Magento\Catalog\Block\Product\ProductList\Toolbar::setDefaultDirection() method:

For a detailed description see how is the «Sort By» control implemented on the frontend product lists.

Usage examples

1

2

0 Likes

(Shuai Zend) #3

thank you.
i fixed.

0 Likes

(Dmitry Fedyuk) #4

If you will change a core file then it will break the possibility to update Magento, or your changes will be broken by a Magento update.

0 Likes