From 388556723ea2ed1a6cf45a91a98ef23e0e7c7923 Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Sun, 6 Nov 2022 10:00:57 -0700 Subject: [PATCH] Suspend free shipping for now --- src/storefront/cart.py | 8 ++++---- src/storefront/templates/storefront/cart_detail.html | 4 ++-- src/storefront/templates/storefront/order_form.html | 4 ---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/storefront/cart.py b/src/storefront/cart.py index 38e9fe1..0898156 100644 --- a/src/storefront/cart.py +++ b/src/storefront/cart.py @@ -60,7 +60,7 @@ class CartItem: class Cart: item_class = CartItem - site_settings = SiteSettings.load() + # site_settings = SiteSettings.load() def __init__(self, request): self.request = request @@ -170,9 +170,9 @@ class Cart: return containers def get_shipping_cost(self, container=None): - free_shipping_min = self.site_settings.free_shipping_min - if self.get_total_price() >= free_shipping_min: - return Decimal('0.00') + # free_shipping_min = self.site_settings.free_shipping_min + # if self.get_total_price() >= free_shipping_min: + # return Decimal('0.00') if container is None: container = self.session.get('shipping_container').container diff --git a/src/storefront/templates/storefront/cart_detail.html b/src/storefront/templates/storefront/cart_detail.html index 75679a1..6b34eb6 100644 --- a/src/storefront/templates/storefront/cart_detail.html +++ b/src/storefront/templates/storefront/cart_detail.html @@ -21,7 +21,7 @@

{{product.name}}

-

{{ item.variant.name }}

+

{{ item.variant.name }}

{% for key, value in item.options.items %}

{{ key }}: {{ value }}

{% endfor %} @@ -58,7 +58,7 @@

-
Free shipping on orders over ${{ site_settings.free_shipping_min|floatformat:"2" }}
+
diff --git a/src/storefront/templates/storefront/order_form.html b/src/storefront/templates/storefront/order_form.html index 2e24fdb..03d8c0e 100644 --- a/src/storefront/templates/storefront/order_form.html +++ b/src/storefront/templates/storefront/order_form.html @@ -79,11 +79,7 @@ {% endif %} - {% if cart.get_total_price >= site_settings.free_shipping_min %} - - {% else %} - {% endif %}
ShippingFree!${{ cart.get_shipping_cost }}
Total