Widgets
UI elements for web
Content is displayed in the shop with the help of various widgets. The widgets are simple HTML elements and are filled with content by our 8.SDK Web. The widgets are configured via data attributes. There are static and dynamic attributes.
The 8SELECT integration team will adjust the widget styling 🎨 to your shop design. ❤️

Example 8.SET Compose

The widget is used to display cross-selling content in the form of product sets for a product.
<div data-8select-widget-id="8.SET-Compose" data-sku="42"></div>
You can find a detailed description in the WIDGETS section.

Static Attributes

The value of these attributes does not change, for exampledata-8select-widget-id.

Dynamic Attributes

The value of these attributes can change, for example data-sku. Depending on the product, a different value will be used here.

Adding widget elements after 8.SDK was added

If you add 8SELECT widgets asynchronous the 8.SDK has to be informed about new widgets via its API.
// failsafe if the 8.SDK is not yet injected
if (typeof _8select === "undefined") {
return
}
// scan DOM for 8SELECT widgets and fill with content
_8select.initCSE();
Copy link
Outline
Example 8.SET Compose
Static Attributes
Dynamic Attributes
Adding widget elements after 8.SDK was added