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
- Code
- Example
<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>
<div
data-oz-widget="alternatives"
data-oz-embed="launcher"
data-oz-code="8053323623809"
data-oz-name="Cinelli Veltrix Potenza Road Bike 2020"
data-oz-image="https://cdn.bike24.net/i/mb/a2/62/2d/301915-00-d-617909.jpg"
data-oz-price="2699.0"
></div>
Custom button
- Code
- Example
<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>
<button
id="my-custom-oz-button"
data-oz-widget="alternatives"
data-oz-embed="custom"
data-oz-code="8053323623809"
data-oz-name="Cinelli Veltrix Potenza Road Bike 2020"
data-oz-image="https://cdn.bike24.net/i/mb/a2/62/2d/301915-00-d-617909.jpg"
data-oz-price="2699.0"
data-oz-fullscreen="true"
>
What's my size?
</button>