window.Genlook.cabin that you can use to control the widget programmatically from your theme code.
The SDK is available on every product page where the Genlook widget block is installed in the Shopify theme editor, even if try-on is disabled for the current product.
API Reference
Genlook.cabin.enabled
Type: boolean
Whether virtual try-on is enabled on the current product page. This is determined by the product and collection metafield settings configured in the Genlook admin.
Genlook.cabin.open()
Opens the try-on widget modal. The widget is lazy-loaded on first call — subsequent calls open instantly.
Genlook.cabin.fetch(url, options)
Authenticated fetch through the Shopify app proxy. Use this for all endpoint calls.
/apps/proxy_genlook-x/public) is prepended automatically.
Custom Button
To replace the default try-on button with your own, enable “Hide Built-in Button” in the widget block settings, then add a button anywhere in your theme:genlook-custom-button CSS class is automatically hidden by the widget when try-on is not enabled on the current product. This means you can place the button in your product template without conditional logic — it will only appear on enabled products.

