Magento 2 - Sort by Brand and Position?
-
14-04-2021 - |
문제
Is it possible to sort by A the Brand alphabetically and then B by Position Programmatically.
올바른 솔루션이 없습니다
다른 팁
Yes, It is possible to sort by A the Brand alphabetically and then B by Position. As you can see this functionality is already implemented in Amasty's extension.
using collection you can sort and filter everthing. Here's the link to filter by attribute: https://www.mageplaza.com/devdocs/how-get-product-collection-magento-2.html
And here the sort by: $productCollection->addAttributeToSort('update_at', 'DESC')
Cheers
제휴하지 않습니다 magento.stackexchange