RonSpooner
Newbie
Joined: 19 Oct 2004
Posts: 4
|
 Re: RE: Shipping based on STATE
[quote="Dan"]hell-o
hmmm. is there a question in there or did you resolve it?
some stuff...
custom shipping logic is usually added and displayed thoughout the session where realtime api stuff is dependant on zip code which isn't a known factor until step two of checkout.
<snip>
Thanks, my problem is solved now. The problem was how to get the shipping to update when the postcode is entered at step two.
I only ship to Australia and I wanted to give my customers the absolute best freight deal and to do this I needed to ship by state.
I put this into the shipping logic and it worked. I'm new here and this may not be a good solution but my shipping is exactly how I want it.
#less than .5kg FREE Shipping
#basic shipping cost (eg: between .6 and 20 kg $5.45) ...
@sc_shipping_logic = ( "|||0-.5|0.0",
"|||.6-20.0|5.45",
"|||20.1-40.0|10.90",
"|||40.1-60.0|16.35",
"|||60.1-80.0|21.80",
"|||80.1-100.0|27.30",
"|||100.1-120.0|32.75",
"|||120.1-140.0|38.20");
#Shipping to NSW so add an additional 50cents per kg and $1.65 surcharge
if (($form_data{'Ecom_ShipTo_Postal_StateProv'}
) eq ("NSW")) {
$nsw=($total_measured_quantity*.5)+1.65;
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity)+$nsw;
}
if (($form_data{'Ecom_ShipTo_Postal_StateProv'}
) eq ("WA")) {
<snip more states>
Cheers
Ron
|