card drawer show amount for free delivery

main
alexanderroese 2024-06-18 22:36:21 +02:00
parent de4d96c972
commit ba5f792de3
1 changed files with 4 additions and 4 deletions

View File

@ -73,18 +73,18 @@
{% assign free_shipping_threshold = 10000 %}
{% assign free_shipping_threshold = 1000 %}
{% assign total_price = cart.total_price %}
{% assign remaining_amount = free_shipping_threshold | minus: total_price %}
<span>price5 {{ total_price | money }} {% render 'shx-shipping-costs' %}</span>
<span>price6 {{ total_price | money }} {% render 'shx-shipping-costs' %}</span>
<script>
console.log("cart5", {{ cart | json }}, {{ remaining_amount }})
console.log("cart6", {{ cart | json }}, {{ remaining_amount }})
</script>
{% if total_price < free_shipping_threshold %}
<span>Du bist nur noch {{ remaining_amount | money }} von kostenfreiem Versand entfernt!</span>
<span>Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst 3,99 €)</span>
{% endif %}
<cart-drawer-items