I am trying to set up the order confirmation to be emailed to the user after they have payed for their order. I have a basic email being sent using an xslt file and teh email options in tea commerce emails section fine but this only includes text I can't get any of the order information displayed I have tried using
but these doen give me a value when i use example <xsl:value-of select="$order/properties/company" />
I have also tried <xsl:param name="order"/> but i get an error System.Xml.Xsl.XslTransformException: Expression must evaluate to a node-set
Is the order finalized by the time the email is sent, can you see why i'm not getting a value, do I have to use XSLT to wrtie the email template I much prefer working with razor or c#
When you have the email templates we pass in the order as a parameter as like currentPage in umbraco. Try look at the teaCommerceEmailTemplate in the xslt files. There you have the param "order". Try and do an xslt copy-of to see what data you have. http://www.w3schools.com/xsl/el_copy-of.asp
The xslt error is just because the way umbraco tries to save the xslt file and test it and validate it. Just check the ignore errors and it should work as you expect.
Thanks I have pretty much the whole email working just threw me when umbraco was erroring when i tried so save the file. The only bit I have left now is how to show the variants in my razor code I have been using
var material = @orderline.Properties.Single(p => p.Alias.Equals("productMaterial") && p.UmbracoLanguageId == order.UmbracoLanguageId).Value; var colour = @orderline.Properties.Single(p => p.Alias.Equals("productColour") && p.UmbracoLanguageId == order.UmbracoLanguageId).Value; var finish = @orderline.Properties.Single(p => p.Alias.Equals("productFinish") && p.UmbracoLanguageId == order.UmbracoLanguageId).Value; var size = @orderline.Properties.Single(p => p.Alias.Equals("productSize") && p.UmbracoLanguageId == order.UmbracoLanguageId).Value; var version = @orderline.Properties.Single(p => p.Alias.Equals("productVersion") && p.UmbracoLanguageId == order.UmbracoLanguageId).Value;
email confirmation
I am trying to set up the order confirmation to be emailed to the user after they have payed for their order. I have a basic email being sent using an xslt file and teh email options in tea commerce emails section fine but this only includes text I can't get any of the order information displayed I have tried using
<xsl:variable name="order" select="teacommerce:GetFinalizedOrderXml()" />
and
<xsl:variable name="order" select="teacommerce:GetOrderXml()" />
but these doen give me a value when i use example <xsl:value-of select="$order/properties/company" />
I have also tried <xsl:param name="order"/> but i get an error System.Xml.Xsl.XslTransformException: Expression must evaluate to a node-set
Is the order finalized by the time the email is sent, can you see why i'm not getting a value, do I have to use XSLT to wrtie the email template I much prefer working with razor or c#
Hi Phil
When you have the email templates we pass in the order as a parameter as like currentPage in umbraco. Try look at the teaCommerceEmailTemplate in the xslt files. There you have the param "order". Try and do an xslt copy-of to see what data you have. http://www.w3schools.com/xsl/el_copy-of.asp
The xslt error is just because the way umbraco tries to save the xslt file and test it and validate it. Just check the ignore errors and it should work as you expect.
Kind regards
Anders
Thanks I have pretty much the whole email working just threw me when umbraco was erroring when i tried so save the file. The only bit I have left now is how to show the variants in my razor code I have been using
is working on a reply...