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. ❤️
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>
The value of these attributes does not change, for example
data-8select-widget-id
.The value of these attributes can change, for example
data-sku
. Depending on the product, a different value will be used here.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();
Last modified 1mo ago