X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Number of products in cart (https://forum.x-cart.com/showthread.php?t=16619)

jordan.snyder 09-15-2005 12:50 PM

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.

balinor 10-11-2005 03:32 AM

Not quite sure what you mean....the cart already calculates the number of items in the cart in the mini-cart?


All times are GMT -8. The time now is 12:59 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.