card drawer show amount for free delivery

main
alexanderroese 2024-06-19 08:32:18 +02:00
parent 0a9e379371
commit 39fccc5b40
2 changed files with 21 additions and 22 deletions

View File

@ -71,30 +71,30 @@
</button>
</div>
{%- if cart != empty -%}
{% assign free_shipping_threshold = settings.shx_free_shipping_threshold %}
{% assign total_price = cart.total_price %}
{% assign remaining_amount = free_shipping_threshold | minus: total_price %}
{% assign shipping_costs = settings.shx_shipping_costs %}
{% assign free_shipping_threshold = settings.shx_free_shipping_threshold %}
{% assign total_price = cart.total_price %}
{% assign remaining_amount = free_shipping_threshold | minus: total_price %}
{% assign shipping_costs = settings.shx_shipping_costs %}
<script>
console.log("cart16", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }})
</script>
<script>
console.log("cart16", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }})
</script>
<div style="padding: 12px; background-color: #deecde; text-align: center;">
<span span style="font-size: 14px; color: #4B7046">
{% if total_price < free_shipping_threshold %}
Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst {{ shipping_costs | money }})
{% else %}
Prima! Du erhälst kostenfreien Versand
{% endif %}
</span>
</div>
<div style="padding: 12px; background-color: #deecde; text-align: center;">
<span span style="font-size: 14px; color: #4B7046">
{% if total_price < free_shipping_threshold %}
Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst {{ shipping_costs | money }})</span>
{% else %}
Prima! Du erhälst kostenfreien Versand
{% endif %}
</span>
</div>
<div class="shx-shipping-costs-progress">
<div class="shx-shipping-costs-progress-bar"></div>
</div>
<div class="shx-shipping-costs-progress">
<div class="shx-shipping-costs-progress-bar"></div>
</div>
{% endif %}
<cart-drawer-items
{% if cart == empty %}

View File

@ -1 +0,0 @@
{% assign free_shipping_threshold = 1000 %}