card drawer show amount for free delivery

main
alexanderroese 2024-06-18 22:56:34 +02:00
parent c25eb3efbe
commit 294b47f913
2 changed files with 13 additions and 2 deletions

View File

@ -1465,5 +1465,16 @@
"default": "scheme-1"
}
]
},
{
"name": "shx-shipping-settings",
"settings": [
{
"type": "number",
"id": "free_shipping_threshold",
"label": "Shx Mindestbestellwert für kostenfreien Versand",
"default": 1000
}
]
}
]

View File

@ -73,14 +73,14 @@
{% render 'shx-config' %}
{% assign free_shipping_threshold = settings.free_shipping_threshold %}
{% assign total_price = cart.total_price %}
{% assign remaining_amount = free_shipping_threshold | minus: total_price %}
<span>price6 {{ total_price | money }} {{ free_shipping_threshold }}</span>
<script>
console.log("cart10", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }})
console.log("cart11", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }})
</script>
{% if total_price < free_shipping_threshold %}