Skip to content

Product list sort order is saved but not used #21076

@michi-p

Description

@michi-p

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CatalogIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions