Beispiel #1
0
        /// <summary>
        /// Gets a value indicating whether the <see cref="ILineItemModel"/> is a shippable item.
        /// </summary>
        /// <param name="item">
        /// The item.
        /// </param>
        /// <returns>
        /// The value indicating whether the item is a shippable item.
        /// </returns>
        public static bool IsShippable(this ILineItemModel item)
        {
            var ed = item.ExtendedData.AsExtendedDataCollection();

            return(item.LineItemType == LineItemType.Product &&
                   ed.ContainsProductVariantKey() &&
                   ed.GetShippableValue() &&
                   ed.ContainsWarehouseCatalogKey());
        }
Beispiel #2
0
 /// <summary>
 /// Gets the total price of a basket line item.
 /// </summary>
 /// <param name="item">
 /// The item.
 /// </param>
 /// <returns>
 /// The total price.
 /// </returns>
 public static decimal Total(this ILineItemModel item)
 {
     return(item.Quantity * item.Amount);
 }