Skip to main content

Tags and attributes

Both describe a product. The difference is how many products share the value.

TagAttribute
ValueConstant, chosen from a listTyped by hand for each product
Good forColor, size, brand, collection, an offerA chassis number, the mileage of a used car, a registration date, a technical note
ExampleColor: White, Black, RedVIN: 1FA6P8CF5G…

If a value repeats across many products, it is a tag. If it is different every time, it is an attribute. An attribute for "Color" is a modeling mistake.

Tags​

A tag is the label ("Color") and a tag value is one value of it ("Red"). Both are translated, so a German visitor sees "Farbe: Weiss" and an Italian one "Colore: Bianco" on the same product.

A tag has a type (string, number or date), and three switches:

  • Relevant: the APIs return it with the product, to show it on the page.
  • Filterable: visitors can filter by it ("all products in green").
  • Sortable: products can be sorted by it.

It can also have an icon (from React Icons), a position, and a label, which is a unit: with the label "kg", the value 10 is shown as "10 kg". A tag value has a value and an alias (for integrations or code: the "White" value can have #ffffff), and a visibility switch to turn it off without deleting it.

A tag of type number or date can have range filters: visitors filter by an interval.

Tags and options​

A product's options are made of tag values. Create the tag ("Shoe size") and its values (40, 41, 42) once, then pick which values each product offers. The same value is written one way everywhere ("XL", never "Extralarge" the next time), and a new product takes a few clicks.

Attributes​

An attribute has a name, a type (string, number or date) and a label (a unit, such as "km"), an icon and a position, as a tag does, and the name and the value are translated. Its value is set on each product or variant.

Because the values are different, attributes support:

  • Range filters on numbers and dates: "mileage between 10,000 and 50,000".
  • Text search: searching for an exact VIN or mileage finds the product.
  • Sorting: from the newest registration to the oldest.