> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elasticfunnels.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Product Attributes

> Create reusable, typed brand-level attributes (Color, Material, Scent, etc.) and assign values per product or variant

Product Attributes are brand-level, reusable field definitions that you can apply across all products. Unlike [Custom Attributes](/products/custom-attributes) (legacy unstructured key/value pairs), Product Attributes support rich field types, filtering, storefront visibility, and variant-level scoping.

## Managing Attribute Definitions

Go to **Settings → Products → Product Attributes** to create, edit, and reorder attribute definitions.

Each attribute definition has:

| Field                       | Description                                                     |
| --------------------------- | --------------------------------------------------------------- |
| **Name**                    | Display label (e.g. "Material", "Scent")                        |
| **Slug**                    | Auto-generated URL-safe key used in templates (e.g. `material`) |
| **Field Type**              | See full type list below                                        |
| **Applies To**              | Where values are stored: Product, Variant, or Both              |
| **Options**                 | For `select` and `multiselect` types: the allowed values        |
| **Required**                | Whether a value must be set before saving                       |
| **Filterable**              | Available as a storefront/catalog filter                        |
| **Visible on Product Page** | Shown in the product page details section                       |

***

## Field Types

Product Attributes support the full set of CRM-style field types:

| Type          | Input               | Use Case                                |
| ------------- | ------------------- | --------------------------------------- |
| `text`        | Single-line text    | Short values (colour name, size label)  |
| `textarea`    | Multi-line text     | Longer descriptions without formatting  |
| `rich_text`   | Rich text           | Formatted content                       |
| `wysiwyg`     | WYSIWYG editor      | Full rich text editing                  |
| `email`       | Email input         | Contact or support email                |
| `phone`       | Phone input         | Contact number                          |
| `url`         | URL input           | Product page, demo link                 |
| `number`      | Number input        | Weight, volume, count                   |
| `date`        | Date picker         | Release date, expiry date               |
| `datetime`    | Date & time picker  | Event datetime                          |
| `boolean`     | Checkbox (Yes/No)   | Organic, Vegan, In stock                |
| `select`      | Dropdown            | Single value from predefined options    |
| `multiselect` | Checkboxes          | Multiple values from predefined options |
| `color`       | Color picker + text | Hex colour value                        |
| `image`       | URL text input      | Image URL                               |
| `file`        | URL text input      | File URL                                |
| `json`        | Monospace textarea  | Structured JSON data                    |

***

## Applies To Scoping

The `applies_to` field controls where attribute values are stored and edited:

| Value     | Behaviour                                                                                          |
| --------- | -------------------------------------------------------------------------------------------------- |
| `product` | Value is stored at the product level. Edited in the **Attributes** tab of the Product Detail Page. |
| `variant` | Value is stored per variant. Edited in the **Variants** tab per variant row (coming soon).         |
| `both`    | Product-level default, but can be overridden per variant.                                          |

***

## Assigning Values to Products

Open any product and go to the **Attributes** tab. You will see all brand-level attribute definitions that apply to the product level. Fill in values and save.

Attributes with `applies_to = variant` are managed in the Variants tab, not the Attributes tab.

***

## Template Access

### List Definitions

```
{% set attrs = GetProductAttributes() %}
{% for attr in attrs %}
  {{ attr.slug }}: {{ attr.name }} ({{ attr.type }})
{% endfor %}
```

Filter by scope or visibility:

```
{% set visibleAttrs = GetProductAttributes({ visible: true, applies_to: 'product' }) %}
```

### Get Product Values

```
{% set vals = GetProductAttributeValues(product) %}
{{ vals.material }}
{{ vals.scent }}
```

### Shorthand Filters

When a product is loaded via `GetProduct()`, attribute values and definitions are pre-loaded:

```
{{ product | attr:'material' }}        — value by slug
{{ product | attrLabel:'material' }}   — display label by slug
```

### Full Display Example

```
{% set attrDefs = GetProductAttributes({ visible: true }) %}
{% set attrVals = GetProductAttributeValues(product) %}
<dl>
{% for def in attrDefs %}
  {% set val = attrVals[def.slug] %}
  {% if val %}
    <dt>{{ def.name }}</dt>
    <dd>{{ val }}</dd>
  {% endif %}
{% endfor %}
</dl>
```

***

## Relationship to Custom Attributes

[Custom Attributes](/products/custom-attributes) are legacy unstructured key/value pairs stored directly on the product. Product Attributes are the preferred system — typed, reusable, filterable, and scoped to product or variant level.

Both systems can coexist. Custom Attributes are available under the **Custom Attributes** tab; Product Attributes under the **Attributes** tab.
