Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Number of products in cart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-15-2005, 12:50 PM
 
jordan.snyder jordan.snyder is offline
 

Newbie
  
Join Date: Aug 2005
Posts: 1
 

Default Number of products in cart

Hello,

I have just done some extensive customization of XCart, and I built in a simple PHP bit to get the number of products in the shopping cart, by simply counting the number of items in the $cart["products"] array. This works most of the time, but a problem occurs when a user first visits the cart. The count shows up as 1, when it is in fact the user's first visit to the cart. Once someone looks at their cart, the value is updated correctly, but not until then.

Is there a way for me to check for this bogus information? Another variable that is set elsewhere that might help me distinguish the true from the false? Any help would be greatly appreciated.
__________________
Cheers
Reply With Quote
  #2  
Old 10-11-2005, 03:32 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Not quite sure what you mean....the cart already calculates the number of items in the cart in the mini-cart?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:44 AM.

   

 
X-Cart forums © 2001-2020