Restrict certain product to guest user

Highlighted
New Member
2 0 0

Hi all,

Thanks to look at this topic. I want to prevent some product to guest user, only want to show loged in user. Can any one please help me which is the best and shortest way to do this. Thats why I can manage it easily. 

I have done this of my own but that is very lenghy process. I have added a metafield in some product which I want to restrict and checking in the for loop where products are displaing if product has the metafield and not customer then that product will not be display. Every thing is lookimg good but the problem is in this way I need to add that condition in every liquid page from where products are being display.

Thanks again.

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
289 0 219

Hey there!

Usually I'd either recommend:

  • Locksmith, for shutting off areas to people who don't have a password to them.
  • Customer Pricing, if you have a lot of different types of customers who need to see certain pricing.

You can even combine the two for a really effective way to use a single products list for lost of different types of people.

Hope that helps!

0 Likes
New Member
2 0 0

Hi Alex,

Thanks for your valuable response. I shall try it, hope this will fulfill my demand.

0 Likes