Skip to main content

How to Create a Product Page Cross-Sell Pop-Up Widget

Build a Product Cross-Sell pop-up that opens when a shopper adds a product on your product page to the cart: create it, connect a Data Source, install it, and go live.

Written by Christian Sokolowski

A Product Cross-Sell Pop-Up widget opens a pop-up of product recommendations on your Shopify product page when a shopper adds that page's product to the cart, so the shopper can add complementary products before moving on. This guide takes you from an empty widget to a live one: create the widget, check its pop-up settings, connect a Data Source, set the layout and copy, install it on your product page template, and turn on Live Mode.

How to Create a Product Page Cross-Sell Pop-Up Widget, a Rebuy Product Cross-Sell Pop-Up open over a Shopify product page after the shopper added the product, showing recommended products with Add to Cart buttons


​Product Cross-Sell is the widget type name the Rebuy widget editor shows for this widget. A Product Cross-Sell Pop-Up is a Product Cross-Sell widget with Display Type set to Popup, which is the same widget type behind the inline product page recommendation widget. A cross-sell adds the recommended product alongside the product the shopper just added, so the cart ends up with the added product and the recommendation, and it never replaces the product the shopper added.

Requirement: The Product Cross-Sell Pop-Up is created under Cart & Merchandising > Widgets in the Rebuy dashboard and installed on your Shopify product page template. It does not require Rebuy's Smart Cart.

Choose the right add-to-cart pop-up for the offer

Rebuy has several pop-ups that can open when a shopper adds a product to the cart, and they differ in where they are installed and in what happens to the cart. Pick the right one before you start building. The table below matches each goal to its pop-up, then gives where that pop-up is created and installed and what it does to the cart.

Your goal

Pop-up

Where it is created and installed

What happens to the cart

Offer complementary products right after a shopper adds the product they are viewing

Product Cross-Sell Pop-Up (this guide), built from the Add to Cart Cross-Sell (Popup) card

Created under Widgets, installed on the product page template

The recommended product is added alongside the product the shopper added

Offer complementary products based on what is in the cart, from inside Rebuy's Smart Cart

Cart Cross-Sell Pop-Up

Created as a Cross-Sell Widget component in the Smart Cart editor, with nothing installed in the theme

The recommended product is added alongside the items already in the cart

Offer a higher value alternative to the product the shopper added

Product Upsell pop-up, built from the Add to Cart Upsell (Popup) card

Created under Widgets, installed on the product page template

The product the shopper added is replaced by the upsold product

Offer the subscription version of the product the shopper added

Switch to Subscription Pop-up, built from the Add to Cart Subscription Upsell (Popup) card

Created under Widgets, installed on the product page template

The one-time item is replaced by the same product as a subscription

For the Smart Cart version, see How To Create A Cart Cross Sell Pop Up Widget. For the upsell, see How To Create A Product Upsell Widget, and for the subscription pop-up, see Switch To Subscription Pop-up. If you want recommendations that sit inline on the product page instead of opening in a pop-up, follow How to Create a Product Page Cross-Sell Widget.


Step 1: Create the Product Cross-Sell Pop-Up widget

A Product Cross-Sell Pop-Up widget is created on the Create New Widget page, starting from the Add to Cart Cross-Sell (Popup) card.

  1. In the Rebuy admin sidebar, click Cart & Merchandising and then Widgets. On some plans the sidebar shows a single Merchandising Widgets entry instead, which opens the same Widgets page.

  2. Click Create New. If this is your store's first widget, the button reads Create Your First Widget instead.

  3. Find the Add to Cart Cross-Sell (Popup) card. To find it quickly, type cross-sell into the search bar, or set the Location dropdown above the cards to Product Page.

  4. Click Create on the Add to Cart Cross-Sell (Popup) card.

The widget editor opens with your Product Cross-Sell Pop-Up widget created. Rebuy does not ask you to choose a location for this widget, because the Add to Cart Cross-Sell (Popup) card offers only one location, Product Page. Rebuy names the new widget after the card and creates a Data Source for it named Product - Add to Cart Cross-Sell (Popup), which returns AI recommendations for the product on the page. On wide screens the editor's top bar shows the widget's location and type, PRODUCT PAGE and PRODUCT CROSS-SELL, next to the WIDGET ID you need for installation.

The goal buttons, the location picker, and the Your Widgets table are covered in Widget Dashboard Page: Create a Widget and Manage the Ones You Have.

