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.
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>
>
<span class="ItemPrice">
<xsl:value-of select="$productNode/productPrice" /> -
</span>
>
<span class="ItemQuantity">
<xsl:value-of select="@quantity" />
</span>
>
<span class="ItemSubs">
Subtotal :
<xsl:value-of select="@totalPriceFormatted" />
</span>
>
<!--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
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
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
Yeah, it can be pretty confusing until you get the hang of it :)
is working on a reply...