2

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

http://i.prntscr.com/zDuYTVDbSWqv_507ew0JbQ.png

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.

0

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

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.