You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
I need some help to convert this to use in php ccp6.
Where can i find information to do this correct.
Thanks
#########
######### This script bases price on the cart weight.
######### There is a charge per pound.
#########
######### A listing of available variables:
#########
######### $ship_items_found Count Of shippable items
#########
######### $ship_methods_found Count of items with a
######### shipping method already
#########
######### $cart_items_found Count of rows in the cart
#########
######### $cart_quantity_found Total quantity of items
######### in the cart
#########
######### $tracking_subtotal Subtotal of the prices for
######### all items in the cart
#########
######### $cart_total_weight Total weight of all items
######### in the cart in pounds.
#########
#########
######### $trackitem_shipcountry Delivery Country
#########
#########
#########
######### Directly below, enter in the name for this
######### method to be displayed to the user.
#########
###
my $ship_meth_name = "Standard Carrier2";
my $ship_display = "";
my $ship_total = "0.00";
if ($fd_trackitem_shipcountry eq "") {
$fd_trackitem_shipcountry = "$fd_tracking_country";
} else {
$fd_trackitem_shipcountry = "$fd_trackitem_shipcountry";
}
###
### Make a weight a whole decimal.
### If weight is greater than 10, reduce to 10.
### Get array numeric.
###
$cart_total_weight = sprintf("%.0f", $cart_total_weight);
if ($cart_total_weight > "11") {$cart_total_weight = "11";}
$costnum = ($cart_total_weight - 1);
if ($costnum <= "0") {$costnum = "0";}
###
### Shipping cost - Belgium
###
if ($fd_trackitem_shipcountry eq "Belgium") {
@cost = ("12.00","13.00","14.00","15.00","16.00","20.00","21.00","2223.00","24.00","25.00","26.00");
$ship_total = $cost[$costnum];
###
### Shipping cost - Austria
###
} elsif ($fd_trackitem_shipcountry eq "Austria") {
@cost = ("26.50","27.00","35.00","40.50","45.00","50.50","55.00","60.00","70.50","75.50","80.00");
$ship_total = $cost[$costnum];
###
### Shipping cost - United Kingdom
###
} elsif ($fd_trackitem_shipcountry eq "United Kingdom") {
@cost = ("26.50","27.00","35.00","40.50","45.00","50.50","55.00","60.00","70.50","75.50","80.00");
$ship_total = $cost[$costnum];
###
### Shipping cost - Ierland
###
} elsif ($fd_trackitem_shipcountry eq "Ireland") {
@cost = ("26.50","27.00","35.00","40.50","45.00","50.50","55.00","60.00","70.50","75.50","80.00");
$ship_total = $cost[$costnum];
### Shipping cost - Other
###
} else {
@cost = ("50.00","55.00","60.00","65.00","70.00","75.00","80.00","85.00","90.00","95.00","100.00");
$ship_total = $cost[$costnum];
} ######## End of if statement.
###
### Figure out the ship display variable.
###
$ship_display = "$ship_meth_name \- $currency_symbol$ship_total";
###
### Print HTML
###
print <<ENDOFTEXT;
<CENTER>
<TABLE WIDTH="100\%" CELLPADDING="10" CELLSPACING="3">
<TR BGCOLOR="$html_pri_tablerow_color">
<TD VALIGN="TOP"><FONT FACE="$html_small_font_face" SIZE="$html_small_font_size" COLOR="$html_small_font_color"><B>Shipping Cost</B> <FONT COLOR="$html_notnull_font_color"><B>$html_notnull_character</B></FONT><BR><BR></FONT>
<INPUT TYPE="RADIO" NAME="shipinfo" VALUE="$ship_meth_name\:$ship_total" CHECKED> <FONT FACE="$html_base_font_face" SIZE="$html_base_font_size" COLOR="$html_base_font_color">
$ship_display
</FONT></TD>
</TR>
</TABLE>
</CENTER>
<BR>
ENDOFTEXT
###
Last edited by fdr100 (04-17-2007 14:06:29)
Offline