Copied to clipboard

Flag this post as spam?

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


  • Liam Dilley 14 posts 85 karma points
    May 11, 2018 @ 07:58
    Liam Dilley
    0

    Getting Document type values from Product Option Choices

    Hi All, I am looking to do colour swatches for products. I have a shared product option - Colour with option values.

    I have associated a document type to the "Product Content Types" for that product option.

    This is simply a Colour Picker to be able to show the colours with the product options.

    I have the main loop which is fine:

    foreach (var option in Model.ProductOptions)
    

    And then I have a loop to loop the product choices:

    foreach (var choice in option.Choices){
    

    Inside the choices you can get its name for example @choice.Name

    But unlike the product itself with an associated document type:

    @Model.GetPropertyValue("ProductSockistName")
    

    Nothing I seem to do enables me to get custom values from the associated document type of a choice.

    I have found some references to choice.DetachedDataValues But I have not been able to use that to render anything out other then keys.

    Could someone please help put me on the right path please?

  • Liam Dilley 14 posts 85 karma points
    May 18, 2018 @ 01:24
    Liam Dilley
    0

    I was not able to resolve this myself

Please Sign in or register to post replies

Write your reply to:

Draft