On this page
What this issue is
A mini-cart drawer is the panel that slides in from the side (or drops down) when a shopper clicks the cart icon or adds a product. It shows the items, the subtotal and a checkout button. When it won't open, the click appears to do nothing, or the drawer flashes and closes, or it opens empty.
Why it costs you leads or sales
The drawer is often the main route from product page to checkout. If it fails, shoppers don't know whether the add worked. Some click again and create duplicate items. Others give up. Impact is usually medium: people who know the /cart URL can still get through, but most will not.
- Product pageShopper clicks Add to cart
- Mini-cart drawerDrawer doesn't open
- Cart reviewShopper can't see items
- CheckoutNever reached
The drawer fails after the add, so the checkout steps are never reached.
Example: illustrative numbers showing how a broken drawer can reduce the share of add-to-cart sessions that reach checkout.
How to check if your site has it
Use a private window
Open your store in an incognito or private window so extensions and logged-in state don't interfere.
Click the cart icon
Do this on the homepage with an empty cart, then again after adding a product.
Test on mobile
Use a real phone, or the device toolbar in Chrome DevTools. Sticky bars and cookie banners often cover the icon on small screens.
Open the console
Press F12, choose Console, and click the icon. Red errors such as 'Uncaught TypeError' point to a broken script.
Inspect what is on top
Right-click the icon, choose Inspect, and check whether the highlighted element is the icon or something else, such as a chat widget or invisible overlay.
An invisible layer can take the click, so the cart icon never receives it.
How to fix it
Work from the most common cause to the least. Change one thing at a time and retest, so you know which change fixed it.
Read the console error
Note the file name in the error. It often names the theme file or the app causing the failure.
Disable recent additions
Turn off the most recently installed cart, upsell, popup or analytics app or plugin and retest.
Check for duplicate scripts
Two cart apps, or jQuery loaded twice, can stop the drawer from binding to the click.
Fix any covering element
Lower the z-index of the overlay or add pointer-events: none to it if it is purely decorative.
Test the cart page fallback
Make sure the cart icon links to /cart when JavaScript fails, so shoppers still have a route.
Check the theme setting
In Online Store > Themes > Customize, open Theme settings > Cart and confirm the cart type is set to Drawer (the name varies by theme).
Disable app embeds
In the theme editor, open App embeds and switch off cart or upsell apps one at a time to find the conflict.
Test on a duplicate theme
Duplicate the theme, make changes there, and publish only when the drawer works.
Find the conflict
Deactivate plugins one at a time, starting with side cart, cache, optimisation and popup plugins, and retest after each.
Exclude scripts from minification
In your caching or optimisation plugin, exclude the cart script from combine, minify and delay JavaScript settings.
Clear caches
WooCommerce cart fragments can be cached. Purge page, object and CDN caches after changes.
Check the cart settings
In the Designer, select the cart element and confirm the cart opens on click (Cart settings > Open cart on add or on click).
Check layers
Look for elements with a higher z-index or a full-width transparent div sitting over the cart icon.
Use Preview mode
Open Tag Assistant preview, click the cart icon, and see whether a Custom HTML tag fires at that moment.
Pause suspect tags
Pause Custom HTML tags that edit the page or attach click handlers, publish to a test workspace, and retest.
Bind the handler safely
Use event delegation so the handler still works when the cart icon is re-rendered. See the snippet below.
Guard against errors
Wrap optional code in try/catch so one failing script doesn't stop the drawer code that runs after it.
document.addEventListener('click', function (e) {
var trigger = e.target.closest('[data-cart-toggle]');
if (!trigger) return;
e.preventDefault();
var drawer = document.getElementById('cart-drawer');
if (drawer) {
drawer.classList.add('is-open');
drawer.setAttribute('aria-hidden', 'false');
}
});.promo-overlay {
pointer-events: none;
}
.cart-icon {
position: relative;
z-index: 10;
}Broken
- Icon click does nothing
- Console shows a JavaScript error
- Shopper unsure the item was added
Fixed
- Drawer slides in on click and on add
- Items and subtotal are shown
- Checkout button is visible and works
How to confirm it's fixed
- Drawer opens from the cart icon with an empty cart
- Drawer opens after Add to cart on a product page
- Works on desktop and a real mobile device
- No red errors in the console during the click
- Items, quantity and subtotal display correctly
- Checkout button inside the drawer leads to checkout
- Tested in Chrome and Safari
How to prevent it happening again
Most drawer failures appear after a change: a theme update, a new app, a script added through a tag manager, or a cache or minification setting. Test the cart after each of these, and keep a short list of what changed and when.
- Test the cart on a staging or duplicate theme before publishing
- Install one cart or upsell app at a time
- Retest after theme updates and optimisation plugin changes
- Review sticky bars, popups and chat widgets on mobile
- Schedule an automated check of the add-to-cart journey
How FunnelGuard handles this
FunnelGuard detects this today. A robot visitor runs your add-to-cart journey on a schedule and performs a click step on the cart icon or button. If the click can't be completed, or the step doesn't lead to the expected result, the check fails.
A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause. Alerts can go to email, Slack, Teams, WhatsApp, a webhook or PagerDuty. The check is based on the click step, so it tells you the drawer step failed, not the exact line of code to change. Test traffic is marked and stops before payment. The Free plan covers 1 site and 2 journeys with daily checks and no card.
Error present
Leads or data lost
The click handler never runs. The drawer stays closed and the shopper is stuck.
One failing script can stop the drawer code that follows it.
Questions people ask
Why is my mini-cart drawer not opening?
The most common reasons are a JavaScript error, a conflict between your theme and a cart or upsell app, or an element covering the cart icon. Check the browser console for red errors and inspect what sits on top of the icon. Then disable recent apps or plugins one at a time.
Why does my cart drawer not open after Add to cart on Shopify?
The theme's cart type may be set to page rather than drawer, or an app embed may be conflicting. In the theme editor, check the cart setting and switch off app embeds one at a time. Test on a duplicate theme first.
Why is my WooCommerce side cart not opening?
Often a caching or optimisation plugin is delaying, combining or minifying the cart script, or another plugin conflicts with it. Exclude the cart script from those options, purge caches, and deactivate plugins one by one to find the conflict.
How do I find what is blocking the cart icon click?
Right-click the icon and choose Inspect. If the highlighted element is not the icon, something is covering it, such as a popup, sticky bar or chat widget. Adjust its z-index or set pointer-events: none if it is decorative.
Why does the cart drawer work on desktop but not on mobile?
Mobile layouts often add sticky headers, cookie banners or chat bubbles that sit over the cart icon, or use a different menu script. Test on a real phone and inspect the element at mobile width.
Can a tag manager script break the cart drawer?
Yes. A Custom HTML tag that throws an error or attaches its own click handlers can stop the drawer script. Use Google Tag Manager Preview mode, click the cart icon, and pause suspect tags to test.
How can I be alerted if my mini-cart stops opening?
Use a synthetic monitor that runs your add-to-cart journey on a schedule. FunnelGuard performs the click step, re-checks a failure from a second region, and sends one alert with a screenshot and likely cause.