Skip to content

Dealer cart built-in

The dealer-cart built-in adds a cart action to the page header.

js
{
  id: 'dealer-cart',
  enabled: true,
  options: {
    label: 'Cart',
    href: '/cart',
  },
}
OptionTypeDefaultPurpose
labelstringCartVisible action label.
hrefstringNoneCustomer-owned destination.

Relative links resolve against the embedding website.

Open a host-owned cart

Omit href to dispatch iconfigurator.cart-click on document:

js
document.addEventListener('iconfigurator.cart-click', () => {
  window.dispatchEvent(new CustomEvent('YOUR_CART_OPEN_EVENT'))
})
js
{
  id: 'dealer-cart',
  enabled: true,
  options: {
    label: 'View cart',
  },
}

Register the listener before loading the embed. The event does not include credentials, cart contents, or product data; the host website remains responsible for its cart state.

Icon Visualizer developer documentation