Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Luyolo Mgodi 71 posts 120 karma points
    Aug 31, 2011 @ 14:11
    Luyolo Mgodi
    0

    OrderDetails for confrimation email

    Hi,

    I am trying to get the order details to so that I can send them to the customer in my order confirmation email I cannt seem to be able to do this. I have set up evrything but uCommerce send blank emails and there is no order details in it. I created a Macro that gets the order details and put my macro in my umbraco template. but it doesnt seem to work. Below is my XSLT that get the orderGuid  and send the email.

    What do I miss here?

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
      version="1.0" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library"
      xmlns:CommerceLibrary="urn:CommerceLibrary"
      exclude-result-prefixes="msxml umbraco.library CommerceLibrary">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">
     <xsl:variable name="orderGuid" select="CommerceLibrary:GetBasket()/purchaseOrder/@orderGuid"/>
      <xsl:value-of select="CommerceLibrary:SendEmail('OrderConfirmation', $orderGuid)"/>

    </xsl:template>

    </xsl:stylesheet>

     

  • Tony Lorentzen 85 posts 174 karma points
    Sep 01, 2011 @ 03:39
    Tony Lorentzen
    0

    Could be that the basket has already been emptied at that point? uCommerce can call a page, grab the contents of that page and e-mail it to the customer. You could put a Macro on that page and grab the orderGuid from the QueryString like this:

    <xsl:variable name="orderGuid" select="umbraco.library:RequestQueryString('orderNumber')"/>

    and then you can use that to grab the purchaseOrder:

    <xsl:variable name="purchaseOrder" select="CommerceLibrary:GetPurchaseOrder($orderGuid)"/>

    Hope that helps.

  • Luyolo Mgodi 71 posts 120 karma points
    Sep 02, 2011 @ 11:51
    Luyolo Mgodi
    0

    Hi Tony,

    I tried that, but it doesnt pick up the "orderNumber" QueryString

  • Tony Lorentzen 85 posts 174 karma points
    Sep 05, 2011 @ 14:24
    Tony Lorentzen
    0

    Ah - what you're experiencing is probably the fact that you're running a pipeline when the payment has been authorized which causes the basket to be emptied. So by the time the user is sent back to your site his or hers basket will be empty. The way I've set it up is that uCommerce is sending the orderid (in my case only a Refence ID) o the payment provider who in turn will send it back to my page. The parameter is usually "orderid". You will need to catch that and look for the purchaseorder by the Reference ID.

    If all else fails, make a macro that writes out all posted values on the orderconfirmation page and you should be able to see it there.

    What payment provider are you using?

  • Tony Lorentzen 85 posts 174 karma points
    Sep 06, 2011 @ 01:43
    Tony Lorentzen
    0

    Just implemented a similar thing on a webshop I'm developing for a client. The way I've approached it is to create a user control that catches the ReferenceId and TransactionId. From there I'm using the Umbraco SqlHelper to query the database for an order that has matching payment information. In the shop I'm developing an order is only created if the payment has been authorized. I guess you could create the order and then send the OrderNumber instead of the ReferenceId. I then use the OrderId and the uCommerce API to find the correct PurchaseOrder and render the order confirmation information (with totals and the basket). Easy peasy - I hope you figure out a way to get it working; otherwise let me know :-)

  • Luyolo Mgodi 71 posts 120 karma points
    Sep 09, 2011 @ 14:38
    Luyolo Mgodi
    0

    Hi Tony,

    Thanks for your help. This is how I did: I created a userControl. I and I directly acces the database using LINQ and return the order details using the OrderGuid. After that I get all the details I use my own Email engine and send the order details to the customer!! 

  • Martin 44 posts 66 karma points
    Nov 09, 2011 @ 13:41
    Martin
    0

    Hi guys,

    You can do this:

    var payment = Payment.All().First(p => p.ReferenceId == referenceId);
    var order = PurchaseOrder.Get(payment.OrderId);

    Cheers.

Please Sign in or register to post replies

Write your reply to:

Draft