Item types
Read our announcement about The concept of Item types for non-products
Out of the box we treat all items as products. On instance-level we can configure any attribute as discriminator to distinguish types of data. We call this the item-type characteristic.
When configured, this item-type characteristic will then be exposed by our Frontend API. You'll notice there is a type
field for every item returned by the API.
<item>
<type>product</type>
<itemno>10001-101</itemno>
<title>Tweakwise Hoodie Blue</title>
...
</item>
{
"type": "product",
"itemno": "10001-101",
"title": "Tweakwise Hoodie Blue",
// ...
}
This concept will allow you to use different types of content besides products: editorial content, content search, promotional content, you name it!
Predefined types
Type | Description |
---|---|
product | out-of-the-box everything is a product |
visual | out-of-the-box support for displaying promotional items in demoshop & Tweakwise JS. |
These will be extended in the future. To make sure these will never conflict with your prefered types, prefix your types. To prevent future conflicts, we will do the same.
Example
Read how you can use this to integrate a visual in lister pages π
Next steps
Currently we support display of a single position in the results.
In the future we will:
- investigate additional ways of getting data into Tweakwise
- extend the Frontend API to expose item-specific attributes, for example a promotion item would include panel-bg-color and a product would include sale-price.
- extend Tweakwise JS with more component types that work out-of-the-box.
Keep an eye on the release notes and roadmap!
Updated 2 months ago