How To Create A Product Cross Sell Pop Up Widget, the Add to Cart Cross-Sell (Popup) card on the Create New Widget page in the Rebuy admin, with its Create button and location tags

Important: When you create a new widget, Live Mode is on by default, which means the pop-up starts opening for shoppers the moment you install it in your Shopify theme. If you want to test it first, toggle Live Mode off in the widget editor before you install, then use Rebuy Preview Mode to check it.


Step 2: Check the pop-up settings

The pop-up settings are in Widget settings > General, and the Add to Cart Cross-Sell (Popup) card already sets Display Type and Popup Trigger for you. Any Product Cross-Sell widget becomes a pop-up the same way, so a widget built from another product page card such as AI Recommended turns into this pop-up when you set its Display Type to Popup.

  1. In the widget editor, open Widget settings.

  2. Under General, confirm Display Type is set to Popup.

  3. Confirm Popup Trigger is set to Add To Cart.

  4. Set Popup Delay to the number of seconds Rebuy should wait after the add before the pop-up opens. Enter 0 to open it right away.

  5. Optionally check Show continue button. It adds a button that closes the pop-up, labeled by the Continue field on the Language screen. Without it, shoppers close the pop-up with the X in its corner, by clicking outside it, or with the Escape key.

  6. Click Save.

How to Create a Product Page Cross-Sell Pop-Up Widget, the Widget settings General section with Display Type set to Popup, Popup Trigger set to Add To Cart, Popup Delay in seconds, and the Show continue button checkbox

Popup Trigger options for a product page pop-up

The Popup Trigger setting decides what opens a Product Cross-Sell Pop-Up, and it appears only while Display Type is Popup. The table below lists each trigger this widget offers and what opens the pop-up on a product page.

Popup Trigger

What opens the pop-up

Add To Cart

The shopper adds the product on the page to the cart. This is the trigger this guide is built around.

Page Load

The product page finishes loading, after the Popup Delay, whether or not the shopper adds anything.

Exit Intent

The shopper moves to leave the page.

Submit Event

The shopper submits the theme's product form, matched by a form selector that has no field in the widget editor. For an add-to-cart offer, use Add To Cart instead.

The Check Out trigger does not appear on a Product Cross-Sell Pop-Up, because it is reserved for Pre-Purchase widgets.

When an Add To Cart pop-up opens

A Product Cross-Sell Pop-Up set to Add To Cart opens only when the product the shopper adds is the product on the page. Adding a different product from the same page, for example from another Rebuy widget, does not open it. The pop-up opens again every time the shopper adds the page's product during the visit, so use Limit number of views in Widget settings > General > View Options if you want to cap how often one shopper sees it.


Step 3: Connect the Data Source

The Data Source of a Product Cross-Sell Pop-Up decides which products appear in the pop-up and whether the pop-up opens at all. The pop-up opens only when its Data Source returns at least one product, so the rules are your visibility control as well as your merchandising control.

  1. In the widget editor sidebar, find the DATA SOURCE section.

  2. Confirm the Endpoint dropdown points at the data source you want. A new pop-up points at Product - Add to Cart Cross-Sell (Popup), the data source Rebuy created with it.

  3. To change the rules, click Edit to open the connected data source in a new tab, or click Create new data source to start a new one.

  4. Add the IF rules that decide when the pop-up should open, and the RETURN rules that decide which products it shows.

  5. Set Max Number of Products displayed to how many recommendations the pop-up should request. The maximum is 20.

  6. Save the data source, then return to the widget editor and click Save.

How to Create a Product Page Cross-Sell Pop-Up Widget, the DATA SOURCE section with the Endpoint dropdown set to the Product - Add to Cart Cross-Sell (Popup) data source, the Edit link, and the Max Number of Products displayed slider

The data source Rebuy creates with this widget has a single IF Anything rule that returns AI recommendations for the product on the page, so the pop-up works without any rules written. Add rules when you want specific products to appear after specific adds, such as a matching accessory for one product line. For the full rule reference, see Data Sources 101.

The pop-up checks its Data Source again with the variant the shopper added

A Product Cross-Sell Pop-Up set to Add To Cart requests its products again after the shopper adds the page's product, and that request includes the exact variant the shopper added. That lets a pop-up offer different products for different variants, which a product page widget embedded in the page cannot do, since an embedded widget only knows which product is on the page.

  • To target a variant, write an IF rule on Product that names the specific variants you want, then a RETURN rule with the products to offer for them. The rule matches only when one of those variants is the one added.

  • The input product is the product on the page. Filter input products starts checked on the data source Rebuy created, so the pop-up does not recommend the product the shopper just added. Leave it checked for normal recommendations.

  • The pop-up needs the page's product ID to recognize the add and to send the variant. Installing it as described in Step 5 provides it.


