Hi,
I have a shopping site and after customer paid for the items the cart is empty but the number next to cart (how many items) is still the same and not reset to 0
the page after successful payment:
@model int
<h1>
Your Order is Sucess, Your Order id is @Model
</h1>
I am not sure where to put the code to reset the cart after purchase? at the start or login and logout I have the following:
<li class="nav-item">
<a class="nav-link" asp-area="Customer" asp-action="Index"
asp-controller="Cart">
@await Component.InvokeAsync("Cart")
</a>
</li>
and I have a folder (components/cart/Default.cshtml):
@model int
<i class="bi bi-cart"></i>(@Model)