diff --git a/sections/featured-product.liquid b/sections/featured-product.liquid index a79d8d86d63..f01907ec765 100644 --- a/sections/featured-product.liquid +++ b/sections/featured-product.liquid @@ -36,6 +36,9 @@ endif -%} +{% comment %} Temporary for restrict buying to B2B customers only {% endcomment %} +{%- assign shop_restricted_b2b_buying_enabled = true %} + {% comment %} TODO: assign `product.selected_or_first_available_variant` to variable and replace usage to reduce verbosity {% endcomment %} {%- assign first_3d_model = product.media | where: 'media_type', 'model' | first -%} @@ -209,7 +212,7 @@ {{- product.selected_or_first_available_variant.sku -}}

{%- when 'quantity_selector' -%} - {%- if shop.b2b_customers_enabled != blank -%} + {%- if shop_restricted_b2b_buying_enabled == false or shop_restricted_b2b_buying_enabled and customer.b2b? -%}
{%- liquid if cart == empty diff --git a/sections/main-product.liquid b/sections/main-product.liquid index 205612a297a..b3a5c47804e 100644 --- a/sections/main-product.liquid +++ b/sections/main-product.liquid @@ -41,6 +41,9 @@ {%- endif -%} + {% comment %} Temporary for restrict buying to B2B customers only {% endcomment %} + {%- assign shop_restricted_b2b_buying_enabled = true %} + {%- assign first_3d_model = product.media | where: 'media_type', 'model' | first -%} {%- if first_3d_model -%} {{ 'component-product-model.css' | asset_url | stylesheet_tag }} @@ -207,7 +210,7 @@
{%- when 'quantity_selector' -%} - {%- if shop.b2b_customers_enabled != blank -%} + {%- if shop_restricted_b2b_buying_enabled == false or shop_restricted_b2b_buying_enabled and customer.b2b? -%}
{%- endif -%} - {%- when 'popup' -%} + {%- when 'popup' -%}
- {%- if shop.b2b_customers_enabled != blank -%} + {%- if shop_restricted_b2b_buying_enabled == false or shop_restricted_b2b_buying_enabled and customer.b2b? -%}
{%- if card_product.available == false -%}
- {%- if shop.b2b_customers_enabled != blank -%} + {%- if shop_restricted_b2b_buying_enabled == false or shop_restricted_b2b_buying_enabled and customer.b2b? -%} {%- if show_quick_add -%}
{%- liquid diff --git a/snippets/meta-tags.liquid b/snippets/meta-tags.liquid index 45ccdcdd3c3..c7dac096c8d 100644 --- a/snippets/meta-tags.liquid +++ b/snippets/meta-tags.liquid @@ -26,8 +26,11 @@ {%- endif -%} +{% comment %} Temporary for restrict buying to B2B customers only {% endcomment %} +{%- assign shop_restricted_b2b_buying_enabled = true %} + {%- if request.page_type == 'product' -%} - {%- if shop.b2b_customers_enabled != blank -%} + {%- if shop_restricted_b2b_buying_enabled == false or shop_restricted_b2b_buying_enabled and customer.b2b? -%} {%- endif -%} diff --git a/snippets/price.liquid b/snippets/price.liquid index 049727cc191..d89ab7c2032 100644 --- a/snippets/price.liquid +++ b/snippets/price.liquid @@ -37,7 +37,10 @@ endif -%} -{%- if shop.b2b_customers_enabled != blank -%} +{% comment %} Temporary for restrict buying to B2B customers only {% endcomment %} +{%- assign shop_restricted_b2b_buying_enabled = true %} + +{%- if shop_restricted_b2b_buying_enabled == false or shop_restricted_b2b_buying_enabled and customer.b2b? -%}
{{ 'products.product.price.regular_price' | t }} - {{- - 'products.product.volume_pricing.price_range' - | t: minimum: money_price_min, maximum: money_price_max - -}} + {{- 'products.product.volume_pricing.price_range' | t: minimum: money_price_min, maximum: money_price_max -}} {%- else -%} {{ 'products.product.price.regular_price' | t }}