-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Configurable attribute options are not sorted #7441 #12420
Conversation
Hi @larsroettig, there was a feedback #7441 (comment) such solution does not work in 2.2.x but hope you tried it in action :) |
@@ -97,6 +101,8 @@ public function getSelect(AbstractAttribute $superAttribute, int $productId, Sco | |||
)->where( | |||
'attribute.attribute_id = ?', | |||
$superAttribute->getAttributeId() | |||
)->order( | |||
'attribute_opt.sort_order ASC' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good to me.
Please update existing unit test: https://travis-ci.org/magento/magento2/jobs/306413370 and add a separate test method to just check options are returned in correct order.
After that please do an amend commit and force push to the same branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I already see maybe I add also a integrations test because only PHPUnit test makes not so much sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, something involving a real database would be more than appreciated here.
Hi @larsroettig, did you meet any obstacles with this PR? |
Closing due to inactivity. Feel free to reach me out anytime later if you wish to continue work on this pull request and it will be reopened. |
See github issue magento#7441, internal ticket MAGETWO-61484 and PR magento#12420.
Bugfix for #7441 - Configurable attribute options are not sorted
Steps to reproduce
Create a configurable attribute and add two options at least.
Create a configurable product for these options.
Go to the product page and see the configurable attribute select (options).
Change attribute options sort order and flush all caches.
Go to the product page and see the configurable attribute select (options) looks like before.
Expected result:
Configurable options HAVE been reordered.
Contribution checklist