I've looked at various documentation but haven't found a solution. I think whaty I want is quite simple. If product has category x then it should use template y.
This is possible if you go to your content template and edit it. Under Usage where you select the post type the content template should apply to you will see the button "Set Condition" see screenshot.
This should allow you to setup conditionals for your template so that you can set the template based on the taxonomy term that the product has selected.
Was there another template created for the products that aren't meeting the conditions? If not then you will need to create one. This is because the Woocommerce blocks plugin is assuming that you will be making your own custom template.
If this is not the case please let me know.
Thanks,
Shane
There is the tmeplate for products that I created with Toolset. The one that over-rides the Woocommerce template. There are no conditions applied to this.
Then there is the conditional template I created. The condition being that the Taxonomy term must be x
However a product with taxonomy term x still uses the template for products.
The problem is that your products don't have a default template to use when they dont meet the condition.
I see that you've used this template but it won't work unless its assigned to the products post type. hidden link
What you need to do is create a second template for the products post type and then all your products that don't meet the conditional will default to this new template.
This one works perfect because its assigned to the products post type. If you check my screenshot for the 2 content templates that you're using
Your product below. hidden link
This is using the team members content template which is not taking any effect because its not selected to work for Products. What i'm saying is that you need to create a next Content template and assign it to the products post type without any conditions.
This will serve as the default template for your products that don't meet the conditions of your already existing product template.