Click or drag to resize
VariantHelper Class
Provides advanced manipulation with product variants.
Inheritance Hierarchy
SystemObject
  CMS.BaseCoreMethods
    CMS.BaseAbstractHelper
      CMS.BaseAbstractHelperVariantHelper
        CMS.EcommerceVariantHelper

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 9.0.0
Syntax
C#
public class VariantHelper : AbstractHelper<VariantHelper>

The VariantHelper type exposes the following members.

Constructors
  NameDescription
Public methodVariantHelper
Top
Methods
  NameDescription
Public methodStatic memberAddNewCategoriesToVariantsOfProduct
Returns existing variants of specified product with added new categories specified with default options. Categories which are already included are ignored.
Protected methodAddNewCategoriesToVariantsOfProductInternal
Returns existing variants of specified product with added new categories specified with default options. Categories which are already included are ignored.
Public methodStatic memberAreCategoriesUsedInVariants
Checks if the specified categories are used in variants of specified product.
Protected methodAreCategoriesUsedInVariantsInternal
Checks if the specified categories are used in variants of specified product.
Public methodStatic memberCreateVariant
Creates new variant object (from product and options) without saving it.
Protected methodCreateVariantInternal
Creates new variant object (from product and options) without saving it.
Public methodStatic memberDeleteAllVariants
Deletes all variants one by one. If delete operation is successful for processing variant removeSucceededAction with variant ID as a parameter is launched.
Protected methodDeleteAllVariantsInternal
Deletes all variants one by one. If delete operation is successful for processing variant removeSucceededAction with variant ID as a parameter is launched.
Public methodStatic memberDeleteVariant(Int32)
Deletes the specified variant.
Public methodStatic memberDeleteVariant(ProductVariant)
Deletes the specified variant.
Protected methodDeleteVariantInternal
Deletes the specified variant.
Protected methodGenerateRemainingVariants
Returns list of product variants with newly generated remaining combinations for specified product but with specified variants (listOfVariants) that doesn't need to be saved yet.
Public methodStatic memberGetAllPossibleVariants(ListProductVariant)
Gets all possible variants for specified set (Returns provided variants plus remaining combinations).
Public methodStatic memberGetAllPossibleVariants(Int32, IEnumerableInt32)
Gets all possible variants for specified product and all combinations (including existing variants) of options from categories.
Public methodStatic memberGetAllPossibleVariantsCount
Gets number of all variants, which can be generated including existing variants of options from categories.
Protected methodGetAllPossibleVariantsCountInternal
Gets number of all variants, which can be generated including existing variants of options from categories.
Protected methodGetAllPossibleVariantsInternal(ListProductVariant)
Gets all possible variants for specified set (Returns provided variants plus remaining combinations).
Protected methodGetAllPossibleVariantsInternal(Int32, IEnumerableInt32)
Gets all possible variants for specified product and all combinations (including existing variants) of options from categories.
Public methodStatic memberGetEnabledOptionsWithVariantOptions
Gets options from option category assigned to sku which are enabled or already used in variants.
Protected methodGetEnabledOptionsWithVariantOptionsInternal
Gets options from option category assigned to sku which are enabled or already used in variants.
Public methodStatic memberGetProductVariant
Gets SKU object of product variant from parent product and options.
Protected methodGetProductVariantInternal
Gets SKU object of product variant from parent product and options.
Public methodStatic memberGetProductVariantsCategories
Gets the product variants categories for specified product.
Protected methodGetProductVariantsCategoriesInternal
Gets the product variants categories for specified product.
Public methodStatic memberGetUsedProductOptionCategories
Gets enabled product option categories included disabled option categories used in product variants.
Protected methodGetUsedProductOptionCategoriesInternal
Gets enabled product option categories included disabled option categories used in product variants.
Public methodStatic memberGetVariants
Gets the variants of specified product.
Protected methodGetVariantsInternal
Gets the variants of specified product.
Public methodStatic memberCheckAvailableProductAttributes
Checks if specified product options are assigned to product and are allowed in it.
Protected methodCheckAvailableProductAttributesInternal
Checks if specified product options are assigned to product and are allowed in it.
Public methodStatic memberCheckVariantCategoriesConsistency(Int32, ProductAttributeSet)
Checks if specified product options contains all and only categories from existing variants of specified product.
Public methodStatic memberCheckVariantCategoriesConsistency(Int32, IEnumerableInt32)
Checks if specified categories are used all and only in variants of specified product.
Protected methodCheckVariantCategoriesConsistencyInternal(Int32, ProductAttributeSet)
Checks if specified product options contains all and only categories from existing variants of specified product.
Protected methodCheckVariantCategoriesConsistencyInternal(Int32, IEnumerableInt32)
Checks if specified categories are used all and only in variants of specified product.
Public methodStatic memberCheckVariantOptions
Checks if the variant options in specified variant corresponds with options determined in parent product.
Protected methodCheckVariantOptionsInternal
Checks if the variant options in specified variant corresponds with options determined in parent product.
Public methodStatic memberRegenerateSKUNameAndNumber
Regenerates the SKU name and number.
Protected methodRegenerateSKUNameAndNumberInternal
Regenerates the SKU name and number.
Public methodSetAsDefaultHelper
Sets this object as the default helper
(Inherited from AbstractHelperHelperType.)
Public methodStatic memberSetProductVariant
Saves this instance of product variant with specified product options to database.
Protected methodSetProductVariantInternal
Saves this instance of product variant with specified product options to database.
Public methodStatic memberVariantExists
Determines that variant for specified product with specified options exists.
Protected methodVariantExistsInternal
Determines that variant for specified product with specified options exists.
Top
See Also