> For the complete documentation index, see [llms.txt](https://help.dollarlabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.dollarlabs.io/dollarback-store-credit/integrations/cart-drawer-integrations.md).

# Cart drawer integrations

{% embed url="<https://dollarlabs.neetorecord.com/watch/60921eabf0a3045a9494>" %}

\_This article's section starts at 5:23 in the video.\_

If your store uses a slide-out cart drawer, DollarBack can show the cashback message right inside it, so customers see what the cart will earn without opening the cart page. Five drawers are supported: Rebuy, Upcart, Monster Cart, AMP Cart, and your theme's native drawer.

## Prerequisites

* The cart cashback message set up and looking the way you want ([Product page and cart cashback messages](https://help.dollarlabs.io/dollarback-store-credit/widgets-and-storefront/product-page-and-cart-cashback-messages.md)). The drawer shows the same message.
* The DollarBack app embed active in your theme ([Activate widgets in your theme](https://help.dollarlabs.io/dollarback-store-credit/getting-started/activate-widgets-in-your-theme.md)).
* For third-party drawers: the drawer app installed and active on your storefront.

## How it works

These are display integrations: they don't sync any data. When enabled, DollarBack looks for the element that matches the drawer's **Target CSS selector** and injects the cashback message just above it (see [Target CSS selector](#target-css-selector)). The message inherits your cart message templates: text per state, goal-progress tiers, colors, and typography all come from the cart message settings in **DollarBack admin → Customize**. There is nothing separate to design.

## Enable a drawer

1. Go to **DollarBack admin → Integrations**.
2. Find the card for your drawer (**Rebuy**, **Upcart**, **Monster Cart**, **AMP Cart**, or **Native theme drawer**) and click **Set up**.
3. Turn on the toggle, check the **Target CSS selector**, and click **Save**. The card then shows a **Configured** badge.

<figure><img src="https://2844543096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcVBfwy7Yj4tU8TsxkHEr%2Fuploads%2Fgit-blob-095e7c0f8c136672082bba31f46287f90192c3eb%2Fdb-cart-drawer-cards-annotated.png?alt=media" alt="The Cart drawers section of the Integrations page with cards for Rebuy, Upcart, Monster Cart, AMP Cart and Native theme drawer. Native theme drawer has a Configured badge, and each card has a Set up button."><figcaption><p>Find the card for your cart drawer and click Set up. A Configured badge shows which drawer is on.</p></figcaption></figure>

<figure><img src="https://2844543096-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcVBfwy7Yj4tU8TsxkHEr%2Fuploads%2Fgit-blob-701e08c659e7446aee4dcf1c176c06265aff80a2%2Fdb-cart-drawer-native-config-annotated.png?alt=media" alt="The Native theme drawer settings page with an info banner that links to the Cart touchpoint, an on switch, and a Target CSS selector field set to .cart-actions."><figcaption><p>Turn the drawer on, check the target CSS selector, and click Save in the bar at the top. The message text and style come from the Cart touchpoint.</p></figcaption></figure>

## Target CSS selector

The **Target CSS selector** tells DollarBack where to put the message: it finds the first element on the page that matches the selector and injects the message just above it. If nothing matches, the drawer shows no message.

| Drawer              | Default selector                   |
| ------------------- | ---------------------------------- |
| Rebuy               | `.rebuy-cart__flyout-subtotal`     |
| Upcart              | `.styles_Footer__checkoutButton__` |
| Monster Cart        | `.mu\:subtotal`                    |
| AMP Cart            | `.amp-sc__footer-row--subtotal`    |
| Native theme drawer | None. You must enter one.          |

* **Third-party drawers** come with the default above filled in. Change it only if your drawer's markup is different (for example, a customized drawer). Click **Reset** to go back to the default.
* **The native theme drawer has no default**, because every theme builds its drawer differently. Until you enter a selector, DollarBack shows nothing in the drawer, even with the toggle on. To find one, open your storefront, open the drawer, right-click the element you want the message above (for example the drawer footer or the checkout button) and choose **Inspect**. Use its class or ID, for example `.cart-drawer__footer` or `#cart-footer`.
* If you leave the field empty on a third-party drawer, saving puts the default back.

Enable only the drawer(s) your store actually uses. If you switch cart apps later, disable the old one and enable the new one here.

| Drawer              | Use when                                                   |
| ------------------- | ---------------------------------------------------------- |
| Rebuy               | Your cart drawer is powered by Rebuy Smart Cart            |
| Upcart              | You use the UpCart drawer cart builder                     |
| Monster Cart        | You use Monster Cart upsell drawer                         |
| AMP Cart            | You use AMP's cart drawer (Slide Cart)                     |
| Native theme drawer | Your theme's built-in drawer, with no third-party cart app |

## Verify it works

1. Open your storefront and add a product to the cart so the drawer slides out.
2. The cashback message should appear inside the drawer with the correct amount for the cart.
3. Change the cart quantity. The message recalculates as the drawer updates.

## Common issues

* No message in the drawer: confirm the right drawer is enabled on the Integrations page and the app embed is on. For the native theme drawer, check that the **Target CSS selector** is filled in and matches an element inside the open drawer; see [A widget isn't showing on my store](https://help.dollarlabs.io/dollarback-store-credit/troubleshooting-and-faq/widget-isnt-showing.md).
* The message shows on the cart page but not the drawer: you likely enabled the wrong drawer integration for the cart app you use.
* The message doesn't update when the cart changes: heavily customized drawers can skip the events DollarBack listens for; theme developers can re-trigger rendering via the storefront API ([Storefront window API](https://help.dollarlabs.io/dollarback-store-credit/developer-tools/storefront-window-api.md)).
* Wrong text or colors: the drawer inherits everything from the cart message; edit it under **DollarBack admin → Customize** ([Product page and cart cashback messages](https://help.dollarlabs.io/dollarback-store-credit/widgets-and-storefront/product-page-and-cart-cashback-messages.md)).

## Related articles

* [Product page and cart cashback messages](https://help.dollarlabs.io/dollarback-store-credit/widgets-and-storefront/product-page-and-cart-cashback-messages.md)
* [Widget map: what shows where](https://help.dollarlabs.io/dollarback-store-credit/widgets-and-storefront/widget-map-what-shows-where.md)
* [A widget isn't showing on my store](https://help.dollarlabs.io/dollarback-store-credit/troubleshooting-and-faq/widget-isnt-showing.md)
* [Storefront window API](https://help.dollarlabs.io/dollarback-store-credit/developer-tools/storefront-window-api.md)
