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.
Steps: I have checked in uCommerce that its using the checkout pipeline.
Added
And finally
public class OrderCompletedTask : IPipelineTask
private readonly CommerceConfigurationProvider _provider; private readonly IEmailService _emailService; private readonly ICatalogContext _catalogContext; public OrderCompletedTask(CommerceConfigurationProvider provider, IEmailService emailService, ICatalogContext catalogContext) { _provider = provider; _emailService = emailService; _catalogContext = catalogContext; } public PipelineExecutionResult Execute(PurchaseOrder subject) { var localization = new CustomGlobalization(_provider); localization.SetCulture(new CultureInfo(subject.CultureCode)); var queryStringParams = new Dictionary<string, string>(); queryStringParams.Add("orderguid", subject.OrderGuid.ToString()); queryStringParams.Add("orderid", subject.OrderId.ToString(CultureInfo.InvariantCulture)); var emailProfile = _catalogContext.CurrentCatalogGroup.EmailProfile; var email = (subject.OrderLines.Any(o => o.Sku.ToLower().Contains("blaa")) ? "[email protected]" : "[email protected]"); _emailService.Send(localization, emailProfile, "Orders", new MailAddress(email), queryStringParams); return PipelineExecutionResult.Success; } }
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:
Upload image
Image will be uploaded when post is submitted
uCommerce custom pipleline not working!!!!
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.
Steps: I have checked in uCommerce that its using the checkout pipeline.
Added
Added
And finally
public class OrderCompletedTask : IPipelineTask
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...