1 vote

Magento2.4.2: How to sort product by custom price attribute?

You didn't reset collection order before apply your custom order In your case you can extends from \Magento\VisualMerchandiser\Model\Sorting\AttributeAbstract and implements getSortField, ...
user avatar
1 vote

Magento2.4.2: How to sort product collection by sub category as shown in this picture?

It's a really strange logic in sort method Potential issues with code are: You need to clone product collection before try to iterate it category_id will be the same for all products because it's a ...
user avatar
1 vote

Mageto2:How to Sort products by regular price?

Oh man, again question from you about the same topic and without any answers This code should work and I think here is everything is OK I just can suggest to use correlation table for price field for ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible