Kryptronic Software Support Forum

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.

#1 01-19-2007 22:40:30

keyman
Member
From: Pacific Grove, California
Registered: 08-26-2003
Posts: 45
Website

Where do I order a convert custom shipping script convert ?

Where do I get a quote to convert this to php From (CCP5 to CCP6)?
The only thing that I need different on the script is U.S. orders under $10.00 free shipping.

#########
######### Custom scripts may apply to a whole
######### order if all of the items ordered
######### use the same shipping method (Custom)
######### and the same script selection.  Scripts
######### are built to handle a group of like
######### items.
#########
######### A listing of available variables:
#########
######### $item_quantity      Total quantity of items
######### $item_subtotal      Subtotal for all items
######### $item_total_weight  Total weight of all items
#########
######### Directly below, enter in the name for this
######### method to be displayed to the user.
#########

$custom_code_result = "";


$ship_meth_name = "Priority Post";


if ($fd_trackitem_shipcountry eq "$name_us") {


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

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

} elsif ($item_subtotal > "25.01" && $item_subtotal <= "99.99") {

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

} else {

$ship_total = "0.00";
$ship_display = "$ship_meth_name - FREE";

} ######### End of if statement.

} else {


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

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

} elsif ($item_subtotal > "25.01" && $item_subtotal <= "99.99") {

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

} else {

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

} ######### End of if statement.

} ######### End of if statement.


$custom_code_result .= <<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 Method</B> <FONT COLOR="$html_notnull_font_color"><B>$html_notnull_character</B></FONT><BR><BR></FONT>

<INPUT TYPE="RADIO" NAME="shipinfo-$shipid" 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

Offline

 

#2 01-21-2007 11:09:47

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Where do I order a convert custom shipping script convert ?

Here you are.  You can see with the new PHP code things are a lot simpler:

Code:

<?php 

$info                   = $this->globals('ecom.customship');
$item_subtotal          = $info['total'];
$country                = $info['country'];

$ship_meth_name         = 'Priority Post';
$ship_total             = 0.00;

if ($country == 'United States') {

     if ($item_subtotal >= 10.01 && $item_total_weight <= 25) {

          $ship_total = 5.00;

     } elseif ($item_subtotal > 25.01 && $item_subtotal <= 99.99) {

          $ship_total = 6.00;

     } // End of if statement.

} else {

     if ($item_subtotal >= 0 && $item_total_weight <= 25) {

          $ship_total = 20.00;

     } elseif ($item_subtotal > 25.01 && $item_subtotal <= 99.99) {

          $ship_total = 25.00;

     } else {

          $ship_total = 35.00;

     } // End of if statement.

} // End of if statement.

$custom = array($ship_meth_name => $ship_total);

$this->globals('ecom.customship_response',$custom);

?>

Nick Hendler

Offline

 

Board footer