Shipping by itam ! : LUSENET : S-Mart Shopping Cart : One Thread

Hi :-)

I have the scrip up and running but the shipping by itam is a problam :-( the shipping cost of the items show on the screen as OK and the shipping cal OK but the e-mail locks on to the shipping for one itam ?? can anyone help

also is there a siplary way to add into the cfg file when the shipping need to be 1- 4.00, 2 - 1.50 each, 3 0r more 1.00 or do you have to do this longhand ???

-- Andrew J Bruce (, February 07, 1998


Answerd some of this myself ???? but still would like to know if there is a sorter way to put the shipping info in


Problem with the shipping by item not being the same in the e-mail but OK on the HTML

I have struggled with the shipping by item for a few hours :-( and too a look in the cgi !!! As I am new to cgi and programing it took me a little longer than it should but I learnt a lot and corrected the problem ! (I hope)

Hope you understand - but I am sure you will

If you look at the cgi and the mail part you will see this part

print MAIL "----------------------------------------------------------------------\n"; print MAIL "Subtotal:"; if (index($totalprice,".") >= 0) { ($left,$right) = split(/\./,$totalprice); if (length($right) == 0) { $totalprice = $totalprice . "00"; } elsif (length($right) == 1) { $totalprice = $totalprice . "0"; } } else { $totalprice = $totalprice . ".00"; } print MAIL sprintf "%57.57s", "\$$totalprice\n";

if ($shipping eq '0') { # Print Nothing } elsif ($shipping eq '1') { my($low,@prices,$price); @prices = sort number keys %shipping; $low = $prices[0]; foreach $price (@prices) { if (($price > $low) && ($price <= $totalquant)) {$low = $price};

NOTE the last line

if (($price > $low) && ($price <= $totalquant)) {$low = $price};

This is my modification in the script the > are the wrong way around - I change this twice once on the mail to the client and one for the recite

Hope this is of help - thanks for a brilliant script


-- Andrew J Bruce (, February 07, 1998.

Moderation questions? read the FAQ