Option to Mark Order as Complete but NOT send Order Complete Email

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I was wondering if it were possible to mark an order as complete but have the nopcommerce system either send out a different email template or no email at all.  

Without modifying existing code, I could create a quick ASP page to mark the order complete in the database.  Any consequences on doing something like this?

I'm on nopcommerce 4.00, no customization, just a lot of plugins.
5 years ago
You can make the template inactive - then the customer will not be sent an email

in Message templates i.e. /Admin/MessageTemplate/List
Edit the OrderCompleted.CustomerNotification template and make it inactive

To send a different template you would need to customise the code - or use a plugin
5 years ago
Yidna wrote:
You can make the template inactive - then the customer will not be sent an email

in Message templates i.e. /Admin/MessageTemplate/List
Edit the OrderCompleted.CustomerNotification template and make it inactive

To send a different template you would need to customise the code - or use a plugin


I want the template to be active, and also have the option to send another template or no template when completing an order.  seems like it must be done by a customization or plugin, or I'll try some ASP to update the database, and see if that update triggers anything.
5 years ago
Yes you need to customise
The order completed template is hard coded for when the order status is set to completed - not sure what your asp routine could do ?

You could make a new product template in dbo_ProductTemplate and select the template for a specific product
Then based on the template type decide not to send the email
The file to change is nopCommerce_4.00 Source\Libraries\Nop.Services\Orders\OrderProcessingService
In the routine
         protected virtual void SetOrderStatus(Order order, OrderStatus os, bool notifyCustomer)
5 years ago
Yidna wrote:
You can make the template inactive - then the customer will not be sent an email

in Message templates i.e. /Admin/MessageTemplate/List
Edit the OrderCompleted.CustomerNotification template and make it inactive

To send a different template you would need to customise the code - or use a plugin


So, if I mark the template inactive, and then set a bunch of orders to Complete, the email won't send.

If I set the template back to active after marking the Orders Complete, it will not scan the recently completed orders and then send the template, correct?
5 years ago
Correct
5 years ago
Yidna wrote:
Correct


Awesome.  Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.