I know there are apps that can do this (like Locksmith) but it seems like I should be able to do this without an app, especially since it’s just one product.
If you would like to hide the product to certain customers, you have to do it in several places. This could be a little confusing if you do not have coding experience. You are in the right track though, you would use an if statement for this.
You have to check if the customer is logged in first, so then you are able to check if the customer contain some tags.
You have to initially hide the product, wherever this product is, and display block only if it meets the criteria
{% if customer %}
{% if customer.tags != 'appstle_subscription_active_customer'%}
{% endif %}
{% endif %}
I would need customers to not be able to access certain product categories when searching. These categories of products are only available to professional customers who have an access code to access them. But the products are still visible in the search results of my non-professional clients.
The product-template.liquid file no longer exists. I only see the product.json and the main-product.liquid files that might even come close. Please provide an updated solution. Thanks very much!