For example, if you have thousands of colors (options) in the color attribute, it becomes a pain to use the drag & drop sorting functionality.
I'd like to override the default sorting (based on option position) to sort by attribute label alphabetically for all attributes.
I did some digging around in core files, but couldn't locate the class or function which does this.
Any ideas where this functionality is inside Magento's core?
- 
 Hi, Im also interested in this. Did you manage to find any solution?Brendan Bell– Brendan Bell2018年05月08日 23:06:22 +00:00Commented May 8, 2018 at 23:06
 - 
 @user1517598 No, what I ended up doing was to give all attribute options the same position (0) with SQL. This sorted the options alphabetically. Then I just moved the 1st option to the 2nd position via drag & drop, and all attributes got their position based on alphabet. This is just a "one time fix" but it might help...Lez– Lez2018年05月09日 06:25:22 +00:00Commented May 9, 2018 at 6:25
 - 
 Hi, Appreciate the response. We have attributes with 100's of values. Your solution is good. I think Ill see if I can get some javascript written to resolve this. For example. On an attribute view, when open, have a button that when selected, resorts the list either Asc or Desc Then you select save. Basically takes the array of values and re-orders list. Ill update this post when I have something to show. CheersBrendan Bell– Brendan Bell2018年05月10日 23:17:05 +00:00Commented May 10, 2018 at 23:17
 - 
 @BrendanBell sounds like a reasonable solution. Would be great if you could share it when you're done. Cheers!Lez– Lez2018年05月11日 07:27:34 +00:00Commented May 11, 2018 at 7:27
 - 
 Lez, Did you ever find the answer for this? Is there code anywhere for this? Brendan Bell, where is your code?Jonathan– Jonathan2020年09月30日 18:59:22 +00:00Commented Sep 30, 2020 at 18:59
 
2 Answers 2
you can download this module https://github.com/nhutnguyenvu/alphabet-option. It allows you can sort any attributes by alphabet (desc, asc) or position
So I have had a development done to make the usability of product attributes with "many" options a lot simpler.
Essentially I have added Sort button, see below. It takes the list of items and resorts in Alphabetical order.
Before Change
Before Change After Selecting Button
After the list is resorted, just hit the save button.
If your interested in code, just message me to work something out.
Regards
- 
 Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.Lez– Lez2018年06月05日 08:26:38 +00:00Commented Jun 5, 2018 at 8:26
 - 
 Hi Sir, I Nee this codeShafeel Sha– Shafeel Sha2019年06月28日 10:29:02 +00:00Commented Jun 28, 2019 at 10:29