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 1444 posts 1855 karma points
    Aug 02, 2018 @ 07:48
    Gordon Saxby
    0

    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 1371 posts 3102 karma points
    Aug 06, 2018 @ 07:46
    Rune Grønkjær
    0

    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. https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/

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

    /Rune

  • Gordon Saxby 1444 posts 1855 karma points
    Oct 12, 2018 @ 13:04
    Gordon Saxby
    0

    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 2560 posts 8256 karma points
    Oct 23, 2018 @ 12:28
    Anders Burla
    0

    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 [email protected] about paid support/help.

    Kind regards

    Anders

Please Sign in or register to post replies

Write your reply to:

Draft