card drawer show amount for free delivery

main
alexanderroese 2024-06-18 22:45:10 +02:00
parent ba5f792de3
commit c8703ded2e
3 changed files with 6 additions and 5 deletions

View File

@ -73,18 +73,19 @@
{% assign free_shipping_threshold = 1000 %}
{% render 'shx-config' %}
{% assign free_shipping_threshold = free_shipping_threshold %}
{% assign total_price = cart.total_price %}
{% assign remaining_amount = free_shipping_threshold | minus: total_price %}
<span>price6 {{ total_price | money }} {% render 'shx-shipping-costs' %}</span>
<span>price6 {{ total_price | money }} {{ free_shipping_threshold }}</span>
<script>
console.log("cart6", {{ cart | json }}, {{ remaining_amount }})
console.log("cart7", {{ cart | json }}, {{ remaining_amount }})
</script>
{% if total_price < free_shipping_threshold %}
<span>Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst 3,99 €)</span>
<span style="font-size: 14px;">Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst 3,99 €)</span>
{% endif %}
<cart-drawer-items

View File

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

View File

@ -1 +0,0 @@
10