Complete example
Initialization fields
Product object
id or handle. The loader verifies it against the synced enabled catalog before mounting.
string
Stable product ID from catalog sync. Keep this ID unchanged when the shopper selects another variant.
string
Synced product handle. Provide
id or handle.string
Current shopper-facing title.
string
Product display fallback. It does not replace canonical prepared media.
string
Optional exact
source_variant_id synced under the product.string
Optional selected-variant display hint. Canonical synced variant media remains authoritative for try-on.
setProduct when a dynamic storefront changes the product or selected variant. See the Browser API.
Customer and authentication
auth.loginUrl accepts a string or callback. The callback receives:
returnTo— Current absolute page URL.product— Resolved product context, ornull.location— Currenthref, origin, pathname, search, and hash.
showToAnonymous controls whether a logged-out shopper can see a login call to action when your virtual.fit settings require authentication. The customer-access policy in virtual.fit remains authoritative.
Terms object
fullHtml— Pass full HTML directly.fullSelector— ReadinnerHTMLfrom an existing host-page element.
Single-tag installation
When a platform allows one script tag but no inline queue, use data attributes:loginUrl needs callback logic.
Legacy aliases
Useterms for disclaimer and legal content. Use labels for interface text. Older content and ui aliases remain accepted for existing installs, but new integrations should not depend on them.