Copied to clipboard

Flag this post as spam?

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


  • Peter van den Dungen 66 posts 365 karma points
    Apr 04, 2022 @ 17:47
    Peter van den Dungen
    0

    Custom property per orderline

    Hi,

    Customers can choose some customizations f.e printing (like names or whatever) on t-shirts.

    Where do I store such information?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Apr 05, 2022 @ 07:59
    Matt Brailsford
    1

    Hi Peter,

    Orders and Order Lines contain a properties collection that you can store any information in that you need https://vendr.net/docs/core/2.1.0/umbraco-v9/key-concepts/properties/

    You can pass them in as part of the "AddProduct" call

  • Peter van den Dungen 66 posts 365 karma points
    Apr 14, 2022 @ 20:28
    Peter van den Dungen
    0

    Hi Matt,

    I looked at this again today and it got a little bit more complex, where I could use a push in the right direction.

    The store sells clothes, for which you can choose an optional print. This printing can vary in font or color, which is then linked to a different price.

    My very first tought on this, was to use:

    1. Adding the printing options as properties. (font, size, color, position etc)
    2. Saving the product & variant reference in combination with a BundleId in order to create unique orderlines with their own quantity. (this is for separating same products with other printings)
    3. Calcultating additional printing fees in the calculation pipeline.

    But it feels a bit hacky to me.

    Another approach could be:

    1. Adding the pricing options as 'products'.
    2. Saving the printing options as properties.
    3. BundleId in order to map a orderline to a real product.

    What would you do? Any idea's?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Apr 15, 2022 @ 08:05
    Matt Brailsford
    0

    Hmmm, is each of the options a specific price such that each one can have a price and it’s added to the base product price? Or can different combinations create different prices that aren’t constant?

  • Peter van den Dungen 66 posts 365 karma points
    Apr 15, 2022 @ 09:53
    Peter van den Dungen
    0

    There are several simple options to choose:

    1. Printing front $5
    2. Printing back $5
    3. Add smiley $10
    4. Add image $15

    You should be able to combine above options. Selection option 1 and 3 should add an additional fee of $15 to the orderline, that simple so there are no conditional prices.

    The solution in terms of price does not matter that much to me, as long as you can see what you get(buy) in the shopping cart (and invoice).

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Apr 15, 2022 @ 11:53
    Matt Brailsford
    100

    Ok, then I think I'd be tempted to set these all up as individual products and use bundles to combine them.

    Something along these lines

    Website
    - Products
    --- Product 1 - $20 (base price)
    --- Product 2 - $20 (base price)
    --- Product 3 - $20 (base price)
    Options
    - Front Print - $5.00
    - Back Print - $5.00
    - Image Option - $15.00

    You could then link "Options" to a product with something like a MNTP to say which options are available.

    Then, when it comes to adding these things to a cart, you'd create a "bundle id" (can be anything really, simplest option is probably a Guid) and then add the base product giving it that bundle ID. I'd then add the selected options to that bundle (so they appear beneath the main product order line). You could add any option specific settings, such as the selected color / size etc as properties either on the main product, or on the option sub order lines depending on what makes most sense.

    As the options are added as bundle items to the main product, Vendr will automatically sum these all up together and give you the correct total for the product + option combination.

    As a general rule, if something doesn't affect the price, I tend to suggest storing those as properties on the order line, but if they need their own price, wither use product variant editor if there are fixed combinations of the options, or bundles if there is a flexible configuration of those options.

    Hope this helps

    Matt

  • Peter van den Dungen 66 posts 365 karma points
    Apr 15, 2022 @ 15:43
    Peter van den Dungen
    0

    Thanks Matt, I will dive into this soon, will let you know!

  • Peter van den Dungen 66 posts 365 karma points
    Apr 21, 2022 @ 11:03
    Peter van den Dungen
    0

    Working fine!

Please Sign in or register to post replies

Write your reply to:

Draft