Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Reload cart dropdown when products quantity in cart is changing

weronkae9104f427c7f
diff --git a/saleor/static/js/storefront.js b/saleor/static/js/storefront.js
index 74125b91f5..8aeffead7c 100644
--- a/saleor/static/js/storefront.js
+++ b/saleor/static/js/storefront.js
@@ -168,6 +168,7 @@ $cartLine.each(function() {
$total.html(response.total)
$cartBadge.html(response.cart)
$formError.html('')
+ $cartDropdown.load(summaryLink)
},
error: (response) => {
var qunatityError = $.parseJSON(response.responseText).error.quantity
@@ -184,6 +185,8 @@ $cartLine.each(function() {
if (response.cart_length >= 1) {
$(this).fadeOut()
$total.html(response.total)
+ $cartBadge.html(response.cart)
+ $cartDropdown.load(summaryLink)
} else {
location.reload()
}