Re: Anyone used Luke Welling & Laura Thompsons shopping cart?

From: Date: Sun, 27 Oct 2002 13:13:03 +0000
Subject: Re: Anyone used Luke Welling & Laura Thompsons shopping cart?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121591@lists.php.net to get a copy of this message
Hello, What is your PHP version? Perhaps, the problem has something to do with "register_globals"? What exactly is the problem you're having? Any error messages? - E PS. The book is really great--it's part of my library :) "Steve Jackson" <steve@webpage.co.uk> wrote: > I am developing a shopping cart based on the above authors shopping cart fom > their book. (Book is a must by the way). I am still pretty new to PHP and > MySQL and need some help with the cart. Basically I need to add a form to > adjust the quantity in the cart instead of just incrementing by one and then > allowing the user to change the amount when she gets there. I have tried > unsuccessfully for the last three days to do this. > > the code that increments the cart is this but if anyone has used the > shopping module and knows how to adjust the code to add this fairly simple > procedure I'd appreciate it. > > if($new) > { > //new item selected > if(!session_is_registered("cart")) > { > $cart = array(); > session_register("cart"); > $items = 0; > session_register("items"); > $total_price = "0.00"; > session_register("total_price"); > } > if($cart[$new]) > $cart[$new]++; > else > $cart[$new] = 1; > $total_price = calculate_price($cart); > $items = calculate_items($cart); > > } >

« previous php.general (#121591) next »