It could be you! Umbraco HQ are hiring and are looking for both talents and senior developers. Wonderful workplace, friendly colleagues and competitive salary.
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've created a custom OrderStatus in the uCommerce_OrderStatus table, and added a new Pipeline 'ToOrderRequiresReview' to it. In the Custom.config I've then added a reference to this Pipeline and also a custom task that would simply send an email to an administrator like this:
<!-- Pipeline Instance that is called when an order is set to needing a review-->
service="UCommerce.Pipelines.IPipeline`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
<!--Send email to the admin-->
service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
type="Custom.Services.PipelineTasks.OrderRequiresReviewTask, Custom.Services" />
Using the uCommerce interface when changing the order status this is triggering the Pipeline correctly, however I also want to trigger this Pipeline from my code. I've tried the below code where I'm setting the order status and saving the basket but my pipeline task never executes:
var basket = TransactionLibrary.GetBasket();
x => x.OrderStatusId == 1000003);
//I've tried with and without this line of code
Is there something I'm missing here to force this pipeline to trigger?
ExecuteBasketPipeline will only trigger BasketPipeline and not any custom pipelines.
You should be able to trigger custom pipelines by using PipelineFactory
var customPipeline = PipelineFactory.Create<PurchaseOrder>("ToOrderRequiresReview");
I have not tested the code but I'm confident it will work.
Best regards Martin
Perfect, works exactly as expected
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted