An embedded cart cross-sell widget displays in-cart product recommendations inline inside your Rebuy Smart Cart, so shoppers see complementary products in the cart drawer alongside the items they have already added. Because it is a cross-sell rather than an upsell, adding a recommended product never replaces what is already in the cart — the shopper keeps both.
This guide covers the embedded display style. If you want the recommendations to appear as a pop-up overlay triggered by a shopper action instead of sitting inline in the drawer, see How to Create a Cart Cross-Sell Pop-Up Widget.
Requirement: This setup requires Rebuy's Smart Cart, available on the Cart & Merchandising package. The widget is added as a Smart Cart component, and the Smart Cart is what places it in the cart.
(Screenshot above: A Rebuy Smart Cart drawer with an inline cross-sell widget below the cart items, showing two recommended products with Add buttons.)
Why Use In-Cart Recommendations
In-cart recommendations reach shoppers at the point where they have already decided to buy, which makes them one of the highest-intent placements on the store. Each recommendation is personalized based on the cart's contents and your Data Source configuration, so the products shown change as the shopper's cart changes.
The two most common goals are raising average order value by surfacing complementary products, and moving specific inventory by targeting what appears for a given cart. Because the widget sits inside the cart rather than on a product page, it can also react to the whole cart at once — for example, recommending an accessory only once a qualifying product is present.
Embedded or Pop-Up: Choosing a Display Style
Both display styles use the same widget, the same Data Source, and the same settings. The only difference is how and when the widget presents itself, which is controlled by one setting called Display Type. The table below compares them.
| Embedded | Pop-Up |
Where it appears | Inline inside the Smart Cart drawer, in the position you place the component | As an overlay on top of the page |
When it appears | Whenever the cart is open and the Data Source returns products | When a shopper action fires the trigger you choose, and the Data Source returns products |
Setting required | Display Type set to Embed, which is the default | Display Type set to Popup, plus a Popup Trigger |
Interrupts the shopper | No | Yes, by design |
Best for | Ongoing, always-available recommendations | A single high-value moment, such as a threshold offer or a gift selection |
Space it occupies | Takes vertical space in the drawer, so layout matters | Renders at full overlay size, independent of the drawer |
Choose embedded when you want recommendations to be a persistent part of the cart experience. Choose a pop-up when the offer is time-sensitive or conditional and losing it in the drawer would undercut it. You can run both in the same Smart Cart using two separate widgets.
Step 1: Add a Cross-Sell Widget Component to the Smart Cart
An embedded cross-sell widget is created as a component inside the Smart Cart editor. Adding the component is what connects the widget to the cart — a widget created anywhere else will not appear in the cart until a Cross-Sell Widget component points at it.
Navigate to the Rebuy Dashboard and open Cart & Merchandising > Smart Cart, then open the Smart Cart you want to edit.
Click Add + in the section where the widget should appear. On a single-column cart this is usually the Body section. On a double-column cart you can also use the dedicated Cross-Sells section.
Select Cross-Sell Widget from the component list.
Assign the widget. If you already have a cart widget you want to use, select it from the list. If not, create a new one and give it a descriptive name.
Drag the component to the position in the cart where you want the recommendations to appear. You can move it later.
Save your Smart Cart settings.
(Screenshot above: The Smart Cart editor with the Add + button in the Body section)
(Screenshot above: Add Component panel with Cross-Sell Widget selected)
(Screenshot above: Smart Cart Cross-Sell Widget component dropdown and Create Cross-Sell Widget button)
A cross-sell component with no widget assigned to it is not a valid component. Rebuy places invalid or unconfigured components in a Needs Attention section in the editor, and they do not render in the cart until you finish configuring them. If a component you added is not showing, check there first.
The Cross-Sells section only exists on double-column Smart Cart layouts. If you switch a double-column cart to single-column, any components in that section move to Needs Attention and you will need to drag them into the Body, Header, Goal Box, or Footer.
Step 2: Confirm the Display Type Is Embed
The widget's Display Type decides whether it renders inline or as an overlay, and Embed is the default — a newly created cross-sell widget is already embedded and needs no change. Only revisit this setting if the widget was previously configured as a pop-up and you want to bring it back inline.
In the widget's editor, open the Widget Settings tab.
Under Display Type, confirm Embed is selected.
Click Save.
If the widget is set to Popup, it will not appear inline in the cart no matter where you place the component, because a pop-up widget stays hidden until its trigger fires. A cross-sell component that is correctly placed but never visible in the drawer is very often a widget left on Popup.
(Screenshot above: The Widget Settings tab with Display Type set to Embed.)
Step 3: Configure the Data Source
The widget's Data Source decides both which products the widget recommends and whether it appears at all. An embedded widget renders whenever its Data Source returns at least one product, and stays hidden when the rules return nothing — so the rules are your visibility control as well as your merchandising control.
In the widget's editor, find the Data Source section in the sidebar.
Confirm the Endpoint dropdown points at the data source you want, or click Create new data source.
Click Edit to open that data source in a new tab.
Add the IF rules that decide when the widget should show and the RETURN rules that decide what it shows.
Save the data source, then return to the widget editor.
By default, a new cross-sell widget's data source returns AI-driven recommendations based on the cart's contents. That is a working configuration on its own — you only need rules when you want to control what appears in specific situations, such as returning Top Sellers for a nearly empty cart or featuring a collection during a promotion.
(Screenshot above: The Data Source section of the widget editor sidebar with the Endpoint dropdown, Edit link and Create new data source link.)
What cart widgets read that product page widgets cannot
A cart widget's Data Source input is the cart itself, and every product currently in the cart is an input product. This is what makes cart-only rules possible — rules based on cart subtotal, line item count, total item count, specific products in the cart, or an applied discount code. A product page widget cannot use any of them, because it only has access to the product being viewed.
Two settings behave differently here as a result:
Filter Input Products controls whether products already in the cart can come back as recommendations. When Rebuy creates a data source for you alongside a new widget, this starts checked, so the widget will not recommend something the shopper already added. Leave it checked for normal recommendations.
Rules re-evaluate on every cart change. As shoppers add and remove items, the widget refetches and its recommendations update in place. A rule that is not matching yet can start matching mid-session.
For the full reference on every cart rule, its operators, and how to scope a rule by tag or collection, see Data Sources and the Cart. For all rule types, see Data Sources 101.
Set Up a Discount (Optional)
You can attach a discount to an embedded cross-sell widget so recommended products display at a reduced price. Configuring the discount correctly requires one setting beyond the discount amount itself.
In the widget's editor, open the Discount tab.
Choose a Discount Type — Percentage, Fixed, or None — and enter the amount.
Toggle Discounted By Functions on. This creates an automatic discount in Shopify scoped to the widget, so the discount actually applies when a shopper adds the product. Shopify Functions discounting is available on all Shopify plan types.
Set Discounted From to Price or Compare at Price.
Click Save.
If Discounted By Functions is left off, Rebuy shows the discounted price in the widget but the shopper is charged full price at checkout, because the widget's discount is display-only in that mode. You would need to create a matching discount in Shopify yourself. See the Rebuy Discounting Overview for the full picture.
An embedded cross-sell widget does not remove products or revoke discounts. Once a shopper adds a product from the widget, it stays in the cart even if they change the cart so the widget's rules no longer match. If you need a reward that is withdrawn when the shopper stops qualifying, build it as a Selectable Gift-With-Purchase widget, which adds custom JavaScript to handle removal.
Managing Cross-Sell Widgets in Your Cart
Once a cross-sell component is in the cart, you manage it from the Smart Cart editor rather than from the widget editor. Each action below is a component-level change and takes effect when you save the cart.
Hide a cross-sell widget without deleting it
Hiding a component keeps it and all of its configuration in the cart while stopping it from rendering, which is the right choice for a seasonal or paused offer.
Open the Smart Cart editor and find the Cross-Sell Widget component.
Click the eye icon on the component row to toggle its visibility off.
Save your Smart Cart settings.
Note that a component must have valid settings before Rebuy will let you make it visible again. A cross-sell component with no widget assigned cannot be turned back on until you assign one.
(Screenshot above: A Cross-Sell Widget component row in the Smart Cart editor with the visibility eye icon highlighted.)
Change where a cross-sell widget appears
Cross-sell components are repositioned by dragging them, and their order in the editor is the order they appear in the cart.
Open the Smart Cart editor.
Use the component's drag handle to move it up or down, or into a different section of the cart.
Save your Smart Cart settings.
If a component has no drag handle, the cart is using a custom template. Nothing is draggable while a custom template is active — the layout is controlled by the template markup instead.
Delete a cross-sell widget from the cart
Deleting removes the component from the cart. The underlying widget itself is not deleted and remains available in Cart & Merchandising > Widgets, so you can add it back later or use it elsewhere.
Open the Smart Cart editor and find the Cross-Sell Widget component.
Click the trash icon on the component row.
Save your Smart Cart settings.
Delete is unavailable while the cart is using a custom template.
Use more than one cross-sell widget
The Cross-Sell Widget component is repeatable, so you can add several to one Smart Cart and position each independently. Each component points at its own widget, so each can have its own Data Source, layout, and rules.
If you want several sets of recommendations without spending the vertical space, consider grouping them into Cart Tabs, which holds tabbed sections in the footprint of one.
Widget Settings That Matter for an Embedded Widget
Most of the widget editor is shared across every widget type. The settings below are the ones that meaningfully change an embedded cart widget, where the constraint is that it renders inside a narrow drawer rather than on a full-width page.
Setting | Where it is | Why it matters here |
Display Type | Widget Settings tab > General | Must be Embed for the widget to render inline. See Step 2. |
Screens | Widget Settings tab > Screens | Sets columns and items shown. See section How the Screens settings control what shoppers see |
Max Number of Products displayed | Data Source section | Caps how many recommendations render. |
Enable Variant Selector | Widget Settings tab > Variant Selector | Adds variant options to recommended products. Variant Selector Type switches between a dropdown and swatch-style buttons; a dropdown wastes less horizontal space in a drawer. |
Timer | Widget Settings tab > Timer | Adds a countdown inside the widget. Enable Timer turns it on, Timer Title, Minutes and Seconds set how long it runs. Action decides what happens when it reaches zero: Dismiss Widget removes the widget from the cart, Redirect to Cart sends the shopper to the cart page, Redirect to Checkout sends them straight to checkout, and Stop Timer leaves the widget in place with the countdown stopped at zero. |
Language | Language tab | Edits the widget's heading and button text. The heading is what shoppers read as the section title in the cart. |
Styles | Styles tab | Colors, spacing, typography, and the widget's Custom CSS box. |
Add to Cart Redirect | Widget Settings tab > View Options | Has no effect on a Smart Cart cross-sell — Keep set to "None (Stay on Current Page)" |
How the Screens settings control what shoppers see
The Screens section of Widget Settings is where a cart cross-sell widget's product layout is actually decided. It contains one card per screen size, and each card has its own copy of every setting:
Large Screen — devices wider than 768px.
Medium Screen — devices between 481px and 768px.
Small Screen — devices 480px and narrower.
The three cards are independent. Changing Large Screen does nothing to how the widget looks on a phone, so configure all three whenever you change one.
Each card has four settings:
Setting | What it does |
Display Style | Chooses how each product is drawn: Grid, List, Line, or None. Setting it to None hides the widget entirely at that screen size. |
Carousel | Turns the products into a horizontal slider with arrows instead of a block that wraps onto multiple rows. |
Show Paginations | Adds pagination dots below the products. It only has an effect when Carousel is also on. |
Grid Columns | Sets how many products sit side by side, from 1 to 6. |
Grid Columns and Carousel together decide how many products a shopper actually sees.
With Carousel on, Grid Columns is how many products are visible at one time. The rest are still there, reached with the arrows.
With Carousel off, Grid Columns is how many products sit per row, and every product renders, wrapping onto as many rows as it needs.
(Screenshot above: A Cross-Sell Widget's Screen settings showing Display Style dropdown, Carousel, Pagination and Grid Column options.)
Limitations
The following constraints apply to embedded cart cross-sell widgets. Each has a workaround or an alternative where one exists.
The widget hides itself when its Data Source is unmatched and returns no products. If an embedded widget never appears and it's properly installed, check the Data Source rules before anything else.
A widget ID renders once per page. If the same widget ID is used both in the Smart Cart and as a page app block, Rebuy keeps the first placement in document order and deletes the rest. The Smart Cart is normally the one removed, because it is added to the page after the theme's own content. Duplicate the widget and give the second placement its own ID.
Add to Cart Redirect is ignored inside the Smart Cart. Rebuy forces the redirect to None (Stay on Current Page) for any widget referenced by a Smart Cart Cross-Sell component, so shoppers always stay on the current page after adding. This keeps the add asynchronous so the cart can update in place.
The widget does not remove products or discounts when the cart stops matching its rules. Use a Selectable Gift With Purchase setup if the offer needs to be withdrawn.
The Cross-Sells section exists on double-column layouts only. On a single-column cart, place the component in the Body section.
Custom templates are theme code, not an editor setting. An embedded cart cross-sell widget renders with Rebuy's recommended template, and neither the Smart Cart component row nor the widget editor has a field to change it. A developer overrides it by adding a template script tag to the theme: use the ID
rebuy-widget-[WIDGET ID]to override that one widget, orrebuy-recommended-templateto override every widget on the page that uses the recommended template. See Widget Custom Templates.Putting the Smart Cart itself on a custom template disables dragging and deleting for every component, including the Cross-Sell Widget component. The layout is controlled by the template markup instead.
Shopify Native Cart Support
Everything above assumes Rebuy's Smart Cart. If your store uses your Shopify theme's own cart drawer, flyout, or modal instead, you can still place a Rebuy cart widget inside it, but the integration is a developer task and it sits outside what Rebuy support can help with.
Rebuy's support policy for Shopify native carts
The Rebuy team no longer supports native Shopify carts. Before we developed our own cart solution we used to facilitate the incorporation of native carts, but we discontinued that practice in order to prioritize and support our own product. The variations of native carts between themes posed a significant risk to the business due to the complexity and ongoing support they required, and that is why we built Smart Cart instead.
Smart Cart offers more customization options for the style and design of the cart, so you can match it to your website's look and feel. It also provides features a native cart does not, including automatic discounts, product recommendations, and upsells. Because Rebuy owns that code, migrating to Smart Cart also means the cart comes with full support. For those reasons we recommend migrating rather than integrating with a native cart.
If you choose to stay on your native cart, Rebuy can provide the reference material below, but cannot troubleshoot the integration, guarantee it works on your theme, or maintain it when your theme updates.
How the integration works
A Rebuy widget renders into a div you place in your theme's cart drawer markup. On a native cart there are two problems your developer has to solve, and understanding both is the fastest way to scope the work:
Placement. The widget needs a container element inside the drawer's HTML, in the spot where the recommendations should appear.
Re-initialization. Most themes rebuild the cart drawer's HTML from scratch every time the cart changes, which destroys the widget's container along with it. The theme has to re-add the container and re-initialize Rebuy after each rebuild, and Rebuy has to tell the theme to refresh its own cart display after a shopper adds something from the widget. Smart Cart handles both automatically; a native cart does not.
General installation process for native carts
The steps below are the general shape of the work. The exact function names and file paths differ for every theme, so treat this as a scope outline for your developer rather than a copy-and-paste procedure.
In Rebuy Dashboard > Cart & Merchandising > Widgets, create a cart widget and give it a descriptive name. Note its widget ID.
Find your Shopify theme's cart drawer file. Open your storefront, inspect an item in the cart drawer with your browser's developer tools, note the classes on the surrounding markup, then search your theme for those classes.
Add the Rebuy widget's container
divto that file, in the position where the recommendations should appear. The container must be adivcarrying the widget'sdata-rebuy-id— Rebuy does not detect the attribute on a span, section, or any other element, and it fails silently if you use one.Find the function your Shopify theme calls to rebuild the cart drawer after a cart change. Searching your theme code directly. In Online Store > Themes > Edit code, search your theme's JavaScript files for
cart/update.js,cart/change.js, orcart/add.js. Also look for functions that redraw the cart markup and for listeners on cart events such ascart:updated. This code usually lives intheme.js,cart.js, or a file with "cart" or "drawer" in its name.In the widget editor's Advanced tab, add code to the add callback that triggers your theme's own cart refresh, so the drawer updates when a shopper adds a product from the widget.
Shopify Theme-specific starting points, including snippets contributed for Impulse, Prestige, Turbo, Parallax, Modular, Motion, and others, are collected in How to Add Rebuy to a Native Cart Flyout, Drawer, or Modal. Those snippets are community and support findings from past integrations, not a maintained compatibility list, and they may not match your theme's current version.
Getting help with a native cart integration
Rebuy support cannot troubleshoot native cart integrations, but there are three paths forward depending on your situation:
Migrate to Smart Cart. This is the recommended path and comes with full Rebuy support. See How to Enable Smart Cart.
Have your developer build it. Point them at the native cart guide How to Add Rebuy to a Native Cart Flyout, Drawer, or Modal and at Rebuy's developer documentation, including the AI Integration Guide, which is written to be fed into AI coding tools so a developer can generate theme-specific integration code.
Work with a Rebuy Partner. If you do not have a developer, Rebuy's Partner team can connect you with an agency that has done this integration before. Book time with them at rebuy.partnerpage.io/matchmaking.
Frequently Asked Questions
Why isn't my embedded cross-sell widget showing in the cart?
An embedded cross-sell widget most often fails to show for one of four reasons, in this order of likelihood:
Check that it's installed and set visible in the Smart Cart editor.
Check if Live Mode is enabled in the widget editor, if it's toggled OFF but still installed in the Smart Cart editor you will need to use Rebuy's Preview Mode to view the widget.
The Data Source is returning no products. The widget hides itself when its rules return nothing or when a Ruleset is unmatched. Open the data source and check the rules against the cart state you are testing by using the Data Source preview tool - see Previewing Data Sources.
Max Number of Products displayed and Grid Columns do not line up. These two sliders are set in different places and are easy to leave mismatched. Max Number of Products displayed, in the Data Source section, controls how many products the widget requests, up to 20. Grid Columns, under Widget Settings > Screens, controls how many of them sit side by side, up to 6. When the two disagree the widget still renders, but not the way you configured it — a low column count with Carousel on shows only the first few products, and a column count higher than the product limit leaves a part-empty row. Check both sliders together rather than one at a time.
The widget's Display Type is set to Popup. A pop-up widget stays hidden until its trigger fires, so it will never appear inline regardless of where the component sits.
The component is hidden or in Needs Attention. Check the eye icon on the component row, and check whether a widget is assigned to it.
Display Style is set to None for the screen size you are testing. Under Widget Settings > Screens, a Display Style of None hides the widget at that screen size. A widget that shows on desktop but never on mobile is very often set to None on Small Screen.
The same widget ID is also placed on the page as an app block. Rebuy renders one instance per widget ID, and the in-cart placement is usually the one removed.
For broader troubleshooting, see Why Isn't My Widget Showing?.
Why does my widget show fewer products than I set it to?
When a widget displays fewer products than you configured, the products are usually being returned correctly and the layout is showing only some of them at a time. Check these three settings in this order:
Carousel and Grid Columns, in Widget Settings > Screens. With Carousel on, Grid Columns is how many products appear at one time, and the rest are reached with the arrows. A widget returning eight products with Grid Columns set to 2 shows two, with the other six behind the arrows. Either raise Grid Columns, or turn Carousel off and change the layout type to List so that products renders across multiple rows.
The screen size you are testing at. Each screen size has its own Carousel and Grid Columns values, and they do not inherit from each other. A widget that shows every product on desktop can show far fewer on a phone because Small Screen is configured differently.
Max Number of Products displayed, in the Data Source section. This caps how many products the widget requests at all. If it is lower than the number you expect, the layout is not the problem.
The products are not lost in any of these cases. They are returned by the Data Source and present in the widget — the layout is deciding how many sit on screen at once.
Can I show more than one cross-sell widget in the Smart Cart?
Yes, the Cross-Sell Widget component is repeatable, so you can add several to one Smart Cart, each pointing at its own widget with its own Data Source and layout. Position them independently by dragging them in the editor. You can also organize them further by using Cart Tabs - see Cart Tabs: organize your Smart Cart content into tabbed sections
Can I put a cross-sell widget inside Cart Tabs?
Yes, a cross-sell widget can be placed inside Cart Tabs instead of sitting directly in the cart body. Cart Tabs is a separate Smart Cart component that groups up to three pieces of cart content into tabbed sections, and Cross-Sell Widget is one of the available tab types — when you select it, you either choose an existing widget or create a new one from inside the tab. Use it when you want more than one set of recommendations without each one taking its own vertical space in the drawer, which matters most on single-column carts. For setup steps, see Cart Tabs: Organize Your Smart Cart Content Into Tabbed Sections.
What is the difference between a cross-sell and an upsell in the cart?
A cross-sell adds the recommended product alongside what the shopper already has, so the cart ends up with both. An upsell replaces the original item with the recommended one, so the cart ends up with only the upsold product. In-cart recommendation widgets are cross-sells. See How To Create A Product Upsell Widget
Can I use an embedded cross-sell widget without the Smart Cart?
An embedded cart cross-sell widget requires Rebuy's Smart Cart, because the Cross-Sell Widget component is what places it in the cart. You can place a Rebuy cart widget inside your Shopify theme's own cart drawer instead, but that is a developer integration and Rebuy support does not cover it. See the Native Cart Support section.
If I delete the component from my cart, is the widget deleted too?
Deleting a Cross-Sell Widget component removes it from the cart only. The widget itself still exists in Cart & Merchandising > Widgets with all its settings intact, so you can add it back to the cart or use it elsewhere at any time.
Can I style the embedded widget beyond what the editor offers?
Yes, and the right tool depends on what you want to change. For appearance — colors, spacing, typography, sizing — use CSS: see Custom Style the Cart Cross-Sell Widget for selectors aimed specifically at this widget, and the Smart Cart CSS Customization Guide for the surrounding cart. For structural changes — different markup, extra elements, or rearranged product information — a developer can replace the widget's template entirely. See Widget Custom Templates.









