Forum list » E-commerce »
Retrieving current order in confirmation mail
Pages:  1
(10 posts)

Retrieving current order in confirmation mail

Hi

If I set a confirmation mail based on a template in webshop settings, how do I get the current order when I want to populate it.

 

Usualy I get the current order with the following snippet

Order o = WAFShopHelper.GetCurrentOrder(Request, Response);

However this returns null when the code reach the state of sending a confirmation mail

 

Thx in advance

 

Christoffer

(144 posts)

Re:Retrieving current order in confirmation mail

Hei!

 

In the confirmation email template, the order is available through WAFContext.Request.GetContent<Order>(). 

You can't use WAFShopHelpers for emails because it only returns Orders in basket status. The solution used means that the email generation can be done at any time for any order, so it's much more flexible.

 

Vidar

(10 posts)

Re:Retrieving current order in confirmation mail

Lovely thank you