Nop 3.8.
We use a 100% discount code when entering warranty replacement parts to a customer. We've noticed that the customer doesn't receive emails for these $0.00 orders. They do not exists in the message queue.
public class OrderPlacedEventConsumer : IConsumer<OrderPlacedEvent>
{
private readonly IWorkflowMessageService _workflowMessageService;
public OrderPlacedEventConsumer(IWorkflowMessageService workflowMessageService)
{
_workflowMessageService = workflowMessageService;
}
public void HandleEvent(OrderPlacedEvent eventMessage)
{
if(eventMessage.Order.OrderTotal <= decimal.Zero)
{
_workflowMessageService.SendOrderPaidStoreOwnerNotification(eventMessage.Order, eventMessage.Order.CustomerLanguageId);
}
}
}