Theme App Extension

The Stylux Button Offer block places the personalization button on a product page. Use it on Shopify Online Store themes. Headless storefronts should render the offer and use a cart adapter instead.

The block does not load the SDK. Install the Shopify app and load the SDK with the Shopify plugin on the theme first. If the SDK is not on the page, the block does nothing.

Add the block

  1. In Shopify admin, go to Online Store, then Themes, then Customize.
  2. Open a product template.
  3. Add the app block named Stylux Button Offer.
  4. Place it where the personalization button should appear, usually next to the theme's add to cart button.
  5. Save.

The block shows the offer for the variant selected on that page. If the variant has no Stylux offer, customers see no button. Choosing the button opens personalization for that product. See Rendering Offers.

When the customer changes variants, the Shopify plugin refreshes the button. Variant detection is on by default.

Block settings

SettingDefaultWhat it changes
Container IDstylux-offer-containerWhere the button renders. This matches the SDK default. If you change it, set selectors.offers.BUTTON or offerElementId to that same id. See Selectors.
Container classesstylux-offer-containerClasses on the container around the button.
Button element classesstylux-offer-btnClasses on the button itself.
Offer channelAutoD2C, B2B, or Auto. Auto reads a channel query param of D2C or B2B from the page URL. Any other value, including a missing param, uses D2C.

Did this page help you?