Example #1
0
 /// <summary>
 /// Adds or updates a single order line on the current order. If the customer does not have a current order a new one will be created.
 /// </summary>
 /// <param name="storeId">Id of the store.</param>
 /// <param name="productIdentifier">A unique identifier of the product. E.g. the node id from Umbraco.</param>
 /// <param name="quantity">The quantity of the order line. Default behavior will add the quantity to the existing order line's quantity. This can be changed using the <paramref name="overwriteQuantity"/> parameter.</param>
 /// <param name="properties">A dictionary containing the property aliases and their values.</param>
 /// <param name="overwriteQuantity">If <c>true</c> - the <paramref name="quantity"/> parameter will overwrite the current quantity of the order line.</param>
 /// <param name="bundleIdentifier">Use to be able to create product bundles. This identifier is used when adding sub order lines to this order line.</param>
 /// <param name="parentBundleIdentifier">The <paramref name="bundleIdentifier" /> of the order line you want to add this product to.</param>
 /// <returns>The order line just created or updated.</returns>
 public static OrderLine AddOrUpdateOrderLine(long storeId, string productIdentifier, decimal?quantity = null, IDictionary <string, string> properties = null, bool overwriteQuantity = false, string bundleIdentifier = null, string parentBundleIdentifier = null)
 {
     return(TeaCommerceHelper.AddOrUpdateOrderLine(storeId, productIdentifier, quantity, properties, overwriteQuantity, bundleIdentifier, parentBundleIdentifier));
 }