Hide specific product from cart / cart drawer

Topic summary

Goal: Add a product to the cart but hide that specific item from the cart drawer so it takes no space, while other products display normally.

Proposed solutions (both require theme customization):

  • Edit the cart template loop and add a conditional to skip rendering when the product’s handle matches the specific item you want hidden.
  • Add a conditional class to the loop (or item) wrapper for that product and use CSS to hide it so it doesn’t occupy space in the drawer.

Notes:

  • “Product handle” is the product’s unique identifier used in Shopify URLs; it can be checked in the cart line item to conditionally render or style.
  • The “cart drawer” is the slide-out mini cart interface.

Outcome/status: The requester acknowledged the guidance with thanks; no confirmation of implementation or additional issues. Discussion appears effectively addressed but not explicitly resolved.

Summarized with AI on December 12. AI used: gpt-5.

How can I add a product to the cart but make that specific product invisible in the cart drawer, so it takes up no space while all other products are still displayed normally?

Hello @Anthony808 ,

2 ways to do it and both need customization.

  1. Edit cart template and find the loop. Now here within the loop add a condition if the product handle is specific one hides the product.

  2. Add a conditional class in the loop wrapper element and use it to hide/show the specific product.

Regards
Guleria

1 Like

Thank you for your help!