Send Order Placed email notification only for the orders which are from Check Money Order Payment Method

6 months ago
Hi All,

I have two payment methods enabled in one of my nop stores and store owner only wants to get order placed emails for  checkMoneyOrder type orders. He doesn't want to get order placed emails for credit card orders. I want to know is that is there a way to do this in message templates, instead of modifying the code. If I have to modify the code to filter this using payment methods, from where should I start with the code.

Thanks in Advance.
6 months ago
You would need to customise

The routine that sends the message is

        public virtual IList<int> SendOrderPlacedStoreOwnerNotification(Order order, int languageId)

in nop42\Libraries\Nop.Services\Messages\WorkflowMessageService.cs

Or you could do the check of the payment type in the calling routine

        protected virtual void SendNotificationsAndSaveNotes(Order order)

in nop42\Libraries\Nop.Services\Orders\OrderProcessingService.cs

Check Order.PaymentMethodSystemName
6 months ago
Yidna wrote:
You would need to customise

The routine that sends the message is

        public virtual IList<int> SendOrderPlacedStoreOwnerNotification(Order order, int languageId)

in nop42\Libraries\Nop.Services\Messages\WorkflowMessageService.cs

Or you could do the check of the payment type in the calling routine

        protected virtual void SendNotificationsAndSaveNotes(Order order)

in nop42\Libraries\Nop.Services\Orders\OrderProcessingService.cs

Check Order.PaymentMethodSystemName



Managed to do it mate with your help. Thanks.