Dawn theme - Cart drawer keep closed on adding to cart?

Topic summary

Prevent the Dawn theme’s cart drawer from auto-opening on add-to-cart while keeping the drawer and cart icon functional.

  • A contributor suggested adding a code snippet by editing Online Store → Theme → Edit code → theme.liquid and pasting the code at the bottom.
  • After applying the suggestion, the cart drawer was completely disabled: the header/cart icon became unclickable and the drawer no longer worked at all.
  • The user’s requirement is to stop only the automatic opening on add-to-cart, not to disable the drawer or header interactions.
  • No working fix or alternative approach has been provided yet; the issue remains unresolved and needs a solution that suppresses auto-open but preserves manual opening via the cart icon.
Summarized with AI on January 3. AI used: gpt-5.

How can I keep the cart drawer from not opening automatically when someone adds a product to cart?

Thanks

Hi @xnyjyh ,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save


Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

The code only completely disables the drawer cart. I want just when adding to cart that the drawer does not open. The header is disabled from that code as well and cart icon unclickable.