Step 4: Set the layout and the copy

The Screens section of Widget settings lays out the products inside the pop-up, with one card per screen size: Large Screen for devices wider than 768px, Medium Screen for 481px to 768px, and Small Screen for 480px and narrower. Each card has its own Display Style, Carousel, Show Paginations, and Grid Columns, so set every screen size whenever you change one. Setting Display Style to None stops the pop-up from opening at that screen size. For a pop-up that offers one product, set Grid Columns to 1. The layout settings are explained in full in How to Create a Product Page Cross-Sell Widget.

The Language screen holds every piece of text the pop-up displays. A new pop-up opens with the super title You'll Also Love and the title Don't forget these customer favorites!

  1. In the widget editor, open Language.

  2. Under General, set Title to the heading shoppers should see, Super Title for the smaller line above it, and Description for a sentence below it. Super Title and Description can be left empty.

  3. Under Call to Action, adjust Add to Cart, Adding to Cart, and Added to Cart, which label each product's button.

  4. If you turned on Show continue button, set Continue to the label of the button that closes the pop-up.

  5. Click Save.

The Decline Offer field also appears under Call to Action, but the Product Cross-Sell Pop-Up has no decline button, so text entered in Decline Offer is not shown to shoppers. To change the label of the button that closes the pop-up, edit Continue instead.


Step 5: Install the pop-up on your product page template

A Product Cross-Sell Pop-Up only opens on pages where it is installed, and it has to be installed on the product page template so it can read the page's product ID. The widget editor generates the code for either install method.

  1. In the widget editor, click INSTALL in the top bar, which opens the installation guide for that widget.

  2. Install it using the method that matches your theme:

    • Online Store 2.0 themes: add a Rebuy Widget app block to your product page template, enter the widget ID, and leave Enable Product ID checked. Full steps are in Installing Rebuy Widgets via App Blocks in 2.0 Themes.

    • Vintage (1.0) themes: copy the container from Advanced > Dynamic Placement > HTML Div Placement into your theme's product template. It already includes the page's product ID. Full steps are in Manually Installing Widgets.

  3. Save the theme.

  4. Append the pop-up to the page body, as described in the next section.

How to Create a Product Page Cross-Sell Pop-Up Widget, the INSTALL button in the widget editor top bar that opens the installation guide for the pop-up

Append the pop-up to the page body

Appending a Product Cross-Sell Pop-Up to the page body is the fix Rebuy Support uses most often when a product page pop-up does not open or opens behind the cart drawer, and it is worth doing at install time. The pop-up is drawn inside the theme section that holds its container, so that section's styling carries over to it: a hidden section hides the pop-up, and a section layered below your cart drawer keeps the pop-up behind the drawer. Moving the container to the end of the page body takes it out of the section.

  1. In the widget editor, open Display.

  2. Under Breakpoints, open Large Screens and check Enable Dynamic Placement.

  3. Set Placement Selector to body and Placement Location to Append.

  4. Repeat for Medium Screens and Small Screens.

  5. Click Save.

The pop-up still reads the product ID from the app block or container you installed in your product template, so keep that installation in place. For more on placement selectors, see Dynamic Placement Selectors.

How to Create a Product Page Cross-Sell Pop-Up Widget, Display, Breakpoints, Large Screens with Enable Dynamic Placement checked, Placement Selector body and Placement Location Append


Step 6: Test the pop-up, then turn on Live Mode

Testing a Product Cross-Sell Pop-Up before shoppers see it is the reason to turn Live Mode off in Step 1. Once the pop-up is installed and working, Live Mode is what makes it public.

  1. With Live Mode off, open a product page on your storefront in Rebuy Preview Mode.

  2. Add the product with your theme's own Add to Cart button. The pop-up should open after the Popup Delay you set.

  3. Add a product from the pop-up and confirm it lands in the cart alongside the product you added, rather than replacing it.

  4. Repeat on a phone as well as a desktop, because the Screens settings are separate per screen size.

  5. Return to the widget editor, toggle Live Mode on, and click Save.

  6. Reload the product page as a normal shopper and add the product again.

If the pop-up does not open at this point, work through the FAQ below before anything else, then see Why Isn't My Widget Showing?.


