card drawer show amount for free delivery

main
alexanderroese 2024-06-18 23:01:29 +02:00
parent 294b47f913
commit 566403ebd8
2 changed files with 10 additions and 4 deletions

View File

@ -1471,9 +1471,15 @@
"settings": [
{
"type": "number",
"id": "free_shipping_threshold",
"id": "shx_free_shipping_threshold",
"label": "Shx Mindestbestellwert für kostenfreien Versand",
"default": 1000
},
{
"type": "number",
"id": "shx_shipping_costs",
"label": "Shx Versandkosten, wenn unter Mindestbestellwert für kostenfreien Versand ist",
"default": 399
}
]
}

View File

@ -73,18 +73,18 @@
{% assign free_shipping_threshold = settings.free_shipping_threshold %}
{% assign free_shipping_threshold = settings.shx_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("cart11", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }})
console.log("cart12", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }})
</script>
{% if total_price < free_shipping_threshold %}
<span style="font-size: 14px;">Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst 3,99 €)</span>
<span style="font-size: 14px;">Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst {% settings.shx_shipping_costs %})</span>
{% endif %}
<cart-drawer-items