Your Shopify store opens a cart drawer when a customer adds a product. The customer clicks Checkout, then clicks Return to cart on the checkout page. Shopify sends them to the full cart page instead of opening the drawer again.

This is expected. The cart drawer belongs to your theme, but checkout is controlled separately by Shopify. Your theme setting can choose what happens when a customer adds an item from your store, but it cannot change the checkout link.

You can leave the link as it is, or redirect the /cart page to a store page and open the drawer there. The redirect requires theme code, and the code that opens the drawer depends on your theme.

Shopify cart drawer and checkout return link

Check the cart setting first

Make sure your theme is already set to use a drawer for normal shopping.

  1. Go to Online Store → Themes in Shopify admin.
  2. Click Customize on your active theme.
  3. Open Theme settings → Cart.
  4. Set Cart type to Drawer.
  5. Save the change.

This setting controls what happens after a customer adds a product from your online store. It does not change the Return to cart link inside checkout.

Shopify’s cart settings documentation describes the Drawer, Page, and Popup notification options.

Redirect the cart page back to your store

If you want the checkout link to return customers to the drawer, redirect the cart page to a page where the drawer can load.

Open the cart section or template in Online Store → Themes → Edit code. The file is often named main-cart-items.liquid, cart.liquid, or something similar. Add this at the top of the file:

<script>
  window.location.replace("/?open_cart=true");
</script>

This sends visitors from /cart to the home page. Replace / with another store page if the drawer should open somewhere else.

The redirect affects every visit to /cart, not only visits from checkout. Keep the full cart page available if customers need it for detailed order changes, cart notes, or other cart features.

Open the drawer after the redirect

The open_cart=true part of the URL tells your theme to open the drawer after the home page loads. The exact opening method depends on the theme.

Find the code your theme already uses when a customer clicks the cart icon or adds a product. Add the URL check next to that code, using the same drawer-opening method:

const url = new URL(window.location);

if (url.searchParams.get("open_cart") === "true") {
  // Call the cart-drawer method already used by your theme here.
}

After the drawer opens, remove the parameter so it does not stay in the address:

url.searchParams.delete("open_cart");
window.history.replaceState({}, "", url.toString());

Do not copy an openCartDrawer() function from another theme unless that function exists in your theme. Dawn, Horizon, and third-party themes can use different cart elements and JavaScript methods.

Test the return link

Add a product and confirm that the drawer opens normally. Continue to checkout, click Return to cart, and check that the selected store page loads and the drawer opens with the same item.

Test the home page and the page you chose as the redirect destination on both desktop and mobile. Also open /cart directly. If customers need the full cart page, use a separate View cart link and do not redirect every /cart visit.

For most stores, keeping Shopify’s normal Return to cart link is the safer choice. Use the redirect only when returning customers to the cart drawer is more important than keeping a full cart page available.