From 566403ebd87063d3bfce88b06c4ab331a872620b Mon Sep 17 00:00:00 2001 From: alexanderroese Date: Tue, 18 Jun 2024 23:01:29 +0200 Subject: [PATCH] card drawer show amount for free delivery --- config/settings_schema.json | 8 +++++++- snippets/cart-drawer.liquid | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/config/settings_schema.json b/config/settings_schema.json index 0077a64..44961f7 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -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 } ] } diff --git a/snippets/cart-drawer.liquid b/snippets/cart-drawer.liquid index bc4ff1c..c3da9d8 100644 --- a/snippets/cart-drawer.liquid +++ b/snippets/cart-drawer.liquid @@ -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 %} price6 {{ total_price | money }} {{ free_shipping_threshold }} {% if total_price < free_shipping_threshold %} - Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst 3,99 €) + Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst {% settings.shx_shipping_costs %}) {% endif %}