My programmer has added a cart item(s) # as well as dollar amount to the header, but we are experiencing a small problem. Whenever adding items to the cart, the number of items shown as well as total amount is right. But as soon as you checkout, this is where the problem occurs.
Once you select a shipping method, it adds 1 item to the cart (but total $ amount doesn't change). Also, when you add a coupon code, it adds another item to the cart (again, the $ amount of the cart doesnt change, which is right). What now happens is the basket total in the header shows 3 items (1 for the actual product, 1 for shipping and 1 for coupon code). We only want it to display 1 item, as this is the correct number.
See attached screenshot. Could someone let us know how to fix this?
Thanks again AbleCommerce members!
custom Cart Total in Header is incorrect--Need help
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
Re: custom Cart Total in Header is incorrect--Need help
Hello,
I'd just create a new header for use on the checkout page without the cart total, it's redundant and trying to get it to work with the ajax enabled one page checkout is likely more work than it's worth.
I'd just create a new header for use on the checkout page without the cart total, it's redundant and trying to get it to work with the ajax enabled one page checkout is likely more work than it's worth.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: custom Cart Total in Header is incorrect--Need help
Able uses numbers less than 0 for things like coupons, shipping, taxes. Try filtering your quantity count to exclude basket products that have a productid <0 .
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: custom Cart Total in Header is incorrect--Need help
To display the total quantity or Items plz use the following code..
System.Int32 j;
System.Int32 j;
protected void Page_Load(object sender, EventArgs e)
{
GetBasketItems();
}
private void GetBasketItems()
{
Basket basket = Token.Instance.User.Basket;
//WE WANT TO RESET THE GIFT OPTIONS AT THIS STAGE
basket.Package(true);
foreach (BasketItem item in basket.Items)
{
if (item != null)
{
Product product = item.Product;
if (product != null)
{
i++; // total items in the cart
j = j+item.Quantity; // total items Quantity in the cart
}
}
}
MessageItem.Text = Convert.ToString(i);
MessageQuantity.Text = Convert.ToString(j);
}
System.Int32 j;
System.Int32 j;
protected void Page_Load(object sender, EventArgs e)
{
GetBasketItems();
}
private void GetBasketItems()
{
Basket basket = Token.Instance.User.Basket;
//WE WANT TO RESET THE GIFT OPTIONS AT THIS STAGE
basket.Package(true);
foreach (BasketItem item in basket.Items)
{
if (item != null)
{
Product product = item.Product;
if (product != null)
{
i++; // total items in the cart
j = j+item.Quantity; // total items Quantity in the cart
}
}
}
MessageItem.Text = Convert.ToString(i);
MessageQuantity.Text = Convert.ToString(j);
}
Vijendra Singh Shakya