Optional: add a discount to the pop-up's products

You can attach a discount to a Product Cross-Sell Pop-Up so its recommended products display at a reduced price. Making the discount apply at checkout takes one setting beyond the amount.

  1. In the widget editor, open Discount.

  2. Choose a Discount Type: Percentage, Fixed, or None, then enter the amount.

  3. Toggle Discounted By Functions on. This creates an automatic discount in Shopify scoped to this widget, so the discount applies when a shopper adds the product. Shopify Functions discounting is available on all Shopify plan types.

  4. Set Discounted From to Price or Compare at Price, depending on which value the discount should calculate against.

  5. Click Save.

If Discounted By Functions is left off, the pop-up shows the discounted price but the shopper is charged full price at checkout, because the widget's discount is display only in that mode. For the full picture, see the Rebuy Discounting Overview.


Widget editor settings that matter for a product page pop-up

The widget editor shows the same sections for every widget type, and most of them are shared. The table below lists the settings that change how a Product Cross-Sell Pop-Up behaves, where each one is, and what it does.

Setting

Where it is

What it does

Display Type

Widget settings > General

Popup makes the widget a pop-up. Embed turns it back into an inline product page widget.

Popup Trigger

Widget settings > General

What opens the pop-up. See the trigger table in Step 2.

Popup Delay

Widget settings > General

Seconds to wait after the trigger before the pop-up opens.

Show continue button

Widget settings > General

Adds a button that closes the pop-up, labeled by Language > Continue.

Add to Cart Redirect

Widget settings > General > View Options

What happens after a shopper adds a product from the pop-up. None (Stay on Current Page) keeps the pop-up open with that product's button showing its added label, so the shopper can add more. Close modal closes the pop-up after each add. Redirect to Cart and Redirect to Checkout send the shopper onward, and Redirect to Cart has no effect while Rebuy's Smart Cart is active.

Limit number of views

Widget settings > General > View Options

Caps how often one shopper sees the pop-up. Pair it with Max View Count and Every (in days).

Enable Timer

Widget settings > Timer

Adds a countdown that starts when the pop-up opens. Action decides what happens at zero: Dismiss Widget, Redirect to Cart, Redirect to Checkout, or Stop Timer.

Screens

Widget settings > Screens

Display Style, Carousel, Show Paginations and Grid Columns per screen size. Display Style set to None stops the pop-up from opening at that size.

Enable Variant Selector

Widget settings > Variant Selector

Shows variant options on each recommended product. Variant Selector Type switches between a Select dropdown and Buttons.

Dynamic Placement

Display > Breakpoints > each screen size

Moves the pop-up's container on the page. Appending it to the body is covered in Step 5.

Theme and CSS

Display > Theme

Colors and button shape with Theme set to Custom, and the widget's CSS box for everything else.

Enable Attribution Tracking

Advanced > Product Properties

Tags items added from the pop-up so they appear in Rebuy reporting. It is on already, and should stay on.


Limitations

The following constraints apply to Product Cross-Sell Pop-Up widgets. Each one has a workaround or an alternative where one exists.

  • The pop-up opens only for the product on the page. An Add To Cart pop-up installed on the product page template opens when that page's product is added, and adding any other product does not open it.

  • A theme that reloads the page to add to cart never opens an Add To Cart pop-up. Rebuy opens the pop-up when the store's add-to-cart request completes without a page reload. A product form that posts and reloads the page, which some page builders use, gives the pop-up nothing to react to. Rebuy's Smart Cart adds to cart without a reload, so stores using it are not affected.

  • The pop-up opens on every add of the page's product. Use Limit number of views to cap it.

  • The pop-up stays closed when its Data Source returns no products. Check the Data Source rules against the product you are testing with Previewing Data Sources.

  • The Product Cross-Sell Pop-Up is not part of the Smart Cart. It is installed on the product page, so it cannot be added to a Smart Cart or limited to one Smart Cart in a Smart Cart A/B test. For a pop-up that lives inside a Smart Cart, build a Cart Cross-Sell Pop-Up.

  • Your cart drawer and the pop-up can open at the same time. If your cart drawer opens when a product is added, it opens on the same add that opens the pop-up. Append the pop-up to the page body (Step 5) so it shows in front of the drawer.

  • A widget ID renders once per page. If the same widget ID is installed twice on one page, Rebuy keeps the first placement and removes the rest. Duplicate the widget and give the second placement the duplicate's widget ID.

  • Custom templates are theme code, not an editor setting. A Product Cross-Sell Pop-Up renders with Rebuy's recommended template, and the widget editor has no field to change it. A template override is added to the theme using the ID rebuy-widget-[WIDGET ID] for one widget, or rebuy-recommended-template for every widget on the page that uses the recommended template. See Widget Custom Templates. Custom templates are your own developer's work, and Rebuy Support does not build or troubleshoot them.

  • The pop-up does not remove products or discounts. It adds to the cart and its involvement ends there.


