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
|