Have your say in Community Polls: What was/is your greatest motivation to start your own business?

How to display specific products to VIP customers in the Dawn theme?

Solved

How to display specific products to VIP customers in the Dawn theme?

Groefte
Tourist
9 2 3

Using the Dawn theme.

We have products that must only be shown to certain customers.

 

I have followed this https://yagisoftware.com/articles/only-show-products-to-certain-customers-in-shopify  guide and created 2 new product templates:

1 for products with tags "private" that can only be seen by customers with tags "VIP"

1 for products with tags "private-1" that can only be seen by customers with tags "VIP-1".

Everything here works fine..:)  

Then I have reached the point that the products should not be displayed in Catalog and All by inserting this code in main-collection-product-grid.liquid

 

{% if product.tags contains "private" %}
  {% unless customer.tags contains "VIP" %}
    {% continue %}
  {% endunless %}
{% endif %}

How to also include product.tags contains "private-1" and customer.tags contains "VIP-1" in the code. 

 

Will be very grateful if anyone can help with this..:)

Accepted Solution (1)
Groefte
Tourist
9 2 3

This is an accepted solution.

Yes  -  I am completely new to Shopify and I see that the tagged products (of course) appear in search and featured products, etc. etc. so coding would also have to be done in these files and maintain them when updating Theme to a new version. Thanks a lot for trying to help but I think I'll try to find an App for this.

View solution in original post

Replies 10 (10)
Groefte
Tourist
9 2 3

Hi Aditya,

Thanks for your suggestion but sorry it doesn't work. It only works if the customer has none of the tags.

Groefte
Tourist
9 2 3

...forgot to mention that the customer can have tags VIP or VIP-1 or both

Groefte
Tourist
9 2 3

This is an accepted solution.

Yes  -  I am completely new to Shopify and I see that the tagged products (of course) appear in search and featured products, etc. etc. so coding would also have to be done in these files and maintain them when updating Theme to a new version. Thanks a lot for trying to help but I think I'll try to find an App for this.

Groefte
Tourist
9 2 3

Thanks Aditya but I found an App

Wieco
Visitor
2 0 1

Good day,

What app are you using

Groefte
Tourist
9 2 3

Ymq B2B Login/Lock Hide Price https://apps.shopify.com/ymq-b2b-login-lock-hide-price?locale=da - it have a feature Hide Products & Collections - here you can set up a lot of rules 🙂

soulchild37
Shopify Partner
194 9 60

Hi Groefte,

Thanks for following the guide! I am the Author of the guide.

For your use case, I think you can use the code below : 

{% if product.tags contains "private" %}
  {% unless customer.tags contains "VIP" %}
    {% continue %}
  {% endunless %}
{% endif %}

{% if product.tags contains "private-1" %}
  {% unless customer.tags contains "VIP-1" %}
    {% continue %}
  {% endunless %}
{% endif %}

 
You can add the private-1 / vip-1 part below the original code you posted, I think this should work.

Hope this helps!

Axel

Spent too much support time dealing with order cancellation request from customer? Wouldn't it be good if customer can cancel order on their own without bugging your support? Try out Cancellable app! https://apps.shopify.com/cancellable . I also write articles about store customization that can improve your customer shopping experience here : Yagi Software Blog
Groefte
Tourist
9 2 3

Thank you very much Alex. I have found an App for this and it works really well but thanks for your suggestion - there may be others who come across this question who can make use of it.

Monty_3540
Tourist
4 0 0

This is the solution!!

This along with the very easy to follow guide, even if you aren't using Dawn theme - you can work out where to go easily with such detailed instructions!

Managed to solve my issue in showing Warranty £0 products for Customers only when they are logged in with 'Warranty' tags on their profile

DO NOT PAY FOR APPS THAT COVER (ONE OF MANY) FEATURES SHOPIFY SHOULD HAVE AS STANDARD

As good as Shopify can be, how it misses so many basic and common features - and just puts emphasis on buying apps to make hosting more and more expensive - is frankly criminal!

Luckily there are people out there with the coding knowledge to make it super easy even for noobs like me to sort!

khalid_gh
Shopify Partner
9 0 0

Hi @Groefte

Why not save the hassle and use a third-party app? I'm using AI Search & Product Filter, which is easy to manage via a friendly dashboard

It's possible to achieve your request within a minute using their merchandising rule feature.