Order Line

AddOrUpdateOrderLine

This method has multiple use cases, but common for all is that its updating the customer's current order. The most simple scenario is adding an order line. The other uses are updating the quantity of an existing order line, add unique order lines, add bundled products etc.

    UpdateOrderLine

    Updates a single order line on the current order. If the customer does not have a current order a new one will be created.

      RemoveOrderLine

      Removes a single order line from the customer's current order.

        RemoveAllOrderLines

        Removes all order lines from the customer's current order.

          Automatic Properties

          When adding an item to an order, you can provide extra information to add to an OrderLine by passing a properties collection through to either of the AddOrUpdateOrderLine or UpdateOrderLine methods documented above.

          However, you can also configure Tea Commerce to automatically copy across certain product information for you automatically. This can be useful if you have information you constantly want to display next to an OrderLine item but don't want to have to perform a node lookup every time.

          To automatically copy node fields to an OrderLine, these can be configured by entering a comma separated list of property aliases into the Product property aliases field found on the Store editor, under the Product tab.

          Store Product Information

          Product Uniqueness Properties

          When adding an item to an Order, you may want to allow different configurations of the same product to be added to an order as distinct order lines rather than having them all seen as the same order line. To achieve this you can configure which properties of a product node should be used to identify the "uniqueness" of a product. These can be configured by entering a comma separated list of property aliases into the Product uniqueness property aliases field found on the Store editor, under the Product tab.

          Store Product Information

          With this field populated, when an item is added to an order, Tea Commerce will check the value of the product nodes uniqueness properties and create distinct order lines for each unique combination.

          System Properties

          When adding an item to an order, as well as the properties passed via the AddOrUpdateOrderLine or UpdateOrderLine methods properties collection as documented above, Tea Commerce will also add some system defined properties to the OrderLine who's values will be automatically extracted from the product node. In order for these properties to work, you must have fields on your product node with the documented property aliases defined below.

          Name Property Alias Description
          SKU sku A product SKU code.

          NB These fields are extracted via a Product Information Extractor, if you need to extract these fields from alternative sources, you can do so by overriding the default Product Information Extractor with your own.

          Last Updated: 2/6/2019, 8:40:54 AM