Click or drag to resize
DefaultDeliveryBuilderInitCustomData Method
Override this method to add custom data to the constructed Delivery.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 12.0.0
Syntax
C#
protected virtual void InitCustomData(
	CalculationRequest request
)

Parameters

request
Type: CMS.EcommerceCalculationRequest
The calculation request data from which the custom data is gotten.
Remarks
The following code illustrates possibilities of adding custom data to Delivery.
protected override void InitCustomData(CalculationRequest request)
{
    base.InitCustomData(request);

    // Single value
    SetCustomData("RegisteredCustomer", request.Customer.CustomerIsRegistered);

    // Add complete calculation request's custom data to delivery
    AddContainerToCustomData(request.RequestCustomData);
}
See Also