I want to sort the attributes in layered navigation in the alphabetical order.


Sort in the order as:Climate, Color, ...

I tried to override the setPositionOrder() in \Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\Collection using before.

Ref:How to sort layered navigation attributes on Alphabetic order

My magento version is 2.3

But it didn't work. How can I do that? Please help.


For this,You need to override the getList() function in /vendor/magento/module-catalog/Model/Layer/Search/FilterableAttributeList.php

| improve this answer | |
  • it's code not working it please help me how to specific attribute option filter by alphabetically – Rv Singh May 28 '19 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.