Click or drag to resize
VariantHelper.GetAllPossibleVariantsInternal Method (Int32, IEnumerable<Int32>)
Gets all possible variants for specified product and all combinations (including existing variants) of options from categories.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 8.2.23
Syntax
C#
protected virtual List<ProductVariant> GetAllPossibleVariantsInternal(
	int productId,
	IEnumerable<int> optionCategoriesIds
)

Parameters

productId
Type: System.Int32
The product ID.
optionCategoriesIds
Type: System.Collections.Generic.IEnumerable<Int32>
The option categories IDs

Return Value

Type: List<ProductVariant>
All possible variants for specified product and all combinations of options from categories
Remarks
Please note, that some of returned objects are already stored in database (existing variants) and some not (all non-existing variants). To ensure that variant is already stored use Variant property CMS.Ecommerce.ProductVariant.Saved.
See Also