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 290 posts 500 karma points MVP 8x 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 1372 posts 3103 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 290 posts 500 karma points MVP 8x 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 1372 posts 3103 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 :)

Please Sign in or register to post replies

Write your reply to:

Draft