### calculate shipping by price

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

Can anyone tell me how to calculate the shipping costs by using the full price (total price)... for some reason it always shows the same shipping price

-- Andre Heuzer (info@imc1492.com), June 07, 1999

Hi,

First thing is to check you "s-mart.cfg" file to set the shipping options.

####################### # Shipping #######################

# 0 = No shipping # 1 = Shipping by number of items # 2 = Non-variable shipping # 3 = Shipping by weight # 4 = Shipping by price

\$shipping = "4";

If you want to calculate shipping by total price set "\$shipping = "4";"

Then you have to set the amount to what you charge for shipping. Change the numbers by what you charge. Use the example below the same one is in the "s-mart.cfg" file. It reads from \$1.00 to \$25.00 charge \$7.95 from \$25.00 to \$50.00 charge \$9.95. and so on.

# For shipping by price: # (price,shipping,price,shipping,etc) if (\$shipping eq '4') { %shipping = ('1.00','7.95','25.00','9.95','50.00','11.95','75.00','13.95','100.00' ,'15.95','200.00','17.95'); }

Just follow the example in the "s-mart.cfg" file and change the settigs to what you need.

Jim

-- James L. Farmer (jim@team-blankets.com), June 07, 1999.