Copied to clipboard

Flag this post as spam?

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


  • Carlos Mosqueda 240 posts 431 karma points
    Dec 15, 2017 @ 17:20
    Carlos Mosqueda
    1

    Latest Merchello and Umbraco 7.7.6, and how do you create product variants with different prices?

    This is probably an easy one, but I can not figure out the process to configure product variants with different prices. Something like a T-Shirt with 4 sizes (Small, Medium, Large, X-Large), and the X-Large size is a $1 or 2 more than the other sizes.

    Can anyone point me on the process to make product variants, and product variants with different prices?

  • Alex Clavelle 13 posts 124 karma points
    Dec 29, 2017 @ 19:28
    Alex Clavelle
    0

    Any updates on this?

  • Integrater 9 posts 79 karma points
    Jan 03, 2018 @ 07:48
    Integrater
    0

    Something like this

    var atrKey = newProduct.ProductOptions.ElementAt(newProduct.ProductOptions.FindIndex(x => x.Name == "Ammount"));

            if (atrKey != null)                 //sredi!
            {
                foreach (var variant in newProduct.ProductVariants)
                {
                    var atr = variant.Attributes.ElementAt(variant.Attributes.FindIndex(x => x.OptionKey == atrKey.Key)).Name;
                    switch (atr)
                    {
                        case "250g":
                            {
                                variant.Price = 14;                     //temp price for 250gr pack
                                break;
                            }
                        case "400g":                                    //temp price for 400gr pack
                            {
                                variant.Price = 22;
                                break;
                            }
                        case "500g":                                    //temp price for 500gr pack
                            {
                                variant.Price = 25;
                                break;
                            }
                        case "1000g":                                    //temp price for 1000gr pack
                            {
                                variant.Price = 50;
                                break;
                            }
                        default:
                            {
                                break;
                            }
                    }
                }
            }
    
  • Carlos Mosqueda 240 posts 431 karma points
    Jan 03, 2018 @ 16:01
    Carlos Mosqueda
    0

    Is there a way to do this on a product configuration in the admin panel, instead of hard coding the prices? I thought variant pricing would be built into Merchello or any other eCommerce solution

  • Integrater 9 posts 79 karma points
    Jan 04, 2018 @ 12:02
    Integrater
    0

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft