Table of Contents

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 Product
categoryId string

An ID (system name) of the category.

fieldId string

An 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

product Product
ShopId string

The shop id.

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

product Product
ShopId string

The shop id.

checkForPrimaryGroup bool

Returns

Group

Group.

GetInformativePrice(Product, PriceContext)

Gets the informative price.

public static PriceInfo GetInformativePrice(this Product product, PriceContext context)

Parameters

product Product
context PriceContext

Price context

Returns

PriceInfo

GetInformativePrice(Product, PriceContext, string, long)

Gets the informative price.

public static PriceInfo GetInformativePrice(this Product product, PriceContext context, string unitId, long stockLocationId)

Parameters

product Product
context PriceContext

Price context

unitId string

Unit identifier

stockLocationId long

Stock location identifier

Returns

PriceInfo

GetIsVariantMaster(Product)

Gets the value that indicates if the variant is a master.

public static bool GetIsVariantMaster(this Product product)

Parameters

product Product

Returns

bool

GetLanguage(Product)

public static Language GetLanguage(this Product product)

Parameters

product Product

Returns

Language

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 Product
context PriceContext

Price context

Returns

PriceInfo

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 Product
context PriceContext

Price context

unitId string

Unit identifier

stockLocationId long

Stock location identifier

Returns

PriceInfo

GetPrices(Product)

Gets prices for the product.

public static IEnumerable<Price> GetPrices(this Product product)

Parameters

product Product

The product.

Returns

IEnumerable<Price>

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

ProductKey

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 Product
stockLocation StockLocation
unitId string

Returns

double

GetVariantCombinations(Product)

Gets VariantCombinationCollection object.

public static IList<VariantCombination> GetVariantCombinations(this Product product)

Parameters

product Product

Returns

IList<VariantCombination>

GetVariantCombinationsWithStockCheck(Product)

Gets VariantCombinationCollection object.

public static IList<VariantCombination> GetVariantCombinationsWithStockCheck(this Product product)

Parameters

product Product

Returns

IList<VariantCombination>

GetVariantCount(Product)

Gets the variant counting.

public static int GetVariantCount(this Product product)

Parameters

product Product

Returns

int

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)

Parameters

product Product
categoryId string

An ID (system name) of the category.

field Field

An instance of the target category field.

value object

Category field value.

To top