Documentation for SmartStore.NET 2.2

Skip to end of metadata
Go to start of metadata

You can use the following endpoints: ProductAttributes (types of attributes), ProductVariantAttributes (attribute types mapped to a product), ProductVariantAttributeValues (attribute values assigned to a product) and optionally ProductVariantAttributeCombinations (additional information for particular attribute combinations). Because managing attributes that way can lead to some extra work, there is an action method ManageAttributes that sums up the most important steps.

Example

The request configures a product with the ID 211 with two attributes, Color and Size, and its values, Red, Green, Blue and Large, X-Large. The action parameter Attributes is of type ManageAttributeType. See the OData metadata document for a complete list of available properties. If Synchronize is set to false, only missing attributes and attribute values are inserted. If set to true, existing records are also updated and values not included in the request body are removed from the database. If you pass an empty value array, the attribute and all its values are removed from the product.

The following method creates all possible attribute combinations for a product with the ID 211. As a first step, this action always deletes all existing attribute combinations (for a product).

Example
  • No labels