Solved: Empty Cart Drawer Appears After 'Continue Shopping' on Shopify

Hey store owners! Ever had that moment where a customer just completed an order, feels great, clicks 'Continue Shopping' from the thank-you page, and then BAM! They're back on your homepage, but an empty cart drawer slides open, obstructing everything? It's a real buzzkill, right?

This exact scenario recently popped up in the Shopify community forums, and it's a fantastic example of how we can all learn from each other's troubleshooting journeys. Our fellow merchant, Geronim0, using the Horizon theme, brought this frustrating issue to light, sharing screenshots that perfectly captured the problem.

As you can see, the initial thank you page looks normal. But once that 'Continue Shopping' button is clicked, this is what happens:

That empty cart drawer just slides right in, blocking the view and making the navigation menus collapse. Not ideal for a smooth customer experience!

Why Your Empty Cart Drawer Might Be Popping Up

This isn't an uncommon issue, and the community was quick to jump in with some solid troubleshooting advice. Roman_V1 and devcoders, both seasoned contributors, highlighted a few usual suspects. It generally boils down to some JavaScript logic in your theme or an app getting a little overzealous after a purchase.

  • Theme's Cart Drawer JavaScript: Many themes, like Geronim0's Horizon theme, have built-in JavaScript that controls the cart drawer. After an order is placed, your cart is cleared. When you then navigate to a new page, this 'cart updated' or 'page loaded' event can sometimes trigger the drawer to open, even if it's empty.
  • URL Parameters: Sometimes, the redirection URL itself might contain a parameter (like #cart or a specific cart ID) that tells the page to open the cart drawer upon loading.
  • Third-Party Apps: Cart-related apps are prime suspects! Think upsell apps, free shipping bars, or any app that interacts with your cart. These often inject their own JavaScript that can interfere with the theme's default behavior.
  • Custom Code: If you've added any custom JavaScript snippets to your theme, especially those related to cart updates or page load events, they could be causing this unexpected behavior.

How to Diagnose and Fix the Empty Cart Drawer Glitch

Based on the expert advice from the community, here’s a step-by-step approach to track down and squash this bug. You'll want to tackle these systematically to pinpoint the exact cause.

Step 1: Rule Out the Thank You Page

  1. Open your homepage directly in a private/incognito window. Don't go through the checkout process or click 'Continue Shopping.' Just type your store's homepage URL (e.g., yourstore.myshopify.com) directly into the private browser.
  2. Observe: Does the empty cart drawer still pop up? If it does, then the thank-you page isn't the direct cause. The issue is likely with your theme or an app opening the drawer on any page load, not just after an order. If it doesn't pop up, then the interaction between the thank-you page and your homepage is definitely where the problem lies.

Step 2: Check the Redirect URL for Clues

  1. Replicate the issue: Complete an order, and on the thank-you page, click 'Continue Shopping.'
  2. Look at the address bar: As soon as the homepage loads with the cart drawer open, quickly check the URL. Does it have anything extra at the end, like #cart or a specific cart parameter (e.g., ?cart=...)? If so, that's a strong indicator that the URL itself is triggering the drawer.

Step 3: Investigate Your App Embeds

This is where many of these types of issues hide! Apps often inject scripts that can have unintended side effects.

  1. Go to your Shopify Admin: Navigate to Online Store > Themes.
  2. Customize your theme: Click 'Customize' on your live theme (or a duplicate theme if you prefer to test without affecting your live store).
  3. Open App embeds: In the theme editor, look for the 'App embeds' section (usually on the left sidebar, often under 'Theme settings' or a dedicated icon).
  4. Disable apps one by one (in preview only!): Switch off your app embeds one at a time. After disabling each app, reload your homepage (or replicate the 'Continue Shopping' flow from the thank-you page if Step 1 didn't show the drawer on direct load).
  5. Identify the culprit: Cart apps, upsell apps, and 'free shipping bar' apps are often the usual suspects. If disabling a specific app stops the cart drawer from appearing, you've found your problem! You can then reach out to the app's support or look for settings within the app that control cart drawer behavior.

Step 4: Check for Custom Code

If none of the above steps resolve the issue, it's time to dig into your theme's code. This is especially relevant if you or a developer have added custom functionality.

  1. Go to your Shopify Admin: Navigate to Online Store > Themes.
  2. Edit code: Click 'Actions' next to your theme and select 'Edit code.'
  3. Search for cart-related JavaScript: Look for files like theme.js, cart.js, or any custom JavaScript files you might have added. Search for terms like cart.open(), drawer.open(), cart:updated, DOMContentLoaded, or any code that specifically listens for a cart update event or a page load and then triggers the cart drawer. Remember, right after an order, the cart gets cleared, so that 'cart updated' event might fire on the next page load.
  4. Seek expert help: If you're not comfortable editing theme code, it's always best to consult a Shopify expert or developer. They can safely identify and modify the problematic code snippet.

It’s a bit like being a detective, but following these steps systematically, as suggested by our community experts like Roman_V1 and devcoders, will almost certainly lead you to the root cause. This kind of persistent, small glitch can really detract from the seamless experience we all strive for on our Shopify stores. Getting it fixed means happier customers who are more likely to browse and buy again. If you're looking to ensure your store is always running smoothly and providing the best experience, consider exploring what Shopify offers at Shopify's platform to help you build and maintain a robust online presence.

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools