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 typeApp block
Product Page UpsellProduct Upsell
Product Add-OnsProduct Add-ons

Before you start

Use the app block

1. Add the block

  1. In your Shopify admin, go to Online Store > Themes and click Customize.
  2. At the top of the theme editor, open your product template.
  3. In the left sidebar, click Add block in the Product information section.
  4. 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.

Theme editor Add block panel, Apps tab, with the Product Upsell and Product Add-ons blocks from XB: AI Product Upsell & Addons

2. Set up the block

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

Product Upsell block settings with Link to featured product, Show example and Margin Horizontal

SettingWhat it doesDefault
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 exampleShows 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 HorizontalSpace above and below the offer, from 0 to 120 px.16 px

3. Move the block and save

  1. Drag the block to the place you want, for example above the product title.
  2. 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:

Theme editor preview with the You might also like these upsell 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.

  1. Open Offers, click the name of a Product Add-Ons offer, then click Offer.
  2. Below Pricing setting, copy the code under Use this code for custom placement or page builders (Optional).

Use this code for custom placement or page builders (Optional) with the Product Add-Ons code snippet

  1. 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.