CartliftGuideSupportPrivacyTerms

Cartlift guide

Cartlift replaces the jump to the cart page with a slide-out cart on your Catalyst or Stencil storefront: line items with quantity steppers, a progress bar towards free shipping, a free gift or a discount, recommendations with one-click add, quantity-break nudges and add-ons such as gift wrap. It works on your store's own cart (Catalyst's cart actions, or BigCommerce's Storefront API on Stencil), so there is only ever one cart.

1. Install

Install Cartlift from the App Marketplace. Every setting belongs to a channel (storefront): choose it with the selector at the top of each tab. The first Catalyst channel is switched on at install; switch others on in Setup (Growth: 3 channels, Plus: unlimited).

2a. Stencil themes: switch the channel on

Nothing to install. In Setup, switch the Stencil channel on: Cartlift adds a script named “Cartlift cart drawer” to the channel's storefront pages through BigCommerce's Script Manager (Storefront › Script Manager), and the drawer shows at once. Switching the channel off, or uninstalling Cartlift, removes the script. Your theme files and /cart.php are not changed. The script is in the Functional consent category: if your store shows a cookie consent banner, the drawer loads for shoppers who accept functional cookies, and the others get your theme's own cart.

2b. Catalyst: add the drawer (once, about 15 minutes)

pnpm add @medusa-it/cartlift

Environment variables (Setup shows the values for each channel):

BIGCOMMERCE_CHANNEL_ID=1
CARTLIFT_PUBLIC_KEY=cl_pub_…          # Setup tab
CARTLIFT_API_URL=https://cartlift.medusa-it.app
CARTLIFT_REVALIDATE_SECRET=cl_rev_…   # Setup tab, for instant updates

Cart actions. Wire Catalyst's cart mutations once, in a server-actions file:

// core/app/[locale]/(default)/cart/_actions/cartlift.ts
'use server';
import { createCartAdapter } from '@medusa-it/cartlift/server';

const cart = createCartAdapter({
  getCart,                                         // your cart + checkout query
  addToCart: ({ productId, variantId, quantity, selectedOptions }) => …,
  updateQuantity: ({ lineId, productId, variantId, quantity }) => …,
  removeItem: ({ lineId }) => …,
  applyCoupon: (code) => …,
  getCartId: async () => (await cookies()).get('cartId')?.value,
});
export const addToCart = cart.addToCart;
export const updateQuantity = cart.updateQuantity;
export const removeItem = cart.removeItem;
export const applyCoupon = cart.applyCoupon;

Layout. Wrap the storefront and render the drawer:

import { CartDrawerProvider, CartDrawer } from '@medusa-it/cartlift';

<CartDrawerProvider cart={cart} checkout={checkout} actions={{ addToCart, updateQuantity, removeItem, applyCoupon }}>
  {children}
  <CartDrawer />
</CartDrawerProvider>

Open on add to cart. Wrap the product page's action in one line:

import { wrapAddToCart } from '@medusa-it/cartlift/server';
export const addToCart = wrapAddToCart(originalAddToCart);

Header. Swap Catalyst's cart icon for <CartTrigger count={cartCount} />.

Routes. Recommendations and live product data (one request on the drawer's first open), and instant updates after a save:

// core/app/api/cartlift/recommendations/route.ts
import { createRecommendationsRoute } from '@medusa-it/cartlift/next';
import { CARTLIFT_PRODUCTS_QUERY, fromCatalystProducts } from '@medusa-it/cartlift/server';

export const { GET } = createRecommendationsRoute({
  getProducts: async (ids) => {
    const { data } = await client.fetch({
      document: graphql(CARTLIFT_PRODUCTS_QUERY),
      variables: { entityIds: ids, first: ids.length },
      customerAccessToken: await getSessionCustomerAccessToken(),
      fetchOptions: { next: { revalidate: 300 } },
    });
    return fromCatalystProducts(data, ids);
  },
});

// core/app/api/cartlift/revalidate/route.ts
import { createRevalidateRoute } from '@medusa-it/cartlift/next';
export const { POST } = createRevalidateRoute();

Your /cart page is not touched: the drawer is added next to it.

The first Catalyst channel is switched on at install; Stencil channels wait for you to switch them on, because doing so changes the live storefront at once.

3. Configure

Recommendations: your rules first, then products often bought together (computed every night from your orders, Growth and Plus), then bestsellers. The storefront only receives product ids and reads prices and stock itself, so they are always right for the shopper's currency and customer group.

4. Plans

StarterGrowthPlus
Drawer, progress bar, recommendations from rules✓✓✓
Thresholds1UnlimitedUnlimited
Free gift automation, quantity breaks, add-ons✓✓
“Bought together” recommendations✓✓
Analytics90 days13 months
Channels13Unlimited
Recommendations API (secret key)✓

Uninstalling Cartlift cannot remove the promotions it created (BigCommerce revokes its access first). Switch the gift and discount tiers off before uninstalling, or delete the “Cartlift: …” promotions under Marketing › Promotions afterwards.

Questions? See Support.