Page 1 of 1
calculating frieght
Posted: Sat Oct 09, 2004 8:15 pm
by C_Calav
hey guys,
i was wondering if someone could point me in the right direction of the best way to calculate frieght on a shopping cart.
what are the methods people use or anything anyones know abot this would be very helpfull.
thanx!
Posted: Sat Oct 09, 2004 8:17 pm
by feyd
I believe the major shippers (UPS, FedEx, DHL, etc) all have API's for calculating their shipping charges.
I know you could technically use their websites to calculate it, however, you will require permission to do so (at the least)
Posted: Sat Oct 09, 2004 8:24 pm
by C_Calav
thanx feyd, so is that what most people do? any other ways of calculating frieght you know? i guess just writing code for it would be one way?
Posted: Sat Oct 09, 2004 8:40 pm
by nigma
I think i've seen a script on zend that can be used to do this, give me a few minutes to find it and i'll post a link.
edit: the zend site seems to be going quite slow so it may take a while for me to find it.
Posted: Sat Oct 09, 2004 9:20 pm
by C_Calav
thanx nigma! that would be great!
Posted: Sat Oct 09, 2004 9:31 pm
by feyd
Posted: Sat Oct 09, 2004 9:34 pm
by C_Calav
cheers feyd!
Posted: Sat Oct 09, 2004 10:46 pm
by nigma
hmmm... zend is still going pretty slow for me. Did you actually visit there site to get that or did you just use the links on google?
Posted: Sat Oct 09, 2004 10:56 pm
by C_Calav
i used the links cant access anything
Posted: Sat Oct 09, 2004 10:58 pm
by nigma
Check back tomorrow or later tonight.
Posted: Sat Oct 09, 2004 11:14 pm
by feyd
I used the google cache
here's how I got the pages:
did the google search above.
clicked "cached" in their entry.
clicked "cached text" in the cache page.
er, clicked.

Posted: Sat Oct 09, 2004 11:44 pm
by nigma
wow, woopdefreakin' doo!

Posted: Sun Oct 10, 2004 12:11 am
by C_Calav
im getting a phase error unexpected t string
is this vaild code? is equals to etc...?
Code: Select all
<?php
if ($C_Freight == North Island New Zealand)
{
$shipping = 10;
}
if ($C_Freight == South Island New Zealand)
{
$shipping = 20;
}
else
{
$shipping = 30;
}
?>
Posted: Sun Oct 10, 2004 12:18 am
by feyd
quote your strings!

Posted: Sun Oct 10, 2004 2:58 am
by mudkicker
and even to optimize use * switch() * for it
