How to sort attribute options in Magento 2 alphabeticallyMagento Product custom attribute options not showing up in adminMagento sort attribute - get urlProduct attribute with dynamic optionsMagento query to sort products alphabeticallyMagento 2 : How to save swatch_text attribute options programatically?Magento2.2.3 attribute options sort orderMagento 2 sort optionsMagento 2 Product Form Categories Sort Alphabetically From the BackendMagento 2 :Sort Attributes Alphabetically in layered NavigationHow to sort Export options lists in Magento 2

Is it okay to roll multiple attacks that all have advantage in one cluster?

What is the meaning of “Can I have a slice?” In NYC?

Is it better in terms of durability to remove card+battery or to connect to charger/computer via USB-C?

VHDL: is there a way to create an entity into which constants can be passed?

When I press the space bar it deletes the letters in front of it

When did "&" stop being taught alongside the alphabet?

What happens to unproductive professors?

Run Bash scripts in folder all at the same time

Can Jimmy hang on his rope?

Adjust the Table

Why is a mixture of two normally distributed variables only bimodal if their means differ by at least two times the common standard deviation?

First Entry Member State schengen visa

Moving millions of files to a different directory with specfic name patterns

I make billions (#6)

Would a carnivorous diet be able to support a giant worm?

Appropriate conduit for several data cables underground over 300' run

Why does Trump want a citizenship question on the census?

Distinguish the explanations of Galadriel's test in LotR

User Vs. Connected App

This LM317 diagram doesn't make any sense to me

How insert vertex in face?

When an electron changes its spin, or any other intrinsic property, is it still the same electron?

How to convert diagonal matrix to rectangular matrix

An integral that needs subtitution to be solved.



How to sort attribute options in Magento 2 alphabetically


Magento Product custom attribute options not showing up in adminMagento sort attribute - get urlProduct attribute with dynamic optionsMagento query to sort products alphabeticallyMagento 2 : How to save swatch_text attribute options programatically?Magento2.2.3 attribute options sort orderMagento 2 sort optionsMagento 2 Product Form Categories Sort Alphabetically From the BackendMagento 2 :Sort Attributes Alphabetically in layered NavigationHow to sort Export options lists in Magento 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















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?










share|improve this question
























  • Hi, Im also interested in this. Did you manage to find any solution?

    – Brendan Bell
    May 8 '18 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
    May 9 '18 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. Cheers

    – Brendan Bell
    May 10 '18 at 23:17











  • @BrendanBell sounds like a reasonable solution. Would be great if you could share it when you're done. Cheers!

    – Lez
    May 11 '18 at 7:27

















0















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?










share|improve this question
























  • Hi, Im also interested in this. Did you manage to find any solution?

    – Brendan Bell
    May 8 '18 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
    May 9 '18 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. Cheers

    – Brendan Bell
    May 10 '18 at 23:17











  • @BrendanBell sounds like a reasonable solution. Would be great if you could share it when you're done. Cheers!

    – Lez
    May 11 '18 at 7:27













0












0








0








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?










share|improve this question
















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?







magento2 admin product-attribute






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 12 '18 at 9:30







Lez

















asked Mar 25 '18 at 16:05









LezLez

1,5608 silver badges32 bronze badges




1,5608 silver badges32 bronze badges












  • Hi, Im also interested in this. Did you manage to find any solution?

    – Brendan Bell
    May 8 '18 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
    May 9 '18 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. Cheers

    – Brendan Bell
    May 10 '18 at 23:17











  • @BrendanBell sounds like a reasonable solution. Would be great if you could share it when you're done. Cheers!

    – Lez
    May 11 '18 at 7:27

















  • Hi, Im also interested in this. Did you manage to find any solution?

    – Brendan Bell
    May 8 '18 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
    May 9 '18 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. Cheers

    – Brendan Bell
    May 10 '18 at 23:17











  • @BrendanBell sounds like a reasonable solution. Would be great if you could share it when you're done. Cheers!

    – Lez
    May 11 '18 at 7:27
















Hi, Im also interested in this. Did you manage to find any solution?

– Brendan Bell
May 8 '18 at 23:06





Hi, Im also interested in this. Did you manage to find any solution?

– Brendan Bell
May 8 '18 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
May 9 '18 at 6:25





@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
May 9 '18 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. Cheers

– Brendan Bell
May 10 '18 at 23:17





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. Cheers

– Brendan Bell
May 10 '18 at 23:17













@BrendanBell sounds like a reasonable solution. Would be great if you could share it when you're done. Cheers!

– Lez
May 11 '18 at 7:27





@BrendanBell sounds like a reasonable solution. Would be great if you could share it when you're done. Cheers!

– Lez
May 11 '18 at 7:27










1 Answer
1






active

oldest

votes


















0














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 ChangeAfter Selecting Button



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






share|improve this answer























  • Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.

    – Lez
    Jun 5 '18 at 8:26











  • Hi Sir, I Nee this code

    – Shafeel Sha
    Jun 28 at 10:29













Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f219773%2fhow-to-sort-attribute-options-in-magento-2-alphabetically%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














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 ChangeAfter Selecting Button



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






share|improve this answer























  • Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.

    – Lez
    Jun 5 '18 at 8:26











  • Hi Sir, I Nee this code

    – Shafeel Sha
    Jun 28 at 10:29















0














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 ChangeAfter Selecting Button



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






share|improve this answer























  • Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.

    – Lez
    Jun 5 '18 at 8:26











  • Hi Sir, I Nee this code

    – Shafeel Sha
    Jun 28 at 10:29













0












0








0







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 ChangeAfter Selecting Button



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






share|improve this answer













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 ChangeAfter Selecting Button



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







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 4 '18 at 23:32









Brendan BellBrendan Bell

813 bronze badges




813 bronze badges












  • Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.

    – Lez
    Jun 5 '18 at 8:26











  • Hi Sir, I Nee this code

    – Shafeel Sha
    Jun 28 at 10:29

















  • Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.

    – Lez
    Jun 5 '18 at 8:26











  • Hi Sir, I Nee this code

    – Shafeel Sha
    Jun 28 at 10:29
















Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.

– Lez
Jun 5 '18 at 8:26





Glad you found a permanent solution for this, but I'm not really interested in paid solutions, thanks for the offer though.

– Lez
Jun 5 '18 at 8:26













Hi Sir, I Nee this code

– Shafeel Sha
Jun 28 at 10:29





Hi Sir, I Nee this code

– Shafeel Sha
Jun 28 at 10:29

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f219773%2fhow-to-sort-attribute-options-in-magento-2-alphabetically%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form