From 294b47f913ebff51ffaeccfc5aae0909dfdc7101 Mon Sep 17 00:00:00 2001 From: alexanderroese Date: Tue, 18 Jun 2024 22:56:34 +0200 Subject: [PATCH] card drawer show amount for free delivery --- config/settings_schema.json | 11 +++++++++++ snippets/cart-drawer.liquid | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config/settings_schema.json b/config/settings_schema.json index 7daf77d..0077a64 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -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 + } + ] } ] diff --git a/snippets/cart-drawer.liquid b/snippets/cart-drawer.liquid index bb2dc60..bc4ff1c 100644 --- a/snippets/cart-drawer.liquid +++ b/snippets/cart-drawer.liquid @@ -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 %} price6 {{ total_price | money }} {{ free_shipping_threshold }} {% if total_price < free_shipping_threshold %}