Class ProductExtentions
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
public static class ProductExtentions
- Inheritance
-
ProductExtentions
- Inherited Members
Methods
GetCategoryValue(Product, string, string, bool)
Retrieves the value of the given category field.
public static object GetCategoryValue(this Product product, string categoryId, string fieldId, bool includeInheritance)
Parameters
productProductcategoryIdstringAn ID (system name) of the category.
fieldIdstringAn ID of the target category field.
includeInheritancebool
Returns
- object
Category field value.
GetDefaultGroup(Product)
Gets primary or default group
public static Group GetDefaultGroup(this Product product)
Parameters
productProduct
Returns
- Group
Primary or default group
GetDefaultGroupByShopId(Product, string)
Gets the default group by shop id.
public static Group GetDefaultGroupByShopId(this Product product, string ShopId)
Parameters
Returns
- Group
Group.
GetDefaultGroupByShopId(Product, string, bool)
Gets the default group by shop id.
public static Group GetDefaultGroupByShopId(this Product product, string ShopId, bool checkForPrimaryGroup)
Parameters
Returns
- Group
Group.
GetInformativePrice(Product, PriceContext)
Gets the informative price.
public static PriceInfo GetInformativePrice(this Product product, PriceContext context)
Parameters
productProductcontextPriceContextPrice context
Returns
GetInformativePrice(Product, PriceContext, string, long)
Gets the informative price.
public static PriceInfo GetInformativePrice(this Product product, PriceContext context, string unitId, long stockLocationId)
Parameters
productProductcontextPriceContextPrice context
unitIdstringUnit identifier
stockLocationIdlongStock location identifier
Returns
GetIsVariantMaster(Product)
Gets the value that indicates if the variant is a master.
public static bool GetIsVariantMaster(this Product product)
Parameters
productProduct
Returns
GetLanguage(Product)
public static Language GetLanguage(this Product product)
Parameters
productProduct
Returns
GetOrderLineFields(Product)
Gets the order line fields.
public static OrderLineFieldCollection GetOrderLineFields(this Product product)
Parameters
productProduct
Returns
- OrderLineFieldCollection
The order line fields.
GetPrice(Product, PriceContext)
Gets the price. This is the final calculated price for the product.
public static PriceInfo GetPrice(this Product product, PriceContext context)
Parameters
productProductcontextPriceContextPrice context
Returns
GetPrice(Product, PriceContext, string, long)
Gets the price. This is the final calculated price for the product.
public static PriceInfo GetPrice(this Product product, PriceContext context, string unitId, long stockLocationId)
Parameters
productProductcontextPriceContextPrice context
unitIdstringUnit identifier
stockLocationIdlongStock location identifier
Returns
GetPrices(Product)
Gets prices for the product.
public static IEnumerable<Price> GetPrices(this Product product)
Parameters
productProductThe product.
Returns
GetPrimaryGroupId(Product)
Gets the ID of primary group
public static string GetPrimaryGroupId(this Product product)
Parameters
productProduct
Returns
- string
Primary group ID
GetProductKey(Product)
public static ProductKey GetProductKey(this Product product)
Parameters
productProduct
Returns
GetUnitStock(Product, StockLocation, string)
Gets the stock of the current product instance based on the provider if any are specified. Goes through the stock level provider (and hence the ERP if configured to do that). If there are not providers, 0.0 is returned
public static double GetUnitStock(this Product product, StockLocation stockLocation, string unitId)
Parameters
productProductstockLocationStockLocationunitIdstring
Returns
GetVariantCombinations(Product)
Gets VariantCombinationCollection object.
public static IList<VariantCombination> GetVariantCombinations(this Product product)
Parameters
productProduct
Returns
GetVariantCombinationsWithStockCheck(Product)
Gets VariantCombinationCollection object.
public static IList<VariantCombination> GetVariantCombinationsWithStockCheck(this Product product)
Parameters
productProduct
Returns
GetVariantCount(Product)
Gets the variant counting.
public static int GetVariantCount(this Product product)
Parameters
productProduct
Returns
SetCategoryValue(Product, string, Field, object)
Assigns category field value to the current product.
public static void SetCategoryValue(this Product product, string categoryId, Field field, object value)