Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[B2B] Restrict pricing #3144

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
445 changes: 227 additions & 218 deletions sections/featured-product.liquid

Large diffs are not rendered by default.

40 changes: 22 additions & 18 deletions sections/header.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -310,31 +310,35 @@
</a>
{%- endif -%}

{%- for block in section.blocks -%}

Check warning on line 313 in sections/header.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/header.liquid#L313

[LiquidTag] Use {% liquid ... %} to write multiple tags
{%- case block.type -%}
{%- when '@app' -%}
{% render block %}
{%- endcase -%}
{%- endfor -%}

<a href="{{ routes.cart_url }}" class="header__icon header__icon--cart link focus-inset" id="cart-icon-bubble">
{%- liquid
if cart == empty
render 'icon-cart-empty'
else
render 'icon-cart'
endif
-%}
<span class="visually-hidden">{{ 'templates.cart.cart' | t }}</span>
{%- if cart != empty -%}
<div class="cart-count-bubble">
{%- if cart.item_count < 100 -%}
<span aria-hidden="true">{{ cart.item_count }}</span>
{%- endif -%}
<span class="visually-hidden">{{ 'sections.header.cart_count' | t: count: cart.item_count }}</span>
</div>
{%- endif -%}
</a>
{% 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? -%}
<a href="{{ routes.cart_url }}" class="header__icon header__icon--cart link focus-inset" id="cart-icon-bubble">
{%- liquid
if cart == empty
render 'icon-cart-empty'
else
render 'icon-cart'
endif
-%}
<span class="visually-hidden">{{ 'templates.cart.cart' | t }}</span>
{%- if cart != empty -%}
<div class="cart-count-bubble">
{%- if cart.item_count < 100 -%}
<span aria-hidden="true">{{ cart.item_count }}</span>
{%- endif -%}
<span class="visually-hidden">{{ 'sections.header.cart_count' | t: count: cart.item_count }}</span>
</div>
{%- endif -%}
</a>
{%- endif -%}
</div>
</header>
</{% if section.settings.sticky_header_type != 'none' %}sticky-header{% else %}div{% endif %}>
Expand Down Expand Up @@ -495,7 +499,7 @@
</script>
{%- endif -%}

{% schema %}

Check notice on line 502 in sections/header.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/header.liquid#L502

[SchemaJsonFormat] JSON formatting could be improved
{
"name": "t:sections.header.name",
"class": "section-header",
Expand Down
Loading
Loading