How to show the offer in a custom position
Overview
By default, Product Page Upsell and Product Add-Ons offers show above the add to cart button. To choose the position yourself, add the offer's app block in the theme editor. For Product Add-Ons, you can also paste a code snippet in your theme or page builder.
When the page has the app block or the code snippet, the offer shows there instead of above the add to cart button.
| Offer type | App block |
|---|---|
| Product Page Upsell | Product Upsell |
| Product Add-Ons | Product Add-ons |
Before you start
- Turn on the Xboost Product Upsell app embed. See How to enable the app embed.
Use the app block
1. Add the block
- In your Shopify admin, go to Online Store > Themes and click Customize.
- At the top of the theme editor, open your product template.
- In the left sidebar, click Add block in the Product information section.
- Open the Apps tab and select Product Upsell or Product Add-ons from XB: AI Product Upsell & Addons. To find them faster, type the app name in the search box.

2. Set up the block
Click the block in the left sidebar to see its settings. Both blocks have the same settings:

| Setting | What it does | Default |
|---|---|---|
| Link to featured product (optional, only for featured products) | Shows the offer of the product you select. Use it when the block is in a featured product section on another page, such as the home page. Leave it empty on product pages. | Empty |
| Show example | Shows a sample offer in the theme editor when the product has no offer, so you can see the block. Shoppers never see the sample. | On |
| Margin Horizontal | Space above and below the offer, from 0 to 120 px. | 16 px |
3. Move the block and save
- Drag the block to the place you want, for example above the product title.
- Click Save in the theme editor.
The offer shows where you placed the block. In this example the Product Upsell block is above the product title:

Use the code snippet (Product Add-Ons)
Use the code snippet with a page builder or when you edit theme code.
- Open Offers, click the name of a Product Add-Ons offer, then click Offer.
- Below Pricing setting, copy the code under Use this code for custom placement or page builders (Optional).

- Paste the code in your product page template or page builder where the add-ons should show:
<div id="xb-product-addon-root"></div>
Use the snippet once per page. The code is the same for every Product Add-Ons offer: the app shows the offer of the product on that page. Product Page Upsell offers have no code snippet. Use the app block for them.