Developer forum

Forum » Ecommerce - Standard features » Resend Order Confirmation Email

Resend Order Confirmation Email

Andrew Rushworth
Reply

Hi,

Is there a way to resend the order email confirmation for orders if there was an error sending?

If not, I could create  scheduled task to use the order service sendmail() method, correct? 
I would then need to know how to determine if the email confirmation was sent or not for each order (I could pull out of the log table for particular error as I dont' see a field on the order table that shows this)

Thanks,
Andrew


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Andrew 

In the order list you can trigger a send of emails to users by changing order state. You can add an orderstate called "Resend Email"  or whatever and re-use the template from the checkout receipt. Then you can change to that state when needed, sending the email, and then change to the next state needed for that order.

BR Nicolai

 
Andrew Rushworth
Reply

Thanks Nicolai.

This would kind of work. The only problem I see is that when changing it back its original status, it would then also re-trigger any emails associated with that state:

eg:
Current Status = "Delivered" (which sent out a delivery notification)
Change the status to "Resend" to send out Order confirmation email that failed to send due to STMP or some other reason.
Save => Triggers email 
Then change status back to "Delivered" =>retriggers the delivery notification (not wanted)

On the order service there is a SendMail method - can I not call this method to just resend the order confirmation method? (or maybe there is another method I can use)
Otherwise I'll can build a custom email task to send through the email tags to the email template, etc - just don't want to duplicate functionality.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Andrew

Yes - you can call that method. It is the same that is used by change state and sending the receipt, so in that way you will bypass the state change.

BR Nicolai

 
Andrew Rushworth
Reply

Thanks Nicolai.

Last Question - it asks for a Dynamicweb.Frontend.PageView 
what doI send through for this?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Create an instance using GetPageviewByPageID and send in the ID of the page where the cart is.

 
Andrew Rushworth
Reply

Hi Nicolai,

Is there somewhere to download the debug symbols for a DW version?

Thanks,

Andrew

 

You must be logged in to post in the forum