Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with content total in shopping cart box


outdoorxtreme1

Recommended Posts

I added the following cod to my shopping cart box and I am having some problems.

 

<?php echo '<a href ="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . HEADER_TITLE_CART_CONTENTS .'</a><br>Items: ' . $cart->count_contents() . ' Total: ' . $currencies->format($cart->show_total());?>

 

Before being logged in as a customer and I add items to my cart the content total is correct. Once I log on as a customer, the content total is always 1 more than the total I have in my cart. Example: If I have 6 items, not logged in as a customer, it shows 6. Once I log in, it shows 7.

 

Any idea why this is happening or what I need to look at to fix this problem.

 

Any help would greatly be appreciated.

 

Thank you.

Link to comment
Share on other sites

This can happen if you have one item in your cart when logged in and then add 6 items after logging out. When you log back in the two carts are combined. Look at the shopping cart page and check the count.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...