Magento Expert Forum - Improve your Magento experience
-
How to Sort Magento 2 Layered Navigation Attributes Programmatically
The accompanying post is an answer to the request for the qualities in the layered route on the class list page.
For instance, you need to change the arrangement in 1-9 and a-z of the Magento 2 Sort Layered Navigation Attributes Programmatically on the classification page. The sole reason for this arrangement is to facilitate the inquiry of the clients and furnish them with a better client experience. We should figure out this with a model: In the event that you have a store selling cell phones of the different brands and you have empowered the brand choices in the layered route. Showing the brand name in arranging requests makes it simple for the clients to choose and channel the cell phones of the particular brands.
On the off chance that the character doesn't have a custom source, it utilizes the default source class which is \Magento\Eav\Model\Entity\Attribute\Source\Table
The capability attributeOptionCollection is made on which a capability setPositionOrder($dir, $sortAlpha) is called and all the quality choices are returned in this capability.
In this capability, I have hardcoded sort request of the choices assortment - $this->setOrder('main_table.sort_order', $dir);
For more info: https://meetanshi.com/blog/sort-mage...grammatically/
View more threads in the same category:
- buy a USA/UK passport online( https://legitcleandocs.com)visa, SNN, id card
- buy registered drivers license online(legitcleandocs.com)passport,IELTS certific
- Kubota Special Equipment repair instructions
- buy registered drivers license (legitcleandocs.com)IELTS, id
- Buy Passport,Driver License,Age & ID Card,(Whatsap
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
- Zw3d|올인 원, 합리적인 가격의 cad/cam 솔루션 | 한컴
- buy real passports online(https://legitcleandocs.com)drivers license, visa, id card
- BUY UNDETECTABLE GRADE A+ COUNTERFEIT BANKNOTE(legitcleandocs.com)
- buy real registered drivers license online(legitcleandocs.com)visa, id card, resident
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks