Copied to clipboard

Flag this post as spam?

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


  • Ravi Motha 289 posts 499 karma points MVP 4x c-trib
    Mar 25, 2012 @ 18:28
    Ravi Motha
    0

    Is there a simple list of all the out of the box orderline properties

    I am setting up my cart, I can get the correct quantities , for orders added to my cart, but the totals are not showing.

    I am adding the contents using the javascript api

         TeaCommerce.addOrderLine(nodeId, oQuantity, false);

     

    However using the standard cart Xslt with a few tweaks I am getting empty price fields

        <xsl:for-each select="$order/orderLine">  
                                <xsl:variable name="productNode" select="umbraco.library:GetXmlNodeById(@nodeId)"/>
                             
                              
                               
                                <div class="cartLine">
                                    <span class="ItemName">
                                        <xsl:value-of select="$productNode/productName" /> (p/n:<xsl:value-of select="properties/productNumber" />) <br />
                                        <xsl:value-of select="$productNode/productDescription" />
                                    </span>
                                    &gt;
                                    <span class="ItemPrice">
                                        <xsl:value-of select="$productNode/productPrice" /> -
                                  
                                    </span>
                                    &gt;
                                    <span class="ItemQuantity">
                                        <xsl:value-of select="@quantity" />
                                    </span>
                                    &gt;
                                    <span class="ItemSubs">
                                        Subtotal :
                                        <xsl:value-of select="@totalPriceFormatted" />
                                    </span>
                                    &gt;
                                    <!--Item Price : <xsl:value-of select="/properties/productPrice"/>
                                    Product Number:  <xsl:value-of select="properties/productNumber" />
                                    Product Quantity : <input type="text" class="productQuantity" value="{@quantity}" lastvalue="{@quantity}" /> quantity <xsl:value-of select="$totalQuantity" />
                                --></div>
                            </xsl:for-each>

                            <br />
                            Total: <xsl:value-of select="$order/@totalPriceFormattedNoSymbol"/>

     

    feel free to point out what I am missing, it's going t be something silly

     

    Ravi

     

  • Rune Grønkjær 1303 posts 2895 karma points
    Mar 26, 2012 @ 08:28
    Rune Grønkjær
    0

    Hi Ravi,

    Yes, it looks like something silly :)

    You are not using the $productNode variable when selecting the quantity and price. You need to do this:
    <xsl:value-of select="$productNode/@quantity" />

    By the way. What is the "productPrice" property? A better one would be "$productNode/@unitPriceFormatted".

    A good way to both debug and find your possibilities is to use the copy of tag:
    <xsl:copy-of select="$productNode" />

    When using that you can view the page source in the browser and then see all XML of you select.

    /Rune

  • Ravi Motha 289 posts 499 karma points MVP 4x c-trib
    Mar 26, 2012 @ 16:57
    Ravi Motha
    0

    Cheers Rune, I XLST not my first love.. it's always been that way. i always have trouble with ancestors and what is available..

     

    grins

  • Rune Grønkjær 1303 posts 2895 karma points
    Mar 27, 2012 @ 08:02
    Rune Grønkjær
    0

    Yeah, it can be pretty confusing until you get the hang of it :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies