Hide add to cart button unless logged in - Dawn Theme

Topic summary

  • Goal: Show only “Add to quote” to logged-out visitors and only “Add to cart” to logged-in customers on product pages.

  • Proposed solution: Use Shopify Liquid conditionals around the buttons to toggle visibility based on login state (the “customer” object). A reply included code and a step-by-step screenshot showing where to edit in the Dawn theme; that screenshot is central to implementation.

  • Constraint: The requester’s theme includes third-party app customizations, so their code structure differs and they’re cautious about making changes that could break the site.

  • Variant enhancement: Another user added a requirement that only customers tagged “wholesale” see the buy/add-to-cart buttons, using: {% if customer and customer.tags contains ‘wholesale’ %}. This provides tighter control over who can check out.

  • Terms: Liquid is Shopify’s templating language; the “customer” object exists only when a user is logged in; customer tags are labels assigned to accounts.

  • Status: No confirmed implementation by the original requester; guidance helped others, but the requester likely needs customization-aware edits. Discussion remains open.

Summarized with AI on January 3. AI used: gpt-5.

Thank you for this! unfortunately I am not well-versed in coding, and, as we have some third party apps installed, the code does not look identical to what you are showing, so I wouldn’t know how to do this properly without potentially breaking the site