Copied to clipboard

Flag this post as spam?

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


  • Paul Merks 35 posts 100 karma points
    Sep 23, 2019 @ 12:37
    Paul Merks
    1

    Umbraco 8 Nested Content update property value

    Hi,

    I'm using Umbraco 8 to store Webshop Products. Within Product I have a nested content with Product Variants and within those variants I have created nested content with Product Variant Values. Example structure;

    Product X (documenttypealies Product): - Variant Color (type alias ProductVariant: -- Variant value Red (type alias ProductVariantValue) -- Variant value Blue - Variant Size: -- Variant value L --- Variant value XL

    Now I store a property Stock on both the Product level and Product Variant Value level. In case a product gets ordered, I want to substract the ordered amount from the correct size and color nested content item.

    I'm able to read all the Product X nested content values, but I have no idea how to set a specific value within the ProductVariantValue level. I've seen some examples of serializing the property value, but this feels a bit overkill. Isn't there any simple method to update a value within a certain nested content item?

    Regards,

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft