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?
Topic summary
Goal: Hide product prices unless the customer is logged in, primarily on the Xtra theme; similar need raised for Venture.
Key guidance:
- Search theme code for price elements and wrap them in a Liquid conditional: {% if customer %}…{% endif %} to show prices only to logged-in users.
- A referenced blog guide explains this approach; applicability to the paid Xtra theme is uncertain.
Current status (Xtra):
- The requester found “price” only in order-related files and struggles to locate where Xtra renders product/featured prices.
- Plans to apply the conditional once the correct files/sections are identified; no resolution yet.
Additional issue (Venture):
- Previously enforced login to access product pages, but searching or visiting from Google bypasses it; after edits, the login requirement no longer works.
- Request for the default product-unit-price.liquid code to restore or compare behavior.
Open questions:
- Exact file locations in Xtra to modify.
- Standard Venture product-unit-price.liquid content.
- How to prevent search/Google paths from bypassing login gating.
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
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.
Sorry to jump on to this, but im needing to do the same with the Venture Theme.
This was set up previouly by someone else to make customers log in before they could access product pages, however if you search the product it bypasses the log in requirement - same if you google the product and go that way. Ive had a look to edit the code but cannot get this to work, and now the requirement to log in has gone…
Does anyone have the standard code for the ‘product-unit-price.liquid’? So i can see what it should be and work from there?
Thanks