Query product variations
Query a variation of a product by a property
To query a single variation, you must perform the following:
- Get an instance of the catalog manager.
Get an instance of the CatalogManager object.
- Get the specified variation.
To get the specified variation, you must either call the GetProductVariation method of the manager and pass the ID of the variation as an argument, or call the GetProductVariations method and filter the collection by one of the properties of the variation (e.g. Sku).
Use the following code samples to query a single variation by ID and by SKU:
Query variation by ID
Query variation by SKU
Query the variations of a product by the ID of the product
To query variations by a specified product, you must perform the following:
- Get an instance of the catalog manager.
Get an instance of the CatalogManager object.
- Get the variations.
To get the variations, you must call the GetProductVariations method and pass the ID of the product as an argument.
Use the following code sample:
Query all variations
To query all variations, you must perform the following:
- Get an instance of the catalog manager.
Get an instance of the CatalogManager object.
- Get the variations.
To get the variations, you must call the GetProductVariations method.
Use the following code sample: