ProductAttribute¶
The ProductAttribute object represents a single attribute value of a product in the given attribute group.
classDiagram
direction LR
ProductAttribute --> Product
ProductAttribute --> ProductAttributeGroup
class Product{
}
class ProductAttributeGroup{
}
class ProductAttribute{
int id
string name
string description
bool isCheckbox
bool hasMultipleValues
string value
string[] values
ProductAttributeGroup group
Product product
}
Properties¶
Attribute name | Type | Description |
---|---|---|
id | int |
The unique identifier of the product's attribute. |
name | string |
The name of the attribute. |
description | string |
The description of the attribute. |
isCheckbox | bool |
Returns true if attribute is checkbox like tickable parameter. |
hasMultipleValues | bool |
Returns true if attribute supports selecting multiple values. |
value | string |
The value of the attribute. If attribute is based on checkbox logic, the returned value is stringified 1 or 0 . If attribute has multiple values, the returned value is stringified list of joined values with comma. |
values | string[] |
The array of values of the attribute. If attribute is based on checkbox logic, the returned value is one element array of stringified 1 or 0 . If attribute has multiple values, the returned value is an array of stringified values. If attribute has single value, the returned value is one element array of stringified value. |
group | ProductAttributesGroup |
The ProductAttributesGroup object associated with this attribute. |
product | Product |
The Product object associated with this attribute. |