[thelist] PHP Doubling up

Rich Gray richardgray at onetel.co.uk
Wed Aug 14 08:43:01 CDT 2002


Adding to your total s/b $total += ($cart[$item][qty] *
$cart[$item][unit_price]);

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Andrew Maynes
Sent: 14 August 2002 14:32
To: thelist at lists.evolt.org
Subject: RE: [thelist] PHP Doubling up


not a 100% which code it is! Without it all?  Here is the first bit, I
thought
it maybe something else!  Not sure whether it help but do you want to seee
the
site?



/* Lets get the total of products and the total cost */
function status($cart) {
	if($cart) {
		foreach ($cart as $item => $value) {
			$number += $cart[$item][qty];
			$total += $total + ($cart[$item][qty] * $cart[$item][unit_price]);
		}
		$total = correct($total);
		$return = "Your order contains <strong>".$number." </strong>";
        $return .= "items costing a total of
<strong>&pound;".$total."</strong>";
	}

	return($return);
}


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/02

--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list