Click or drag to resize
DefaultDeliveryBuilderSetFromCalculationRequest Method
Sets the currently constructed Delivery according to the supplied calculation request data.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 13.0.131
Syntax
C#
public void SetFromCalculationRequest(
	CalculationRequest request,
	Func<CalculationRequestItem, bool> itemSelector = null
)

Parameters

request
Type: CMS.EcommerceCalculationRequest
The Calculation request data to be packed in the constructed delivery.
itemSelector (Optional)
Type: SystemFuncCalculationRequestItem, Boolean
The predicate deciding which items are added to Delivery. When null, all items are added.

Implements

IDeliveryBuilderSetFromCalculationRequest(CalculationRequest, FuncCalculationRequestItem, Boolean)
Remarks

The following data is taken from the calculation request:

  • Shipping option - The shipping option taken from ShippingOption.
  • Delivery address - Taken from ShippingAddress or BillingAddress when not present.
  • Items - All items representing products are included. The itemSelector allows you to further narrow the subset of items added to the constructed constructed delivery.

Please note that CustomData are not populated from the calculation request. The same applies to CustomData created from calculation request items. To include some custom data into Delivery, inherit your custom delivery builder.

See Also