Page 1 of 1

Shopping Cart Summary Box & Discounts

Posted: Fri Nov 28, 2008 1:15 pm
by TTMedia
When we do specials on the website such as volume discounts, the discount is added as another line item in the view check and the shopping cart summary box on the right hand panel. The discount is defaulted to be qty 1.

We have a line item in our shopping cart summary box for Items in Your Cart:. With one product in the cart, it will add the qty 1 of the discount and count that as being 2 items in their cart. (confusing to the customer)

How can we changed this so it only accounts for the product and not the discounts as items.

Re: Shopping Cart Summary Box & Discounts

Posted: Sat Nov 29, 2008 3:08 am
by mazhar
You can count by first checking the type of the basket item and taking care of only product. Have a look at the following code

Code: Select all

  int itemCount = 0;
        foreach (BasketItem basketItem in Token.Instance.User.Basket.Items)
        {
            if (basketItem.OrderItemType == OrderItemType.Product)
                itemCount++;
        }