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, ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
magento2.2 × 2442magento2 × 969
magento-2.1 × 152
magento2.3 × 137
php-7 × 122
php × 82
checkout × 76
product × 66
database × 58
module × 56
layout × 51
uicomponent × 50
admin × 48
rest-api × 47
product-attribute × 45
customer × 43
error × 42
sales-order × 41
magento2.2.6 × 40
frontend × 39
magento2.2.2 × 39
javascript × 36
orders × 36
api × 36
configurable-product × 35