* Decrement cart count when removing cart item

This commit is contained in:
ryanbrandenburg 2015-11-05 15:44:55 -08:00
parent dddc6a2ebb
commit 5270c514a8
2 changed files with 5 additions and 3 deletions

View File

@ -1,9 +1,11 @@
@if (ViewBag.CartCount > 0) @if (ViewBag.CartCount > 0)
{ {
<li> <li>
<a asp-controller="ShoppingCart" asp-action="Index" title="@ViewBag.CartSummary"> <a asp-controller="ShoppingCart" asp-action="Index" title="@ViewBag.CartSummary">
<span class="glyphicon glyphicon glyphicon-shopping-cart"></span> <span class="glyphicon glyphicon glyphicon-shopping-cart"></span>
@ViewBag.CartCount <span id="cart-status">
@ViewBag.CartCount
</span>
</a> </a>
</li> </li>
} }

View File

@ -42,7 +42,7 @@
$('#cart-total').text(data.CartTotal); $('#cart-total').text(data.CartTotal);
$('#update-message').text(data.Message); $('#update-message').text(data.Message);
$('#cart-status').text('Cart (' + data.CartCount + ')'); $('#cart-status').text(data.CartCount);
}); });
} }
}); });