Suspend free shipping for now
This commit is contained in:
parent
19e717e02e
commit
b047bde390
@ -64,7 +64,7 @@ class Cart:
|
||||
def __init__(self, request):
|
||||
self.request = request
|
||||
self.session = request.session
|
||||
self.site_settings = SiteSettings.load()
|
||||
# self.site_settings = SiteSettings.load()
|
||||
self.coupon_code = self.session.get('coupon_code')
|
||||
cart = self.session.get(settings.CART_SESSION_ID)
|
||||
if not cart:
|
||||
@ -178,11 +178,11 @@ class Cart:
|
||||
return containers
|
||||
|
||||
def get_shipping_cost(self, container=None):
|
||||
free_shipping_min = self.site_settings.free_shipping_min
|
||||
if free_shipping_min is not None:
|
||||
category = ProductCategory.objects.get(name='Coffee')
|
||||
if self.get_total_price_for_category(category) >= free_shipping_min:
|
||||
return Decimal('0.00')
|
||||
# free_shipping_min = self.site_settings.free_shipping_min
|
||||
# if free_shipping_min is not None:
|
||||
# category = ProductCategory.objects.get(name='Coffee')
|
||||
# if self.get_total_price_for_category(category) >= free_shipping_min:
|
||||
# return Decimal('0.00')
|
||||
|
||||
if container is None:
|
||||
container = self.session.get('shipping_container').container
|
||||
|
||||
@ -58,10 +58,6 @@
|
||||
<input type="submit" value="Apply" class="action-button">
|
||||
</p>
|
||||
</form>
|
||||
<h5>
|
||||
Free shipping on coffee orders over ${{ site_settings.free_shipping_min|floatformat:"2" }}<br>
|
||||
<small><em>Merch does not count toward total</em></small>
|
||||
</h5>
|
||||
<div class="cart__table-wrapper">
|
||||
<table class="cart__totals">
|
||||
<tr>
|
||||
|
||||
@ -65,10 +65,6 @@
|
||||
{% csrf_token %}
|
||||
{{form.as_p}}
|
||||
</form>
|
||||
<h5>
|
||||
Free shipping on coffee orders over ${{ site_settings.free_shipping_min|floatformat:"2" }}<br>
|
||||
<small><em>Merchandise does not count toward total</em></small>
|
||||
</h5>
|
||||
<div class="cart__table-wrapper">
|
||||
<table class="cart__totals">
|
||||
<tr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user