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.

  • Daniel Howell 21 posts 42 karma points
    May 08, 2013 @ 04:17
    Daniel Howell
    0

    Adding additional parameters to email templates for email subject.

    I want to add the order number (as in ORDER-123) to the subject of my order confirmation email. I see that tokens in the email subject have been around for a while:

     

    Change log for uCommerce 1.5.1.0

    NEW: EmailService can insert dynamic data in subject and for template, e.g. "Confirmation for order number {orderNumber}." combined with Send() which takes a dictionary parameter.

     

    But the {orderNumber} parameter is actually returning the OrderGuid, which isn't very helpful to the user, who sees: Confirmation of order 0acd4856-130e-49ec-974b-8312ceb335a2.
    Here is the code that does the email send in the SendEmailTask class:
    emailService.Send(SiteContext.Current.CatalogContext.CurrentCatalogSet.EmailProfile, this.EmailTypeName, new MailAddress(billingAddress.EmailAddress), purchaseOrder.OrderGuid.ToString());
    I am running uCommerce v2.6.1.0 on Umbraco 4.9. 
    So, is there a way to pass additional parameters into the Dictionary that the Send method uses - without having to write a new pipeline task?
  • Kim Søjborg Pedersen 71 posts 275 karma points
    May 08, 2013 @ 09:21
  • Daniel Howell 21 posts 42 karma points
    May 08, 2013 @ 09:29
    Daniel Howell
    0

    Thanks Kim,

    I did see that article. As I pointed out, it looks like this functionality was built into uCommerce in version 1.5, but I can't find much documentation.

    I would prefer to use the feature OOTB if it is available. If it is not, then I would just rewrite the pipeline task that sends the confirmation email - but as I mentioned, I would prefer to not have to write any code, as it looks like it is already built into the system.

    Cheers,

    Daniel

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 22, 2013 @ 22:08
    Søren Spelling Lund
    0

    Hi Daniel,

    You'll have to call the email service yourself to add an additional parameter. I do agree that orderNumber should hold the actual order number rather than the guid (it's passed in a second parameter anyway).

    I'll put it on the bug tracker.

    Sorry about the inconvenience.

Please Sign in or register to post replies

Write your reply to:

Draft