• Resolved arnevanhoorn

    (@arnevanhoorn)


    Hi!

    We are having some troubles with the sort order of attributes.
    If I view the product in wp-admin I see that art.nr 22150 has color “Weed”, 22151 has “Silt” and 22152 has “Gravel”.

    I did some debugging and I see that the attributes are returned order alphabetically which isn’t correct.

    [artikelnummer] => WC_Product_Attribute Object
    (
    [data:protected] => Array
    (
    [id] => 0
    [name] => Artikelnummer
    [options] => Array
    (
    [0] => 22150
    [1] => 22151
    [2] => 22152
    )

    [position] => 0
    [visible] => 1
    [variation] => 1
    )

    )
    [kleur] => WC_Product_Attribute Object
    (
    [data:protected] => Array
    (
    [id] => 0
    [name] => Kleur
    [options] => Array
    (
    [0] => Gravel
    [1] => Silt
    [2] => Weed
    )

    [position] => 3
    [visible] => 1
    [variation] => 1
    )

    )

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Praveen a11n

    (@spraveenitpro)

    Automattic Happiness Engineer

    Hi @arnevanhoorn,

    Are you looking to change the order of the terms being returned? You can change the order of the terms being returned like this: http://cld.wthms.co/daxfwI

    if the above approach does not work then you can try deactivating all the plugins except for WooCommerce and then checking if the same behaviour persists.

    Cheers!

    Thread Starter arnevanhoorn

    (@arnevanhoorn)

    Hi Praveen,

    Unfortunately, your options don’t fix my problem.
    As you can see, the “artikelnummer” array returns
    [0] => 22150
    [1] => 22151
    [2] => 22152

    The “kleur” array returns
    [0] => Gravel
    [1] => Silt
    [2] => Weed

    But in the backend, the following variations are available:
    artno: 22150 – kleur “Weed”
    artno: 22151 – kleur “Gravel”
    artno: 22151 – kleur “Silt”

    Thread Starter arnevanhoorn

    (@arnevanhoorn)

    I still have these issues.
    Does anyone else have a solution?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sort order of attributes’ is closed to new replies.