Shopping Cart Summary Box & Discounts

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
TTMedia
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 83
Joined: Mon Dec 03, 2007 11:49 am

Shopping Cart Summary Box & Discounts

Post by TTMedia » Fri Nov 28, 2008 1:15 pm

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.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Shopping Cart Summary Box & Discounts

Post by mazhar » Sat Nov 29, 2008 3:08 am

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++;
        }

Post Reply