Go to Admin page > Products > Attributes. Presumably “Default sort order” is set to “Name”, set it to “Custom ordering”.
Thanks Lorro, but I don’t think I’ve explained my situation well.
I have already set my ordering to Custom ordering but it doesn’t solve the problem.
Here is the scenario. Imagine I’m listing two sweaters.
Sweater #1 has a content blend of 70% wool and 30% cashmere. I want the first attribute value listed as Wool because there is a greater content of wool in my item. So my listed attribute values would be [Wool] [Cashmere].
Sweater #2 has 70% Cashmere and 30% Wool. In this case I’d want Cashmere to be the first listed attribute value. My attribute values should look like this: [Cashmere] [Wool].
So, in these two cases there is no appropriate custom ordering that would fulfill my request. The only way to do this is to eliminate the re-ordering of attribute values altogether.
As it is right now both will be re-ordered [Cashmere] [Wool], and so the plugin will send a value of Cashmere for both sweaters since it passes the value in position 1.
Does that help make more sense of the issue?
I have another site where my products are displayed, so on the listing site the ordering of attributes does not matter.
I found this file which seems to control the terms ordering:
woocommerce/includes/wc-term-functions.php
If need be, I’m ok commenting out anything that would control the re-ordering for this specific case.
-
This reply was modified 8 years ago by cactusview.
-
This reply was modified 8 years ago by cactusview.
Yes, custom ordering allows you to set up any order but from then on it will be the same order for each product, which I can now see is not what you want. It look’s like you want a no-sort option.
Re-writing parts of wc-term-functions.php with a no-sort option is a bit big a job for a forum answer. Also, I’d be reluctant to go that way because, unlike a template, its not a file that can be protected from being overwritten by woocommerce updates.
Would setting up two attribute sets help, one custom sorted to have Wool first, the other with Cashmere first?
Yes I was afraid of that. Unfortunately my site could have thousands of products, so the number of possible combinations would be too large to make custom attribute sets.
I was hoping it might simply be one small section that could get commented out in the file, but if not and it needs a re-write as you suggest we’ll look into that.