magento2: Product list sort order is saved but not used

Preconditions (*)

  1. Magento CE version 2.2.6
  2. PHP 7.1.25
  3. At least two categories with an arbitrary number of products each.

Steps to reproduce (*)

  1. Open a category in your shop (e. g. shop.example.com/food.html)
  2. Change the sort order (e. g. from ‘position’ to ‘name’). URL changes to shop.example.com/food.html?product_list_order=name
  3. Switch to other category (e. g. shop.example.com/drinks.html)

Expected result (*)

  1. The products of the category drinks should be shown sorted by their names

Actual result (*)

  1. The products of the category drinks are 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)

Most upvoted comments

@fritzmg 2.3-develop, this would be a feature request and need to be cover with tests.