Hiding Certain Sections from non-customers - Trade theme

Topic summary

A wholesale business using Shopify’s Trade theme (v15.2) wants to hide trade pricing and purchase options from non-logged-in visitors while displaying only RRP (recommended retail price).

Progress Made:

  • Successfully hid trade pricing on product pages using Liquid conditional logic ({% if customer %})
  • Removed sale badges and strikethrough using CSS (.card__badge { display: none !important; })
  • Hidden pricing from non-customers in snippets/card-product.liquid

Remaining Issues:

  1. Two circled sections on product pages still show buying options to non-customers (quick add bar and product info section)
  2. Collection pages and homepage display trade prices, add-to-cart buttons, and strikethrough pricing to non-logged-in users
  3. Unable to add custom text labels (“RRP:” and “Trade Price:”) before prices on product cards
  4. Wants to display compare-at-price (stored in custom metafield custom.rrp_display) for non-customers but unsure of correct syntax
  5. Strikethrough on compare-at-price persists on product cards in collections

Guidance Provided:
Another user suggested locating the relevant template files (main-product.liquid for product info) and applying conditional classes/IDs to control visibility via CSS, though the original poster is still searching for the correct code locations.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hi,
So, I am using Trade 15.2

Company wise, we are wholesale. The goal is to hide all buying options, and trade pricing from anyone not logged in, so, they can see products and RRP but not trade pricing. Seems like it should be easy but i am fighting with it. I have managed to do almost everything I want, bar 2 things.

My menu system is based on collections, as are some features on the front page such as latest products. On the products page, I used a custom liquid with the following, and, this works great on the product page

{% if customer %}

Trade Price: {{ product.price | money }}

RRP: {{ product.compare_at_price | money }}

{% else %}

RRP: {{ product.compare_at_price | money }}

{% endif %}

Displays how I want, and also hides trade price when not logged in. Great

I also used

.card__badge {

display: none !important;

}

To get rid of the sale badges, which seems to have removed the strikethrough. Again, great, however

The 2 circled areas, I also want to hid from people who arent logged in, as, these are buying options. Have I missed a step somewhere? Or any good suggestions how to do this?

Also, this then applies onto collections pages, and the home page as below

The trade price and add to card options show (and the strikethrough is back!), so, I am not sure how I get rid of these? Again, I just want to show RRP and product detail when not logged in

Hoping this makes sense? and its simple! Everything else has been so far

Thanks

Well for the two circled sections you marked, go to the specific file that is responsible to render them and using an if condition like you have done above add a class or id on when customer is or not logged in it with which you can target it.

With css you can then hide or show these particular sections.

Hope this helps

Hey
I figured that would be the case, I just cant find where they are created :slightly_smiling_face:

Well the product info part would be on the file main-product.liquid. you might have to track down a bit to get to the info part.

And as for the quick add bar at the top i will look it up on my dev store since you are using a free theme

1 Like

Hey, So, I have found most of it, and I am now down to the product grid sections only :slightly_smiling_face: I checked in code inspector on chrome, and found the area, but, no idea where to look in the code on Shopify. I need to find out where this is, and, how to hide the “price” from non-customers. I think I need to do this at code level rather than using the B2B option?

Yes, a free theme called Trade

Ok, I have managed to hide the pricing from non logged in customers in snippets/card-product.liquid. This is fine, although I would like to add the compare at price so they can see that, I went with

{% if customer %}

{% render ‘price’, product: card_product, price_class: ‘’, show_compare_at_price: true %}
{% else %}

{% endif %}

Now, I can see this renders from price, and assume I would put something in the “else” section, not sure what :slightly_smiling_face:

However, another bit for when logged in, I would like it to say RRP: (then the compare at price) and Trade Price: (then the price), but, I havent figured how to add the info/text in front of it. I have done that on the product pages, where its fine, but, I tried the same code on the card part above but no joy. It just puts the RRP test, no figures. Compare at price is actually a metafield I created called custom.rrp_display which I linked to a text field. Can that be added into the product card?

Still cant remove strikethrough on compare at price on product cards in collections! haha