Hello,
I am using Brooklyn theme and trying to add shopping cart quantity in Header.cshtml file under Themes\Brooklyn\Views\Shared folder. Below is the original code in the Header.cshtml for the Brooklyn theme:
@if (shoppingCartEnabled)
{
<a href="@Url.RouteUrl("ShoppingCart")" class="ico-cart">
<span class="cart-qty"></span>
</a>
@Html.Action("FlyoutShoppingCart", "ShoppingCart")
}
I updated file which included HeaderLinksModel and Nop.Web.Models.Common.
@model HeaderLinksModel
@using Nop.Web.Models.Common;
And also added quantity to the shopping cart, below is the updated code:
@if (shoppingCartEnabled)
{
<a href="@Url.RouteUrl("ShoppingCart")" class="ico-cart">
<span class="cart-qty">@T("ShoppingCart.HeaderQuantity", Model.ShoppingCartItems)</span>
</a>
@Html.Action("FlyoutShoppingCart", "ShoppingCart")
}
However, I got some error which seems that the application could not get Model.ShoppingCartItems. Can anybody help me on this?
Thank you!