Add additional information to cart

This section describes the CheckoutFlowInfo property which is used to keep temporary information about an order, until the order is placed.

Sometimes it is necessary to collect additional information from end customers which are part of the order completion, but not directly part of the order itself.

Examples:

  1. Customer is required to pick a warehouse to receive goods from.
  2. In a pay by invoice, customer is required to provide his monthly income.
  3. In a part payments, customer is required to select to pay in 3, 6 or 9 installments.

All above cases can be recorded in two ways:

  1. As additional order info, or additional payment info or additional delivery info. connected to the order
    This method is ideal if you wish to save the additional data with the order.
     
  2. By using the SetValue method in CheckoutFlowInfo class, as shown in below example.
    var customValue = "hello world";
    CurrentState.Current.ShoppingCart.CheckoutFlowInfo.SetValue("CustomValuKey", customValue);
    
    //you can obtain the value as following.
    var value = CurrentState.Current.ShoppingCart.CheckoutFlowInfo.GetValue<string>("CustomValuKey");

     

 

 

Is this page helpful?
Thank you for your feedback!