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
product
ProductcategoryId
stringAn ID (system name) of the category.
fieldId
stringAn ID of the target category field.
includeInheritance
bool
Returns
- object
Category field value.
GetDefaultGroup(Product)
Gets primary or default group
public static Group GetDefaultGroup(this Product product)
Parameters
product
Product
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
product
Productcontext
PriceContextPrice 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
product
Productcontext
PriceContextPrice context
unitId
stringUnit identifier
stockLocationId
longStock location identifier
Returns
GetIsVariantMaster(Product)
Gets the value that indicates if the variant is a master.
public static bool GetIsVariantMaster(this Product product)
Parameters
product
Product
Returns
GetLanguage(Product)
public static Language GetLanguage(this Product product)
Parameters
product
Product
Returns
GetOrderLineFields(Product)
Gets the order line fields.
public static OrderLineFieldCollection GetOrderLineFields(this Product product)
Parameters
product
Product
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
product
Productcontext
PriceContextPrice 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
product
Productcontext
PriceContextPrice context
unitId
stringUnit identifier
stockLocationId
longStock location identifier
Returns
GetPrices(Product)
Gets prices for the product.
public static IEnumerable<Price> GetPrices(this Product product)
Parameters
product
ProductThe product.
Returns
GetPrimaryGroupId(Product)
Gets the ID of primary group
public static string GetPrimaryGroupId(this Product product)
Parameters
product
Product
Returns
- string
Primary group ID
GetProductKey(Product)
public static ProductKey GetProductKey(this Product product)
Parameters
product
Product
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
product
ProductstockLocation
StockLocationunitId
string
Returns
GetVariantCombinations(Product)
Gets VariantCombinationCollection object.
public static IList<VariantCombination> GetVariantCombinations(this Product product)
Parameters
product
Product
Returns
GetVariantCombinationsWithStockCheck(Product)
Gets VariantCombinationCollection object.
public static IList<VariantCombination> GetVariantCombinationsWithStockCheck(this Product product)
Parameters
product
Product
Returns
GetVariantCount(Product)
Gets the variant counting.
public static int GetVariantCount(this Product product)
Parameters
product
Product
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)