Basket Pipeline
The Basket pipeline is the most essential pipeline in Ucommerce without a doubt. It is the pipeline used when your customers are modifying their baskets (adding and removing products). It is used to ensure that the basket is in a state where it is ready to be checked out. This means that all totals like tax, order total, shipment and discounts has been properly calculated and can be presented for the user as well as for checking out the basket.
Below you can see the OOTB configuration and tasks that are in the basket pipeline. You can see in what order they run and what each of the tasks does.
Pipeline implementation
- windsor component id
Basket
- type
Ucommerce.Pipelines.Transactions.Baskets.Basket.BasketPipeline
Tasks and execution order
SetCultureCodeTask
- Windsor component id
Basket.SetCultureCode
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.SetCultureCodeTask
- Description
Updates culture code on PurchaseOrder according to current ILocalizationContext.
RemoveGeneratedOrderlines
- Windsor component id
Basket.RemoveGeneratedOrderlines
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.RemoveGeneratedOrderlines
RemoveAllDiscountsFromOrderTask
- Windsor component id
Basket.RemoveAllDiscountsFromOrder
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.RemoveAllDiscountsFromOrderTask
- Description
Removes all discounts from the collections on the purchase order, its order lines and its shipments
CalculateOrderLinesUnitDiscountsTask
- Windsor component id
Basket.CalculateOrderLinesUnitDiscounts
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLinesUnitDiscountsTask
-
Description
Calculates unit discount by summing all discounts assigned to the order line and diving it by the quantity on the order line.
CalculateOrderDiscountTask
- Windsor component id
Basket.CalculateOrderDiscount
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderDiscountTask
CalculateOrderLinesDiscountsTask
- Windsor component id
Basket.CalculateOrderLinesDiscounts
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLinesDiscountsTask
CalculateShippingDiscountTask
- Windsor component id
Basket.CalculateShippingDiscounts
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingDiscountTask
-
Description
Calculates shipping discount based on attached discounts on Shipment.
CalculateOrderSubTotalTask
- Windsor component id
Basket.CalculateOrderSubTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderSubTotalTask
- Description
Calculates sub total for PurchaseOrder.
CalculateShippingCostForShipmentsTask
- Windsor component id
Basket.CalculateShippingCostForShipments
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingCostForShipmentsTask
-
Description
Iterates through each Shipment on the PurchaseOrder and executes the configured IShippingMethodService for the ShippingMethod selected for the Shipment
CalculateShippingTaxForShipmentsTask
- Windsor component id
Basket.CalculateShippingTaxForShipments
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTaxForShipmentsTask
- Description
Calculates tax for shipments associated with the PurchaseOrder.
CalculateShippingTotalForShipmentsTask
- Windsor component id
Basket.CalculateShippingTotalForShipments
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTotalForShipmentsTask
- Description
Calculates the shipping total for individual Shipment.
CalculateOrderLineTaxTask
- Windsor component id
Basket.CalculateOrderLineTax
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTaxTask
- Description
Calculates OrderLine tax based on stored values in VATRate, UnitPrice, and UnitDiscount.
CalculateOrderLineTaxRateTask
- Windsor component id
Basket.CalculateOrderLineTaxRate
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTaxRateTask
-
Description
Calcualtes tax rates for order lines based on their unit price and unit tax.
CalculateOrderLineTotalsTask
- Windsor component id
Basket.CalculateOrderLinesTotals
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTotalsTask
CalculateShippingTotalTask
- Windsor component id
Basket.CalculateShippingTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTotalTask
- Description
Sums the shipping total for all shipments associated with the PurchaseOrder.
CalculatePaymentTotalTask
- Windsor component id
Basket.CalculatePaymentTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentTotalTask
CalculateOrderVatTotalTask
- Windsor component id
Basket.CalculateVATTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderVatTotalTask
-
Description
Sums VAT from individual order lines times quantity and sets the VAT on PurchaseOrder.
CalculateOrderDiscountTotalTask
- Windsor component id
Basket.CalculateOrderDiscountTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderDiscountTotalTask
- Description
Calculates the total of all discounts applied to the order.
CalculateOrderTaxTotalTask
- Windsor component id
Basket.CalculateOrderTaxTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderTaxTotalTask
- Description
Calculates global tax for entire PurchaseOrder.
CalculateOrderTotalTask
- Windsor component id
Basket.CalculateOrderTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderTotalTask
- Description
Calculates order total by adding all sub totals.
ApplyAwardsTask
- Windsor component id
Basket.ApplyAwards
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.ApplyAwardsTask
- Description
Enables Marketing Foundation to apply awards on PurchaseOrder.
CalculateOrderLinesUnitDiscountsTask
- Windsor component id
Basket.CalculateOrderLinesUnitDiscounts
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLinesUnitDiscountsTask
-
Description
Calculates unit discount by summing all discounts assigned to the order line and diving it by the quantity on the order line.
CalculateOrderDiscountTask
- Windsor component id
Basket.CalculateOrderDiscount
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderDiscountTask
CalculateOrderLinesDiscountsTask
- Windsor component id
Basket.CalculateOrderLinesDiscounts
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLinesDiscountsTask
EnsureOrderLinesDiscountNotExceedTheOrderLinesTotalTask
- Windsor component id
Order.EnsureOrderLinesDiscountNotExceedTheOrderLinesTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.EnsureOrderLinesDiscountNotExceedTheOrderLinesTotalTask
- Description
Makes sure that a customer can't get more dicount then the order line total.
CalculateOrderSubTotalTask
- Windsor component id
Basket.CalculateOrderSubTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderSubTotalTask
- Description
Calculates sub total for PurchaseOrder.
EnsureOrderDiscountsDoesNotExceedOrderSubTotal
- Windsor component id
Basket.EnsureOrderDiscountsDoesNotExceedOrderSubTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.EnsureOrderDiscountsDoesNotExceedOrderSubTotal
CalculateShippingDiscountTask
- Windsor component id
Basket.CalculateShippingDiscounts
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingDiscountTask
-
Description
Calculates shipping discount based on attached discounts on Shipment.
CalculateShippingTaxForShipmentsTask
- Windsor component id
Basket.CalculateShippingTaxForShipments
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTaxForShipmentsTask
- Description
Calculates tax for shipments associated with the PurchaseOrder.
CalculateShippingTotalForShipmentsTask
- Windsor component id
Basket.CalculateShippingTotalForShipments
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTotalForShipmentsTask
- Description
Calculates the shipping total for individual Shipment.
CalculateOrderLineTaxTask
- Windsor component id
Basket.CalculateOrderLineTax
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTaxTask
- Description
Calculates OrderLine tax based on stored values in VATRate, UnitPrice, and UnitDiscount.
CalculatePaymentFeeTask
- Windsor component id
Basket.CalculatePaymentFee
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentFeeTask
CalculatePaymentTaxTask
- Windsor component id
Basket.CalculatePaymentTax
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentTaxTask
CalculatePaymentAmountTask
- Windsor component id
Basket.CalculatePaymentAmount
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentAmountTask
CalculateOrderLineTotalsTask
- Windsor component id
Basket.CalculateOrderLinesTotals
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTotalsTask
CalculateShippingTotalTask
- Windsor component id
Basket.CalculateShippingTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTotalTask
- Description
Sums the shipping total for all shipments associated with the PurchaseOrder.
CalculatePaymentTotalTask
- Windsor component id
Basket.CalculatePaymentTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentTotalTask
CalculateOrderVatTotalTask
- Windsor component id
Basket.CalculateVATTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderVatTotalTask
-
Description
Sums VAT from individual order lines times quantity and sets the VAT on PurchaseOrder.
CalculateOrderDiscountTotalTask
- Windsor component id
Basket.CalculateOrderDiscountTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderDiscountTotalTask
- Description
Calculates the total of all discounts applied to the order.
CalculateOrderTaxTotalTask
- Windsor component id
Basket.CalculateOrderTaxTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderTaxTotalTask
- Description
Calculates global tax for entire PurchaseOrder.
CalculateOrderTotalTask
- Windsor component id
Basket.CalculateOrderTotal
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderTotalTask
- Description
Calculates order total by adding all sub totals.
RoundUpOrderTotalForCurrenciesWithNoDecimalDigitsTask
- Windsor component id
Basket.RoundUpOrderTotalForCurrenciesWithoutDecimalDigits
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.RoundUpOrderTotalForCurrenciesWithNoDecimalDigitsTask
- Description
Rounds up the sub total for PurchaseOrder, if the currency does not support cents.
CleanUpTask
- Windsor component id
Basket.CleanUp
- Type
Ucommerce.Pipelines.Transactions.Baskets.Basket.CleanUpTask
- Description
Brings order in proper state before executing pipeline.
SavePurchaseOrderTask
- Windsor component id
Basket.Save
- Type
Ucommerce.Pipelines.Common.SavePurchaseOrderTask
Pipeline configuration
Configuration as found under ucommerce\pipelines\Baskets.Basket.config
<configuration> <components> <!-- Pipeline Instance --> <component id="Basket" service="Ucommerce.Pipelines.IPipeline`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.BasketPipeline, Ucommerce.Pipelines"> <parameters> <tasks> <array> <value>${Basket.SetCultureCode}</value> <!-- Removes generated orderlines (free gifts) --> <value>${Basket.RemoveGeneratedOrderlines}</value> <!-- Remove all discounts and resets the totals --> <value>${Basket.RemoveAllDiscountsFromOrder}</value> <value>${Basket.CalculateOrderLinesUnitDiscounts}</value> <value>${Basket.CalculateOrderDiscount}</value> <value>${Basket.CalculateOrderLinesDiscounts}</value> <value>${Basket.CalculateShippingDiscounts}</value> <!-- Reset remaing discount--> <value>${Basket.CalculateOrderSubTotal}</value> <!-- Calculate shipping fees and tax --> <value>${Basket.CalculateShippingCostForShipments}</value> <value>${Basket.CalculateShippingTaxForShipments}</value> <value>${Basket.CalculateShippingTotalForShipments}</value> <!-- Calculate tax for order lines based on original unit prices --> <value>${Basket.CalculateOrderLineTax}</value> <!-- Reset the order lines tax rate--> <value>${Basket.CalculateOrderLineTaxRate}</value> <!-- Calculate totals for order lines and order based on original prices --> <value>${Basket.CalculateOrderLinesTotals}</value> <value>${Basket.CalculateShippingTotal}</value> <value>${Basket.CalculatePaymentTotal}</value> <!-- Reset the order totals--> <value>${Basket.CalculateVATTotal}</value> <value>${Basket.CalculateOrderDiscountTotal}</value> <value>${Basket.CalculateOrderTaxTotal}</value> <value>${Basket.CalculateOrderTotal}</value> <!-- Apply discounts --> <value>${Basket.ApplyAwards}</value> <!-- Calculate order level discount total based on applied discounts --> <value>${Basket.CalculateOrderLinesUnitDiscounts}</value> <!-- Calculcate order line discounts based on applied discounts --> <value>${Basket.CalculateOrderDiscount}</value> <value>${Basket.CalculateOrderLinesDiscounts}</value> <!--Ensures that the order line Discout exceed the order line total--> <value>${Order.EnsureOrderLinesDiscountNotExceedTheOrderLinesTotal}</value> <!-- Calculate total value of items excluding taxes --> <value>${Basket.CalculateOrderSubTotal}</value> <!-- Ensures that the order level discounts doesn't exceed the sub total and prevents negative order totals --> <value>${Basket.EnsureOrderDiscountsDoesNotExceedOrderSubTotal}</value> <!-- Shipping taxes and totals need to be recalculated if discounts are applied to shipments --> <value>${Basket.CalculateShippingDiscounts}</value> <value>${Basket.CalculateShippingTaxForShipments}</value> <value>${Basket.CalculateShippingTotalForShipments}</value> <!-- Recalculate tax for order lines based on reduced unit prices --> <value>${Basket.CalculateOrderLineTax}</value> <!-- Calculate payment fee, tax and amount --> <value>${Basket.CalculatePaymentFee}</value> <value>${Basket.CalculatePaymentTax}</value> <value>${Basket.CalculatePaymentAmount}</value> <!-- Calculate totals for order lines and order --> <value>${Basket.CalculateOrderLinesTotals}</value> <value>${Basket.CalculateShippingTotal}</value> <value>${Basket.CalculatePaymentTotal}</value> <value>${Basket.CalculateVATTotal}</value> <value>${Basket.CalculateOrderDiscountTotal}</value> <value>${Basket.CalculateOrderTaxTotal}</value> <value>${Basket.CalculateOrderTotal}</value> <value>${Basket.RoundUpOrderTotalForCurrenciesWithoutDecimalDigits}</value> <value>${Basket.CleanUp}</value> <value>${Basket.Save}</value> </array> </tasks> </parameters> </component> <!-- Pipeline Tasks--> <component id="Basket.RemoveGeneratedOrderlines" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.RemoveGeneratedOrderlines, Ucommerce.Pipelines" /> <component id="Basket.RemoveAllDiscountsFromOrder" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.RemoveAllDiscountsFromOrderTask, Ucommerce.Pipelines" /> <component id="Basket.CleanUp" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CleanUpTask, Ucommerce.Pipelines" /> <component id="Basket.ConvertOrderLevelDiscountsToOrderLinesDiscount" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.ConvertOrderLevelDiscountsToOrderLinesDiscount, Ucommerce.Pipelines" /> <component id="Basket.ApplyAwards" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.ApplyAwardsTask, Ucommerce.Pipelines" /> <component id="Basket.SetCultureCode" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.SetCultureCodeTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderLinesUnitDiscounts" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLinesUnitDiscountsTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateShippingDiscounts" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingDiscountTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderLinesDiscounts" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLinesDiscountsTask, Ucommerce.Pipelines" /> <component id="Order.EnsureOrderLinesDiscountNotExceedTheOrderLinesTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.EnsureOrderLinesDiscountNotExceedTheOrderLinesTotalTask, Ucommerce.Pipelines" /> <component id="Basket.EnsureOrderDiscountsDoesNotExceedOrderSubTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.EnsureOrderDiscountsDoesNotExceedOrderSubTotal, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderLinesTotals" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTotalsTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateShippingTaxForShipments" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTaxForShipmentsTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateShippingCostForShipments" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingCostForShipmentsTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateShippingTotalForShipments" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTotalForShipmentsTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateShippingTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateShippingTotalTask, Ucommerce.Pipelines" /> <component id="Basket.CalculatePaymentTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentTotalTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderLineTax" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTaxTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateVATTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderVatTotalTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderDiscount" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderDiscountTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderDiscountTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderDiscountTotalTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderSubTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderSubTotalTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderTaxTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderTaxTotalTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderTotal" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderTotalTask, Ucommerce.Pipelines" /> <component id="Basket.RoundUpOrderTotalForCurrenciesWithoutDecimalDigits" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.RoundUpOrderTotalForCurrenciesWithNoDecimalDigitsTask, Ucommerce.Pipelines" /> <component id="Basket.CalculateOrderLineTaxRate" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculateOrderLineTaxRateTask, Ucommerce.Pipelines" /> <component id="Basket.Save" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Common.SavePurchaseOrderTask, Ucommerce.Pipelines" /> <component id="Basket.CalculatePaymentFee" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentFeeTask, Ucommerce.Pipelines" /> <component id="Basket.CalculatePaymentTax" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentTaxTask, Ucommerce.Pipelines" /> <component id="Basket.CalculatePaymentAmount" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="Ucommerce.Pipelines.Transactions.Baskets.Basket.CalculatePaymentAmountTask, Ucommerce.Pipelines" /> </components> </configuration>
Custom task
If you're interested in creating your own pipeline task, here's a code sample and configuration below for the Basket pipeline. If you haven't read how to create custom pipeline tasks before, we recommend giving it a read as there's a lot of valuable information covered in the article.
Code sample
using Ucommerce.Pipelines; using Ucommerce.EntitiesV2; namespace MyProject.Extensions.Pipelines.Basket { public class MyBasketPipelineTask : Ucommerce.Pipelines.IPipelineTask<Ucommerce.EntitiesV2.PurchaseOrder> { public PipelineExecutionResult Execute(Ucommerce.EntitiesV2.PurchaseOrder subject) { return PipelineExecutionResult.Success; } } }
Configuration
<configuration> <components> <component id="Basket.MyBasketPipelineTask" service="Ucommerce.Pipelines.IPipelineTask`1[[Ucommerce.EntitiesV2.PurchaseOrder, Ucommerce]], Ucommerce" type="MyProject.Extensions.Pipelines.Basket.MyBasketPipelineTask, MyAssembly" /> <partial-component id="Basket"> <parameters> <tasks> <array> <value insert="last">${Basket.MyBasketPipelineTask}</value> </array> </tasks> </parameters> </partial-component> </components> </configuration>
The configuration above just inserts your task as the last task in the pipeline. Mind this line in the configuration above:
<value insert="last">${Basket.MyBasketPipelineTask}</value>
Additionally you can insert first, or before or after a specific task. Just like the example below
You may also use insert="first"
insert-before="${Basket.RemoveGeneratedOrderlines}"
or insert-after="${Basket.RemoveGeneratedOrderlines}"