<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="utf-8"/> <xsl:param name="html-content-type"/> <xsl:variable name="availableloops" select="'Products'" /> <xsl:template match="/Template"> <textarea> <xsl:copy-of select="." /> </textarea> </xsl:template> </xsl:stylesheet>
Developer forum
E-mail notifications
XSLT Cart Template, product loop missing
Michael Nielsen
Posted on 30/06/2011 11:22:56
I have the following xslt for a small cart (just outputting the xml for now). But the products loop is missing from the xml, so what am I doing wrong here?
Replies
Nicolai Høeg Pedersen
Posted on 30/06/2011 11:33:04
The cart does not have a Products loop - it has an Orderlines loop:
http://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Shopping-Cart-V2/Order/Cart/Loops/Orderlines.aspx
Each item in the orderline loop has some product tags.
http://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Shopping-Cart-V2/Order/Cart/Loops/Orderlines.aspx
Each item in the orderline loop has some product tags.
Michael Nielsen
Posted on 30/06/2011 11:59:28
D'oh... Of course...
But unfortunately replacing Products with Orderlines in availableloops doesn't change anything. The following loops are in the xml data
StepButtons
Ecom:NAVConnector:Messages
ValidationErrors
Countries
Paymethods
Shippingmethods
MissingProducts
But no Orderlines.
But unfortunately replacing Products with Orderlines in availableloops doesn't change anything. The following loops are in the xml data
StepButtons
Ecom:NAVConnector:Messages
ValidationErrors
Countries
Paymethods
Shippingmethods
MissingProducts
But no Orderlines.
Nicolai Høeg Pedersen
Posted on 30/06/2011 14:03:40
...and I assume that you added products to the cart?
Otherwise I need a link to see what is going on.
Otherwise I need a link to see what is going on.
Michael Nielsen
Posted on 30/06/2011 14:12:15
Hi Nicolai
Yes I've added products to the cart, but even if I had not, should the loop Orderlines not be present anayway but just empty?
But it can be seen on this page, the text-area holds the xml data
http://worldtv.net.dynamicweb-cms.com/tv-pakker/Nordisk-TV-Pakke.aspx
Yes I've added products to the cart, but even if I had not, should the loop Orderlines not be present anayway but just empty?
But it can be seen on this page, the text-area holds the xml data
http://worldtv.net.dynamicweb-cms.com/tv-pakker/Nordisk-TV-Pakke.aspx
Nicolai Høeg Pedersen
Posted on 30/06/2011 17:21:13
This post has been marked as an answer
The loop is called OrderLines and not Orderlines - that is why. There is an error in the documentation. I've changed your xslt template to the right casing, so now it is there.
You can always do like this to see all the loops available:
You can always do like this to see all the loops available:
<xsl:variable name="availableloops" select="'*'" />
Votes for this answer: 0
Michael Nielsen
Posted on 01/07/2011 09:07:29
Thanks a million... :-)
Lars Jensen
Posted on 01/07/2011 09:11:47
Iam so Happy!!
You must be logged in to post in the forum