Sometimes customers do not receive their email invoice, or the invoice after shipping.. and they want us to resend it to them,
Is there a way to send a customer an invoice of their order (if they didn't sign up as a user)?
Manual Email Invoice after Order
Re: Manual Email Invoice after Order
You can manually send the Email by loading the required data. For example if you want to send the Order Confirmation email again manually you can do this by something like as below
Where orderId is the id of order for which you want to send the alert.
Code: Select all
EmailTemplate emailTemplate = EmailTemplateDataSource.LoadForCriteria("Name = 'Customer Order Notification' ");
if(emailTemplate != null)
{
Order order = OrderDataSource.Load(orderId);
if (order != null)
{
Hashtable parameters = new Hashtable();
parameters.Add("store", Token.Instance.Store);
parameters.Add("order", order);
parameters.Add("payments", order.Payments);
parameters.Add("customer", order.User);
parameters.Add("user", order.User);
emailTemplate.Parameters = parameters;
emailTemplate.Send();
}
}