Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add message when product is deleted from cart
Mira Szewczyk5e78fb823a94
diff --git a/saleor/static/js/storefront.js b/saleor/static/js/storefront.jsindex 2173e291a0..2865607b62 100644--- a/saleor/static/js/storefront.js+++ b/saleor/static/js/storefront.js@@ -176,6 +176,7 @@ if (variantPicker) {var $cartLine = $('.cart__line')var $total = $('.cart-total')var $cartBadge = $('.navbar__brand__cart .badge')+var $removeProductSucces = $('.remove-product-alert')$cartLine.each(function() {var $quantityInput = $(this).find('#id_quantity')var cartFormUrl = $(this).find('.form-cart').attr('action')@@ -194,6 +195,7 @@ $cartLine.each(function() {$cartBadge.html(response.cart)$qunatityError.html('')$cartDropdown.load(summaryLink)+ $removeProductSucces.removeClass('hidden-xs-up')},error: (response) => {$qunatityError.html(getAjaxError(response))diff --git a/templates/cart/index.html b/templates/cart/index.htmlindex 41c25c75f5..6d31278713 100644--- a/templates/cart/index.html+++ b/templates/cart/index.html@@ -14,6 +14,10 @@{% endblock breadcrumb %}{% block content %}+<div class="alert alert-success hidden-xs-up remove-product-alert">+ {% trans "Product has been deleted from cart" %}+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>+</div><div class="cart">{% if cart_lines %}<div class="cart__table-header hidden-sm-down">