Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Gordon Saxby 1335 posts 1596 karma points
    Aug 02, 2018 @ 07:48
    Gordon Saxby

    Sort Variant Groups

    It seems as though GetVariantGroups returns the data in node Id order?

    Is it possible to return the variant groups in the order they appear in Umbraco? Or is there some other way that I can determine the order that the variant groups are retrieved in?

  • Rune Grønkjær 1297 posts 2864 karma points
    Aug 06, 2018 @ 07:46
    Rune Grønkjær

    Hi Gordon,

    Check out the TeaCommerce.Umbraco.Configuration.Variants.Services.AVariantService in Tea Commerce for Umbraco to see how it works. You can always make your own implementation if you need something a little different.

    Or you can get the IPublishedContent's afterwards and do your own sorting.


  • Gordon Saxby 1335 posts 1596 karma points
    Oct 12, 2018 @ 13:04
    Gordon Saxby

    Hi Rune,

    this issue has resurfaced and I think I need more help in order to solve it. Because we use the "Combinations" array and the order of the data in it, I think I need to override the default sorting by node Id. I need it to be returned in the order the Variant Groups / Types appear in Umbraco.

    I have started to look at the code you pointed to above, but I would be very grateful for some sort of starting point example, if possible!?

  • Anders Burla Johansen 2560 posts 8256 karma points
    Oct 23, 2018 @ 12:28
    Anders Burla Johansen

    Hi Gordon

    The code that Rune sent a reference to is what is used in Tea Commerce. We don't have code examples of how to do it differently. So you will have to give it a try again or write to about paid support/help.

    Kind regards


Please Sign in or register to post replies

Write your reply to: