When managing a wide range of similar products, such as T-shirts available in multiple colors and sizes, effective organization becomes crucial. In Venddor IO, for such scenarios, these items are grouped together under what's called a "variation group." This grouping ensures customers can easily switch between the different variations when browsing the storefront.
Every product can be part of only one variation group at a time, but if required, it can be shifted to another group effortlessly. When a variation is delinked from its group, it reverts to being a regular, standalone product.
Product Variations
Through pagination, you can control how many variation groups are displayed at a time. The page parameter dictates the current page number, while items_per_page controls the number of variation groups shown.
Venddor IO provides options to filter variation groups based on product_ids and feature_ids, ensuring that the results are tailored to specific products or features.
Some of the important fields associated with variation groups include:
id: Unique identifier for the variation group.code: Symbolic code for the variation group.features: Detailed list of product features contributing to the creation of the variation group.products: Detailed list of products under the variation group.You can establish a new variation group using the following command:
curl -X POST "http://example.com/api/product_variations_groups" \
-H "Content-Type: application/json" \
-H "Authorization: Basic ******" \
-d '{"product_ids":[286,287,288], "code":"MY_GROUP_1", "features":[{"feature_id":549, "purpose":"group_catalog_item"}]}'
Note: Ensure each product has distinct feature variants for successful group creation.
To get a comprehensive list of variation groups, execute:
curl -X GET "http://example.com/api/product_variations_groups" \
-H "Content-Type: application/json" \
-H "Authorization: Basic ******"
Depending on your preference, you can either use the group's ID or its symbolic code:
curl -X GET "http://example.com/api/product_variations_groups/:id" \
-H "Content-Type: application/json" \
-H "Authorization: Basic ******"
Or
curl -X GET "http://example.com/api/product_variations_groups/:code" \
-H "Content-Type: application/json" \
-H "Authorization: Basic ******"
curl -X PUT "http://example.com/api/product_variations_groups/:code" \
-H "Content-Type: application/json" \
-H "Authorization: Basic ******" \
-d '{"code":"MY_GROUP_NEW"}'
curl -X DELETE "http://example.com/api/product_variations_groups/:code" \
-H "Content-Type: application/json" \
-H "Authorization: Basic ******" \
-d '{}'
Through the above functionalities and features, Venddor IO provides a systematic method to manage and present product variations, ensuring a smooth and organized browsing experience for end-users.