Auto Select Product Template based on customer tag

Hi,

on Dawn theme, I made a product template to hide the “add to cart & buy now” buttons, and its works.
I made it with no coding, just hiding the option from the product information using hiding options.

however, I want to enable/disable that template based on the customer tags.

All non-tagged and tagged customers can see the product page, the difference only will be the ability to buy it.

So the logic will be like this:
I selected specific products to use the custom template. Whenever a customer with the tag " subscribed " opens that specific product page, the custom template will be DISABLED and the product will use the default template instead.

{% IF collection.tags contains 'subuscribed'  %}

for the selected products, **override** the custome template 'Subscribed-only-2' and use 'Default Template'

{% else %}

for the selected products, **Enable** using the product custome template 'Subscribed-only-2' Template

{% endif %}

Would appreciate any help!

Thanks

typo:

{% IF customer.tags contains 'subuscribed'  %}

for the selected products, **override** the custome template 'Subscribed-only-2' and use 'Default Template'

{% else %}

for the selected products, **Enable** using the product custome template 'Subscribed-only-2' Template

{% endif %}

So after hours of searching, I figured out how to hide the product fields that I don’t want to show when the specific template is selected based on the customer tags.

Still need help on:

1**. I want to keep showing the [class=“product__text”] ONLY to customers who don’t have a specific tag on the product that uses the specific template. like: “This product is only available to subscribed customers”..**

I am thinking to hide it using the Shopify product settings and using a code to override that hiding when the customer tag is not right.

Here is the code I used on Theme.liquid:

{% if template contains 'no-buy-button-template' %}

  {% unless customer.tags contains 'Subscribed Only 5'  %}

{% endunless %}

{% endif %}

Any help is appreciated, Thanks

SOLVED

here is the code on Theme.liquid, for anyone who has the same issue:

{% if template contains 'no-buy-button-template' %}

  {% unless customer.tags contains 'Subscribed Only 5'  %}

{% endunless %}

{% endif %}

{% if template contains 'no-buy-button-template' %}

  {% if customer.tags contains 'Subscribed Only 5'  %}

{% endif %}
  

{% endif %}