Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / translating a perl shipping script to zencart?

translating a perl shipping script to zencart?

Locked

Views: 1,231

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
25 Feb 2010, 12:36 AM
#1
greytail avatar

greytail

New Zenner

Join Date:
Feb 2010
Posts:
15
Plugin Contributions:
0

translating a perl shipping script to zencart?

Can I get some help from you on this...

The following is a shipping script for this from Click Cart Pro. It is a perl script:

if ($item_subtotal >= "0" && $item_subtotal <= "30.00") {

$ship_total = "10.50";
$ship_display = "$ship_meth_name - $currency_symbol$ship_total";

} elsif ($item_subtotal > "30.00" && $item_subtotal <= "60.00") {

$ship_total = "15.50";
$ship_display = "$ship_meth_name - $currency_symbol$ship_total";

} elsif ($item_subtotal > "60.00" && $item_subtotal <= "90.00") {

$ship_total = "22.50";
$ship_display = "$ship_meth_name - $currency_symbol$ship_total";

} elsif ($item_subtotal > "90.00" && $item_subtotal <= "120.00") {

$ship_total = "33.75";
$ship_display = "$ship_meth_name - $currency_symbol$ship_total";

} elsif ($item_subtotal > "120.00" && $item_subtotal <= "150.00") {

$ship_total = "37.25";
$ship_display = "$ship_meth_name - $currency_symbol$ship_total";

} elsif ($item_subtotal > "150.00" && $item_subtotal <= "200.00") {

$ship_total = "40.00";
$ship_display = "$ship_meth_name - $currency_symbol$ship_total";

} else {

$ship_total = "0.00";
$ship_display = "Please contact us at $html_site_name for your shipping price.";

How do I apply this in ZenCart?

25 Feb 2010, 12:55 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,604
Plugin Contributions:
0

Re: translating a perl shipping script to zencart?

Use the built-in "Table Rate" Module.

25 Feb 2010, 1:22 PM
#3
greytail avatar

greytail

New Zenner

Join Date:
Feb 2010
Posts:
15
Plugin Contributions:
0

Re: translating a perl shipping script to zencart?

I looked at this but I still don't understand how to do it...please can I get a little more help >)

25 Feb 2010, 2:35 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: translating a perl shipping script to zencart?

Install the Table Rate table shipping module and set to use Price for the calculation ...

Then, set the rates to something along the lines of:

30.00:10.50, 60.00:15.50, 90.00:22.50, 120.00:33.75, 150.00:37.25, 200.00:40.00, 10000.00:0.00

The last rate, 10000.00:0.00 is not really needed, but it helps remind you why you are at $0.00 on orders over $200 ...