Question

Is it possible to sort by A the Brand alphabetically and then B by Position Programmatically.

No correct solution

OTHER TIPS

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.

https://amasty.com/shop-by-brand-for-magento-2.html

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

Yes, I am user for alphabetically shop by brand extension.please try to this extension

https://github.com/zekinah/magento2-AdvancedSortby

https://github.com/boolfly/brand

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top