Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to send additional emails when my order has completed. The email would depend on the project code.
From what I've seen it looks like I need to add a custom task to the Checkout pipeline.
I've tried to set breakpoints but it doesn't seem do anything.
I have checked in uCommerce that its using the checkout pipeline.
public class OrderCompletedTask : IPipelineTask
private readonly CommerceConfigurationProvider _provider;
private readonly IEmailService _emailService;
private readonly ICatalogContext _catalogContext;
public OrderCompletedTask(CommerceConfigurationProvider provider,
_provider = provider;
_emailService = emailService;
_catalogContext = catalogContext;
public PipelineExecutionResult Execute(PurchaseOrder subject)
var localization = new CustomGlobalization(_provider);
var queryStringParams = new Dictionary<string, string>();
var emailProfile = _catalogContext.CurrentCatalogGroup.EmailProfile;
var email = (subject.OrderLines.Any(o => o.Sku.ToLower().Contains("blaa")) ? "firstname.lastname@example.org" : "email@example.com");
_emailService.Send(localization, emailProfile, "Orders", new MailAddress(email), queryStringParams);
I have tried taking the line
Out of the pipeline but it still sends emails at the end of the order. I've restarted the application pool.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted