The order system contains many classes which can be extended with your own implementation. This means that you can create your own Cart and/or LineItem class implementations to replace the one included in EPiServer Commerce.
The order classes that you can extend are:
Classes referred to here are available in the following namespaces:
How to configure a meta class
- Navigate to the Order System/Meta Class node in the Administration section of Commerce Manager.
- Select the correct group type from the Element drop-down list.
- From the Type list, select the meta class you wish to configure. Notice that the OrderGroup and Payment group types are the only ones that have multiple type options. Here you can edit the meta class definitions by checking the checkboxes associated with the fields you wish to associate with each meta class.
- To add meta fields, click on the Order System/Meta Fields node and select New/Meta Field.
Accessing order meta data
To access order meta objects, each of the order meta classes have a dictionary of meta fields accessible by the root object.
Example:accessing meta fields from different order meta fields
Cart newCart = OrderContext.Current.GetCart("myname", newCustomer); //This is the meta field data access string myCartField = newCart["myField"].ToString(); string orderformField = newCart.OrderForms["myOrderFormField"].ToString(); string paymentField = newCart.OrderForms.Payments["myPaymentField"].ToString(); string shipmentField = newCart.OrderForms.Shipments["myShipmentField"].ToString();