Where do I modify ShoppinCartManager code?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
Hi,
I'm new to nopcommerce development and I'm I'm trying to work out where the code is for the ShoppingCartManager class. If I right click and "go to definition" it just takes me to a method stub ("from metadata"). Is the source code of ShoppingCartManager not included in nopCommerce?

What I'm actually trying to fix is the incorrect "items in basket" quantity being returned in this class. If I add 50 of the same item to my shopping basket, the  shoppingCart.Count property incorrectly returns 1 instead of 50 as it doesn't take into account the quantity of the order line.

Thanks,
Nick.
13 年 前
Don't worry I've figured this out. I'd been given just the NopCommerceStore folder of the solution by the previous developer, rather than the entire solution.  I've now got it working.

I solved the basket quantity bug by using the following line in the minishoppingcartbox control:

int actualQuantity = shoppingCart.Sum(i => i.Quantity);

..then substituting actualQuantity for shoppingCart.Count in the appropriate place.

Nick
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.