Copied to clipboard

Flag this post as spam?

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


  • phil 58 posts 78 karma points
    Apr 12, 2012 @ 12:52
    phil
    0

    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# 

  • Anders Burla 2560 posts 8256 karma points
    Apr 12, 2012 @ 16:35
    Anders Burla
    0

    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

  • phil 58 posts 78 karma points
    Apr 12, 2012 @ 17:33
    phil
    0

    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.Alias.Equals("productMaterial"&p.UmbracoLanguageId == order.UmbracoLanguageId).Value;
    var colour @orderline.Properties.Single(=p.Alias.Equals("productColour"&p.UmbracoLanguageId == order.UmbracoLanguageId).Value;
    var finish @orderline.Properties.Single(=p.Alias.Equals("productFinish"&p.UmbracoLanguageId == order.UmbracoLanguageId).Value;
    var size @orderline.Properties.Single(=p.Alias.Equals("productSize"&p.UmbracoLanguageId == order.UmbracoLanguageId).Value;
    var version @orderline.Properties.Single(=p.Alias.Equals("productVersion"&p.UmbracoLanguageId == order.UmbracoLanguageId).Value;
Please Sign in or register to post replies

Write your reply to:

Draft