London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hi,
Yes, definitely. If you look at the code of EPiServer Commerce Sample, you'll see we send an email to customer for order confirmation.
You can customize the template of email to include the download link.
Regards.
/Q
Hi Quan
Where exactly is this text in commerce sample site?
The confirmation email?
Juan
Hi,
It should be in CheckoutControl.cs
Here's the code:
protected bool SendOrderNotificationAndConfirmation(PurchaseOrder order, string email) { try { // Add input parameter var dic = new Dictionary<string, object>() { {"OrderGroup", order} }; // Send out emails // Create smtp client var client = new SmtpClient(); var msg = new MailMessage(); msg.From = new MailAddress(_storeEmail, _storeTitle); msg.IsBodyHtml = true; // Send confirmation email msg.Subject = String.Format("{0}: Order Confirmation for {1}", _storeTitle, order.CustomerName); msg.To.Add(new MailAddress(email, order.CustomerName)); msg.Body = TemplateService.Process("order-purchaseorder-confirm", Thread.CurrentThread.CurrentCulture, dic); // send email client.Send(msg); AddNoteToPurchaseOrder("Order notification send to {0}", order, email); order.AcceptChanges(); return true; } catch (Exception ex) { LogManager.GetLogger(this.GetType()).Error(ex.Message, ex); return false; } }
Regards,
/Q
Hello
A customer will sale software, and they want that Commerce will send a email with the download link after buying, Is this possible?
I just wonder if there is a build function to create this step.
Thanks