Skip to main content

shopify:product:select

Fires when a buyer changes a product option, such as picking a different size or color.

This follows a buyer through the option picker, before the buyer adds anything to the cart. The resolved variant carries the price and availability the buyer is now looking at.

The event carries the options the buyer chose. The promise resolves with the variant those options map to, because the storefront looks that up after the change.

You dispatch it from the product element that holds the option picker. A selection with no matching variant resolves with a null variant rather than rejecting. A failed lookup rejects the promise.

Anchor to product
product
required

The product whose options changed.

Anchor to selectedOptions
selectedOptions
[]
required

The options after the change. Contains at least one entry.

Anchor to promise
promise
Promise<>
required

Resolves with the matching variant once the storefront has looked it up.

Anchor to detail
detail
Record<string, unknown>

Optional custom data for the storefront's internal use. Listeners can read it.


Was this page helpful?