how to do restricted for custom collection

phpfaruk
Excursionist
32 1 1

hello,

I have created custom collection name wholesale.

now I want to do restricted for this page those who are customer tags are wholesale.

https://hilasonwholesale.myshopify.com/collections/wholesale

I already done customer tags wholesale, 

how can I do it?

Replies 7 (7)
Bo
Shopify Staff (Retired)
1751 195 450

Hey there, @phpfaruk 

 

Bo here from Shopify Support! 

 

That is a really great question. There is actually an application with this specific functionality. Locksmith is an app that allows merchants to lock their store or certain parts of their store from the general public. Once the site is locked customers can gain access if they have the right "key". One option for this is having the customer's email contain something specific i.e. they must be tagged with "wholesale", for example. This app comes with a 14-day trial and is then $9 per month. 

 

We actually have a fantastic guide on selling wholesale with Shopify right here. Let me know how this goes and if there is anything else I can assist you with, I'm happy to help!

 

All the Best,

Bo

Bo | Retired Staff Member

phpfaruk
Excursionist
32 1 1

without app, I want to do myself. 

I know liquid . 

 

I have tried myself, but it is not working 

{% if customer.tags == "wholesale" %}
  {% include 'wholesale.collection' %}
{% else %}
 <h2> you must be wholesale customer </h2>
{% endif %}

Bo
Shopify Staff (Retired)
1751 195 450

Ah, I see, thank you for clarifying. I would recommend posting this in our Design Board so some developers will see your query, they should be able to help you out there! 

 

All the Best,

Bo 

Bo | Retired Staff Member

phpfaruk
Excursionist
32 1 1

I myself solved.

Thanks 

Bo
Shopify Staff (Retired)
1751 195 450

Hey @phpfaruk 

 

I am so glad to hear that you found a solution. If you are willing it would be fantastic if you could share that solution with us here so that other merchants can benefit from your knowledge. 

 

All the Best,

Bo

Bo | Retired Staff Member

Tridentfront
New Member
1 0 0

I'm looking for something similar, how did you fix it in liquid?

phpfaruk
Excursionist
32 1 1

Yes, I myself have  solved it. what types of restricted do you want? 

show me your store website.