[PHP] Can anyone help please.

2002-10-27 Thread Steve Jackson
I have two test carts online at the moment.
This one works fine:
http://www.violasystems.com/shop/

this one is the one I want to get working
http://www.violasystems.com/shop_testing/

The code for the first shop basically increments the cart by one when the
submit button is added using the commented out code.

$qty = $formqty;
 if($cart[$new])
  //$cart[$new]++;
   $cart[$new] = $cart[$new] + $qty;
else
  $cart[$new] = 1;
$total_price = calculate_price($cart);
$items = calculate_items($cart);

I have added the rest (taking a variable from the form $formqty and adding
it to the cart)
Can anyone see why doesn't this work?



Re: [PHP] Can anyone help please.

2002-10-27 Thread Tom Rogers
Hi,

Monday, October 28, 2002, 1:44:37 AM, you wrote:
SJ I have two test carts online at the moment.
SJ This one works fine:
SJ http://www.violasystems.com/shop/

SJ this one is the one I want to get working
SJ http://www.violasystems.com/shop_testing/

SJ The code for the first shop basically increments the cart by one when the
SJ submit button is added using the commented out code.

SJ $qty = $formqty;
SJ  if($cart[$new])
SJ   //$cart[$new]++;
SJ$cart[$new] = $cart[$new] + $qty;
SJ else
SJ   $cart[$new] = 1;
SJ $total_price = calculate_price($cart);
SJ $items = calculate_items($cart);

SJ I have added the rest (taking a variable from the form $formqty and adding
SJ it to the cart)
SJ Can anyone see why doesn't this work?

You seem to have other problems than the code here ..

Warning: Invalid argument supplied for foreach() in 
/www/u1255/shop_testing/show_cart.php on line 30


-- 
regards,
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php