Copied to clipboard

Flag this post as spam?

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


  • Tom Maton 387 posts 660 karma points
    Dec 06, 2011 @ 15:19
    Tom Maton
    0

    Getting uComponent multinodepicker data in uWebShop product

    Hi All,

    I'm probably mising something so simple here but for the life of me I can figure out whats wrong.

    I've got Umbraco 4.7.1 running uWebShop & uComponents

    I've go the uComponents Multi Tree Picker selecting multiple images from the media folder - works like a charm

    I've got the above (uComponents Multi Tree Picker) on a catalog --> product doc type from uWebShop and it works and saves - sweet!! So that is working.

    I'm on my product page the xml returned is:

    <MultiImages>
      <MultiNodePicker>
        <nodeId>2692</nodeId>
        <nodeId>2693</nodeId>
        <nodeId>2694</nodeId>
      </MultiNodePicker>
    </MultiImages> 

    So with this is mind I thought I could do 

    MultiImages//nodeId

    But when doing this nothing is returned, any help would be greatly appreciated as I'm pulling my hair out now as this works on another doctype but not this even though the data is there!!

    Thanks,

    Tom

  • Rich Green 2246 posts 4008 karma points
    Dec 06, 2011 @ 15:23
    Rich Green
    1

    Hey Tom,

    Strange.

    What about if you use the default code

    <!-- First we check that the Multi-node Tree Picker has any nodeId values -->

    <xsl:if test="$currentPage/MultiImages/MultiNodePicker/nodeId">

    Getting value

    <xsl:for-each select="$currentPage/MultiImages/MultiNodePicker/nodeId">

     

    Getting child values

    <xsl:variable name="node" select="umbraco.library:GetXmlNodeById(.)" />

     

    <!-- Output the URL using umbraco.library's NiceUrl method -->

    <a href="{umbraco.library:NiceUrl(.)}">

    <xsl:value-of select="$node/@nodeName" />

    </a>

    </xsl:for-each>

    </xsl:if>

     

    Rich

  • Tom Maton 387 posts 660 karma points
    Dec 06, 2011 @ 15:41
    Tom Maton
    0

    Hey Rich,

    You've pointed me in the right direction mate. So 99% there - you've saved the rest of my hair :)

    What I needed to do was "umbraco.library:GetXmlNodeById($currentProductId)" 

    Which is wierd as the uWebshop call returns the exact same XML as the GetXmlNodeById minus the "_ShopName" fixed to the end of the xml elements

    Thanks,

    Tom

  • Rich Green 2246 posts 4008 karma points
    Dec 06, 2011 @ 15:45
    Rich Green
    0

    Hey Tom,

    Glad to help :)

    Rich

Please Sign in or register to post replies

Write your reply to:

Draft