NOP v2.80 - Shopping Cart Item Count

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 10 años
I'm looking for changing the count in the shopping cart header link. It gives error in the HeadrLinks.cshtml file if I use Model.Items.Count in place of Model.ShoppingCartItems. Please advise.
Hace 9 años
seetap wrote:
I'm looking for changing the count in the shopping cart header link. It gives error in the HeadrLinks.cshtml file if I use Model.Items.Count in place of Model.ShoppingCartItems. Please advise.


don`t use Model.Items.Count there

in HeadrLinks.cshtml file add something like:
@{
Model.ShoppingCartItems = EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.ShoppingCartItems
        .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart)
        .LimitPerStore(EngineContext.Current.Resolve<IStoreContext>().CurrentStore.Id)
        .ToList()
        //.GetTotalProducts();
        .Count();
}
Hace 3 años
a.m. wrote:
Everything works fine as designed. We display the total number (Qty) of ALL products in the cart. It works the same way as in the top "shopping cart (QTY)" link.

Furthermore, flyout shopping cart does not display ALL products in the cart. By default it displays only first 5 products.

If you don't like this behavior you can always change it.


how do i change it? would you answer please?
Hace 3 años
What version are you using ?
See source43\Presentation\Nop.Web\Views\Shared\Components\FlyoutShoppingCart\Default.cshtml
To change the number displayed in mini shopping cart there is a setting
shoppingcartsettings.minishoppingcartproductnumber currently set at 5
Hace 3 años
Yidna wrote:
What version are you using ?
See source43\Presentation\Nop.Web\Views\Shared\Components\FlyoutShoppingCart\Default.cshtml
To change the number displayed in mini shopping cart there is a setting
shoppingcartsettings.minishoppingcartproductnumber currently set at 5


I'm using 3.9 & thank's, I got it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.