Browse articles

Add a "continue shopping" link that closes the cart

Add an "or continue shopping" link below the checkout button that closes the cart drawer and keeps customers on the page they were browsing.

Last updated

Add a small "or continue shopping" link under the checkout button. It closes the cart drawer and leaves the customer exactly where they were, with their cart intact, so they can keep browsing instead of looking for the close icon.

EliteCart drawer with an underlined 'or continue shopping' link centered below the checkout button
  1. Enable the position

    Go to Cart designerCustom HTML and tick Enable on Below checkout button. Leave Widget mode off.

  2. Paste the code

    Paste this into the HTML editor:

    <div class="tw-text-center">
      <a href="#" onclick="window.EliteCart.closeDrawer(); return false;" class="tw-text-sm tw-text-primary tw-underline tw-cursor-pointer">
        or continue shopping
      </a>
    </div>
    
  3. Save and test

    Click Save, open the cart on your store and click the link. The drawer should close and the page should stay where it was.

The link uses window.EliteCart.closeDrawer(), so it works whether Use Shadow DOM for CSS isolation is on or off.

Change the text or look

Ask the AI generator to change it, for example "Make the link bold and say 'Keep shopping'" with Modify existing. If your store has several languages, click Make translatable to give each language its own text.

  • Close the drawer (this article): the best default. No page load, no lost scroll position.
  • Go to the home page: use href="/" instead of the onclick. The customer leaves the page they were on.
  • Open the full cart page: href="/cart" sends customers to your theme's cart page. If Block cart page is on, that page redirects back and opens EliteCart, so this link would do nothing useful.

Still stuck?

Chat with us and we'll help you get your cart live. Or email contact@elitecart.app.