Skip to content

ProductAttributeGroup

The ProductAttributeGroup object represents a single group of attributes of a product.

classDiagram
  direction LR
  Product --> ProductAttributeGroupsList
  ProductAttributeGroupsList "1" --o "*" ProductAttributeGroup
  ProductAttributeGroup --> ProductAttributesList
  ProductAttributesList "1" --o "*" ProductAttribute
  class Product{
  }
  class ProductAttributeGroupsList{
  }
  class ProductAttributesList{
  }
  class ProductAttribute{
  }
  class ProductAttributeGroup{
    int id
    string name
    bool hasValues
    ProductAttributesList attributes
  }

Properties

Attribute name Type Description
id int The unique identifier of the group.
name string The name of the group.
hasValues bool Returns true if any attribute within the group has nonempty value.
attributes ProductAttributesList Reference to the ProductAttributesList object that represents the list of ProductAttribute objects associated with this group.

Examples

id property

{{ productAttributeGroup.id }}
1

name property

{{ productAttributeGroup.name }}
Battery specification

hasValues property

{{ productAttributeGroup.hasValues }}
true

attributes property

{{ productAttributeGroup.name }}:
{% for attribute in productAttributeGroup.attributes %}
    - {{ attribute.name }}: {{ attribute.value }}
{% endfor %}
Battery specification:
- Weight: 125g
- Capacity: 90 mAh