Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Hide calculate shipping cost when all items in cart do not require shipping
Mira Szewczykf6b4c61403f2
diff --git a/saleor/cart/views.py b/saleor/cart/views.pyindex e44667b4d2..6ac72278a8 100644--- a/saleor/cart/views.py+++ b/saleor/cart/views.py@@ -43,6 +43,7 @@ def index(request, cart):return TemplateResponse(request, 'cart/index.html',{+ 'shipping_required': cart.is_shipping_required(),'cart_lines': cart_lines,'cart_total': cart_total,'local_cart_total': local_cart_total,diff --git a/templates/cart/index.html b/templates/cart/index.htmlindex ecbbf3ca0a..e75796a8fb 100644--- a/templates/cart/index.html+++ b/templates/cart/index.html@@ -92,6 +92,7 @@</div></div></div>+ {% if shipping_required %}<div class="row"><div class="col-md-12"><a href="{% url "checkout:login" %}" class="btn primary float-md-right">@@ -119,6 +120,7 @@</div></div></div>+ {% endif %}{% else %}<div class="cart__empty"><img src="{% static 'images/pirate_cart.png' %}"