magento2: Product list sort order is saved but not used
Preconditions (*)
- Magento CE version 2.2.6
- PHP 7.1.25
- At least two categories with an arbitrary number of products each.
Steps to reproduce (*)
- Open a category in your shop (e. g. shop.example.com/food.html)
- Change the sort order (e. g. from ‘position’ to ‘name’). URL changes to shop.example.com/food.html?product_list_order=name
- Switch to other category (e. g. shop.example.com/drinks.html)
Expected result (*)
- The products of the category
drinksshould be shown sorted by their names
Actual result (*)
- The products of the category
drinksare shown sorted by position (default value)
Additional information
The function \Magento\Catalog\Block\Product\ProductList\Toolbar::getCurrentOrder calls the method _memorizeParam where the selected sort order is saved in the catalog session. (It’s not disabled in my case, the function setData is called and the saved value is correct as well).
However, this session value seems to be not used again anywhere.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 22 (9 by maintainers)
@fritzmg 2.3-develop, this would be a feature request and need to be cover with tests.