Hey folks, I hope everyone is safe and well.
With the all new B2B offering Shopify has released, we’re looking to release a blended store for both B2B and Retail customers, however we have a number of items we offer exclusively to wholesale customers, and not retail.
I have it on good authority that it is possible to ‘hide’ certain products from collections (and subsequently search), based on customer tag.
We operate with a customer ‘wholesale’ or ‘retail’ tag, you’re either one or the other, so this should be a lovely data point to use to get this to work.
Has anyone got any experience with this that can help out? I’m fairly proficient in liquid code, but this one is eluding me.
Thanks in advance,
Dave
1 Like
Hi, you can hide the product via product.liquid customization. basically wrapping your product page in something like
{% if customer.tags contains “wholesale” and product.tags contains “available-for-wholesale” %}
// render your product here
{%endif %}
Note: this sample code assumes your wholesale product are also tagged with “available-for-wholesale”
Alternatively, you can split your storefronts backed by the same shopify account using sales channels. Basically your retail store can be your default, and your wholesale store can be a separate sales channel.
Note: as part of our goaffpro affiliate marketing app, we kind-of do something similar for “affiliates”. i.e. inside their dashboard, they have a separate “store” with wholesale products and only those “affiliates” can buy those products. Retail “store”/“customers” don’t see these products at all (and cannot purchase them). This is achieved by creating a Sales channel in Shopify and adding wholesale products only to that sales channel. Checkout, order placement etc. happens on your retail store (even for wholesale purchases).
1 Like
I thought it was something along these lines, but what effect would the above code have on items not within that bracket? Would they appear as normal?
On the note of the separate sales channel - we’ve been using that for a while now but in all honesty the wholesale channel is severely lacking any kind of design function that we’d like. It works well as a sales channel but it looks awful!
Thank you for your assistance thus far.
Thanks for this post, seems exactly what I needed.
But… in my theme there is no product.liquid, only a product.json. Is there a similar trick for JSON?
And second question: how about the collection grid view: should I also modify something there to hide my products?
What I do know on the topic is that each theme will have different naming conventions. You will have a liquid file that determines what occurs within a product, it just may be named different than what we have in our theme that we have been using.
Hi, I want to do this also. I want to hide a specific product from all customers except for one tagged customer. I’m using the Craft theme, which is Shopify 2.0. Were you able to get it working? If so, would you be willing to give me a couple pointers? I’m also very conversant with coding liquid, but just need a tiny bit of handholding on this.
Hi @Sharon15
You can use Merchandising rule in AI Search & Product filter to hide products from customer with no tag or other tags.
I’ve solved this problem myself.
We’re using Shopify Plus and have been using the new B2B features since their inception.
With the catalogue feature this will hide certain products from certain customers with no extra coding needed.