hide cart content when logged in

hide cart content when logged in

christianjf95
Tourist
12 0 1

I have a little section on my website in the cart, that reminds customers to use their loyalty rewards if they have any, with a button to login. Once the customer is logged in, how can I make the content be hidden, or change to something else??

Screenshot 2024-12-27 1.35.54 PM.png

Reply 1 (1)

Valya_
Shopify Partner
11 1 3

Hey there, 

you can use logic to check if the customer is logged in.

{% unless customer %}

<p style="text-align: center;"><span style="font-size: 20px;">Have Rewards? 🌸</span></p>...other code...

<p style="text-align: center;">Not enrolled yet? No problem! You can check out now and start earning rewards next time.</p>

{% endunless %}

Just want to help

My Shopify tips & tutorials