Code: Select all
foreach (BasketItem item in basket.Items)
{
//calculate with the item quantity
itemCount += item.Quantity;
}
itemCount = itemCount - 1;
if (itemCount >= 1)
{
lblBasketCount.Text = "<span id=\"ItemCount\">" + itemCount.ToString() + "</span>";
}
The problems I am having:
1. the itemCount will count the Package as a product in addition to the package contents
for example: if I have a package with 3 items in it and the package is called "Sale Package". It will count 4 because it includes the Package itself as an item.
I would really appreciate anyones help on this matter.