Skip to content

Commit

Permalink
Merge pull request #29 from TrellisCommerce/feature/SHOPBASE-30
Browse files Browse the repository at this point in the history
Feature/shopbase 30
  • Loading branch information
cmegalo authored Oct 4, 2024
2 parents eef7545 + 3a556d9 commit fa37b37
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}

/*
! tailwindcss v3.4.12 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com
*/

/*
Expand Down
1 change: 1 addition & 0 deletions locales/en.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
"cart_error": "There was an error while updating your cart. Please try again.",
"cart_quantity_error_html": "You can only add {{ quantity }} of this item to your cart.",
"cart_clear": "Clear cart",
"buy_again": "Buy again",
"duties_and_taxes_included_shipping_at_checkout_with_policy_html": "Duties and taxes included. Discounts and <a href=\"{{ link }}\">shipping<\/a> calculated at checkout.",
"duties_and_taxes_included_shipping_at_checkout_without_policy": "Duties and taxes included. Discounts and shipping calculated at checkout.",
"taxes_included_shipping_at_checkout_with_policy_html": "Taxes included. Discounts and <a href=\"{{ link }}\">shipping<\/a> calculated at checkout.",
Expand Down
9 changes: 9 additions & 0 deletions sections/main-cart-footer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
<button class="button twcss-capitalize twcss-block twcss-mb-8">{{ 'sections.cart.cart_clear' | t }}</button>
</cart-clear-button>
{%- endif -%}
{% assign customer_has_orders = false %}

Check warning on line 32 in sections/main-cart-footer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-cart-footer.liquid#L32

[LiquidTag] Use {% liquid ... %} to write multiple tags
{% if customer %}
{% for order in customer.orders %}
{% assign customer_has_orders = true %}
{% endfor %}
{% if customer_has_orders == true %}
<a href="/account/orders" class="button twcss-capitalize twcss-mb-8">{{ 'sections.cart.buy_again' | t }}</a>
{% endif %}
{% endif %}
{%- endif -%}

<div class="cart__footer isolate section-{{ section.id }}-padding">
Expand Down
12 changes: 11 additions & 1 deletion sections/main-cart-items.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,20 @@

<div class="cart__warnings">
<h1 class="cart__empty-text">{{ 'sections.cart.empty' | t }}</h1>
<a href="{{ routes.all_products_collection_url }}" class="button">
<a href="{{ routes.all_products_collection_url }}" class="button twcss-mb-8">
{{ 'general.continue_shopping' | t }}
</a>

{% assign customer_has_orders = false %}

Check warning on line 43 in sections/main-cart-items.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/main-cart-items.liquid#L43

[LiquidTag] Use {% liquid ... %} to write multiple tags
{% if customer %}
{% for order in customer.orders %}
{% assign customer_has_orders = true %}
{% endfor %}
{% if customer_has_orders == true %}
<a href="/account/orders" class="button twcss-capitalize twcss-mb-8">{{ 'sections.cart.buy_again' | t }}</a>
{% endif %}
{% endif %}

{%- if shop.customer_accounts_enabled and customer == null -%}
<h2 class="cart__login-title">{{ 'sections.cart.login.title' | t }}</h2>
<p class="cart__login-paragraph">
Expand Down
21 changes: 20 additions & 1 deletion snippets/cart-drawer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,20 @@
>
{% render 'icon-close' %}
</button>
<a href="{{ routes.all_products_collection_url }}" class="button">
<a href="{{ routes.all_products_collection_url }}" class="button twcss-mb-8">
{{ 'general.continue_shopping' | t }}
</a>

{% assign customer_has_orders = false %}

Check warning on line 47 in snippets/cart-drawer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/cart-drawer.liquid#L47

[LiquidTag] Use {% liquid ... %} to write multiple tags
{% if customer %}
{% for order in customer.orders %}
{% assign customer_has_orders = true %}
{% endfor %}
{% if customer_has_orders == true %}
<a href="/account/orders" class="button twcss-capitalize twcss-mb-8">{{ 'sections.cart.buy_again' | t }}</a>
{% endif %}
{% endif %}

{%- if shop.customer_accounts_enabled and customer == null -%}
<p class="cart__login-title h3">{{ 'sections.cart.login.title' | t }}</p>
<p class="cart__login-paragraph">
Expand Down Expand Up @@ -455,6 +465,15 @@
<button class="underlined-link twcss-underline twcss-capitalize twcss-block twcss-mb-8 twcss-ml-auto">{{ 'sections.cart.cart_clear' | t }}</button>
</cart-clear-button>
{%- endif -%}
{% assign customer_has_orders = false %}

Check warning on line 468 in snippets/cart-drawer.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

snippets/cart-drawer.liquid#L468

[LiquidTag] Use {% liquid ... %} to write multiple tags
{% if customer %}
{% for order in customer.orders %}
{% assign customer_has_orders = true %}
{% endfor %}
{% if customer_has_orders == true %}
<a href="/account/orders" class="button twcss-capitalize twcss-mb-8">{{ 'sections.cart.buy_again' | t }}</a>
{% endif %}
{% endif %}
{%- endif -%}

{%- if settings.show_cart_note -%}
Expand Down

0 comments on commit fa37b37

Please sign in to comment.