Skip to main content

Adjust widget type

In order to use the Recommendation Engine, your html element needs to know that. Just change the data-oz-widget to data-oz-widget="alternatives" attribute like this:

Default button

<div
data-oz-widget="alternatives"
data-oz-embed="launcher"
data-oz-code="{{ product.ean }}"
data-oz-name="{{ product.title }}"
data-oz-image="{{ product.image.src }}"
data-oz-price="{{ product.price }}"
></div>

Custom button

<button
id="my-custom-oz-button"
data-oz-widget="alternatives"
data-oz-embed="custom"
data-oz-code="{{ product.ean }}"
data-oz-name="{{ product.title }}"
data-oz-image="{{ product.image.src }}"
data-oz-price="{{ product.price }}"
data-oz-fullscreen="true"
>
What's my size?
</button>