multiple quantity's does not count exact weight ??? please helpgreenspun.com : LUSENET : S-Mart Shopping Cart : One Thread |
Hi,I would like to use the shipping by weight feature, but when i test it and order multiple quantity's of a product it only counts the weight of 1 product... How can I correct this?
I tryed changing the script: elsif ($shipping eq '3') { my($low,@weights,$weight); @weights = sort number keys %shipping; $low = $weights[0]; HERE ADDING *$itemquant foreach $weight (@weights) { if ($weight > $low && $weight <= $totalweight) {$low = $weight}; } $shipamt = $shipping{$low}; $totalprice += $shipamt; print "
\BF $shipamt \n"; }%But that does not do the trick like it suppose to do... it calculates the shipping correctly sometimes... depending on the quantity...
I hope somebody is willing to share the sollution with me...
Regards, Gerry
-- gerry u (gerryu@hotmail.com), November 28, 1999