Product features allow you to define and manage various attributes of products in your store. Features help customers compare products and make informed purchasing decisions.
For comprehensive information about product features, please visit the CS-Cart Developer Guide:
Product features are characteristics or attributes that define products in your store. They can be used to:
The Venddor API supports several types of product features:
Type Code | Type Name | Description |
---|---|---|
C |
Checkbox | A simple yes/no feature (e.g., "Waterproof") |
S |
Select Box | A dropdown with predefined variants (e.g., "Material" with options like "Cotton", "Polyester", etc.) |
M |
Multiple Checkbox | Multiple options can be selected (e.g., "Connectors" with options like "HDMI", "USB", "DisplayPort") |
N |
Number | Numeric values (e.g., "Weight in kg") |
T |
Text | Free-form text input (e.g., "Model Number") |
D |
Date | Date selection (e.g., "Manufacturing Date") |
E |
Extended | Brand/Manufacturer selection (a specialized feature type) |
Retrieves a list of all product features with their details.
Parameter | Type | Required | Description |
---|---|---|---|
feature_types | string | No | Filter features by type (e.g., "C,S,M" for Checkbox, Select Box, and Multiple Checkbox) |
get_variants | string | No | Set to "Y" to include feature variants in the response |
Retrieves details of a specific product feature.
Parameter | Type | Required | Description |
---|---|---|---|
feature_id* | integer | Yes | The unique identifier of the feature to retrieve |
Creates a new product feature.
Parameter | Type | Required | Description |
---|---|---|---|
feature_type* | string | Yes | The type of feature (e.g., "C", "S", "M", etc.) |
description* | string | Yes | The name/description of the feature |
categories_path | string | No | Category IDs where the feature should be available (comma-separated) |
variants | array | No | Feature variants (required for Select Box and Multiple Checkbox types) |
{ "feature_type": "S", "description": "Material", "categories_path": "12,15,18", "variants": [ { "variant": "Cotton" }, { "variant": "Polyester" }, { "variant": "Wool" } ] }
After creating product features, you can assign them to specific products:
Updates a product to assign features.
{ "product_features": { "16": "42", // Feature ID 16 = Variant ID 42 "18": "Y", // Checkbox feature ID 18 = Yes "23": "500", // Number feature ID 23 = 500 "25": "Model X15" // Text feature ID 25 = "Model X15" } }
Product features can be used to create powerful filtering capabilities in your store. The API supports retrieving filtered products:
Retrieves products filtered by specific feature values.
Parameter | Type | Required | Description |
---|---|---|---|
features_hash | string | No | Encoded filter criteria based on feature values |