Product for b2b customers only

Hi - any ideas how to have a product available for b2b customers only - not d2c?

@Trevor001 you could hide products depending on the customer tags, but you will have to adjust the code.
Here is an example:

{% if customer.tags contains 'b2b' %}
 Display all
{% else %}
 {% unless product.tags contains 'hide-b2c' %}
 Display only products that don't have the 'hide-b2c' tag
 {%endunless%}
{%endif%}
1 Like