Style the pop-up to match your store

The Display screen is where you change how a Product Cross-Sell Pop-Up looks. Set Theme to Custom to reveal color pickers and button shape fields with no code needed. For spacing, font sizes and anything else those fields do not cover, use the CSS box on the same screen, and scope every selector to the widget ID, as in #rebuy-widget-12345 .rebuy-widget-content for the pop-up box, since CSS in that box reaches the whole page. The pop-up uses the same product markup as the product page widget, so the Product Page Recommendation Widget CSS Styling Guide applies to its titles, prices and buttons. For how CSS works across Rebuy widgets, see Enhance Widget Styling Using Custom CSS Code.


Frequently Asked Questions

Can an add-to-cart pop-up show different products depending on the variant the shopper added?

Yes, a Product Cross-Sell Pop-Up set to Add To Cart can show different products for different variants. After the shopper adds the page's product, the pop-up requests its products again with the exact variant that was added, so a Data Source IF rule on Product that names specific variants matches only when one of those variants is added. Pair each variant rule with a RETURN rule for the products to offer. This works only in the pop-up: a product page widget embedded in the page knows which product is on the page but not which variant the shopper picks. The pop-up has to be installed with the page's product ID, which the Enable Product ID app block setting or the HTML Div Placement container provides.


Why doesn't my product page pop-up open when a shopper clicks Add to Cart?

A Product Cross-Sell Pop-Up that never opens on add to cart is almost always one of the following. Check them in this order:

  1. The pop-up is not appended to the page body. This is the most common fix. Follow the steps in "Append the pop-up to the page body" in Step 5.

  2. Live Mode is off. With Live Mode off, the pop-up opens only in Rebuy Preview Mode.

  3. The pop-up is not installed on the product page template, or is installed without the product ID. Confirm the app block is on the product template with Enable Product ID checked, or that the manual container includes data-rebuy-shopify-product-ids.

  4. The product added is not the product on the page. The pop-up opens only for the page's own product.

  5. The Data Source returns no products for this product. Check its rules with Previewing Data Sources.

  6. The add to cart reloads the page. Some page builders and older themes add to cart by reloading the page, which an Add To Cart pop-up cannot react to.

  7. Display Style is set to None for the screen size you are testing, under Widget settings > Screens.

  8. Limit number of views has been reached. The pop-up stays closed for that shopper until the window in Every expires.

For broader troubleshooting, see Why Isn't My Widget Showing?.


Why does my product page pop-up appear behind the cart drawer?

A Product Cross-Sell Pop-Up appears behind the cart drawer when the theme section holding it sits on a lower layer than the drawer, and appending the pop-up to the page body fixes it. Follow the steps in "Append the pop-up to the page body" in Step 5, for every screen size. If your theme's own cart drawer is also opening alongside Rebuy's Smart Cart, hide the theme's drawer as well, using How to Debug the Smart Cart: Hide an Existing Cart Drawer.


Can I add the Add to Cart Cross-Sell pop-up to my Smart Cart?

No, the Product Cross-Sell Pop-Up built from the Add to Cart Cross-Sell (Popup) card is a product page widget and is installed on your product page template, not in the Smart Cart. For a cross-sell pop-up that lives inside the Smart Cart, build a Cart Cross-Sell Pop-Up as a Cross-Sell Widget component in the Smart Cart editor: see How To Create A Cart Cross Sell Pop Up Widget.


Can the add-to-cart cross-sell pop-up show for only one Smart Cart in a Smart Cart A/B test?

No, a Product Cross-Sell Pop-Up cannot be limited to one Smart Cart in a Smart Cart A/B test, because it is installed on the product page and opens for every shopper regardless of which Smart Cart they see. To show a cross-sell pop-up for only one cart in the test, build a Cart Cross-Sell Pop-Up and add it to that Smart Cart only. Each Smart Cart in the test runs with its own components, so the pop-up appears only for shoppers who see that cart. See How To Create A Cart Cross Sell Pop Up Widget.

Did this answer your question?