How to hide prices unless customers are logged in, Xtra template?

Bernman
Visitor
2 0 0

I'm currently working with the Xtra template and am looking to customize it so that prices are hidden throughout the template unless a customer has logged in. Could anyone familiar with this template advise me on where in the JSON structure I can make these modifications effectively?

Replies 2 (2)

JaviExpress
Shopify Partner
161 16 26

What files do you find if you search for "price" in the theme code files?

 

If price elements are clearly specified, you can wrap them in a conditional ({% if customer %}...{% endif %}) to show this content only when customer is logged in. We wrote an article for a similar customization, you can find it here.

 

Now I'm not sure if this would be the case for your paid theme Xtra

Customer Accounts Concierge
Turn the account page into a beautiful and multifunctional customer portal. Integrate contents, tools, and CRM features from other apps to drive a longer, richer and more personalized customer experience: Profile, Order History, Loyalty, Wishlist, Social Login, Customer Forms.
Bernman
Visitor
2 0 0

I only found "price" in a few locations for the theme code files, but this was a orders file. I have some featured products I'd like to remove and have narrowed down the files but cant seem to understand how the Xtra template displays their code. I'll definitely utilize the conditional in the article you provided once I find the exactl location.