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 04-21-2008 09:37:30

paisleymrs
Member
Registered: 01-31-2008
Posts: 18

Custom Shipping?

Hi
I tried a bunch of different scripts to get the shipping correct... and it kept coming out to .95?
My client has 1 major item and the same refurbished item.
The main item ships flat rate $19.95 each -the refurb ships flat rate $25.00 each.

I fixed the refurbished shipping rate no problem? I copied and pasted that exact code and changed the rate and nothing? It kept coming up .95 HUH?


So I looked her and found this script...
NOW its $15.00 total? Please advise. I don't get the code thing... I really try. Thanks in advance.




#########
######### This script bases price on the quantity of
######### items.  There is a charge per item.
#########
######### 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.
#########

my $ship_meth_name = "Standard Carrier";
my $price_per_item = "19.95";
my $ship_total = "0.00";
my $ship_display = "";
my $ship_meth_name1 = "Standard Carrier";
my $price_per_item1 = "25.00";
my $ship_total1 = "0.00";
my $ship_display1 = "";


#########
######### Figure out what the shipping charge will be by
######### multiplying the quantity by the price per item.
#########

if ($fd_trackitem_  eq "CTA-08") {

  $ship_meth_name = "Standard Carrier";
  $ship_total = (19.95 * ($item_quantity-1));


if ($fd_trackitem_  eq "CTA-08R") {

  $ship_meth_name1 = "Standard Carrier";
  $ship_total1 = (25.00 * ($item_quantity-1));

} ## end of if

$ship_total = ($price_per_item * $item_quantity);

#########
######### Format the $ship_total as a price.
#########

$ship_total = sprintf("%.2f", $ship_total);
$ship_total1 = sprintf("%.2f", $ship_total1);

#########
######### Create the display based on the price.
#########

if ($ship_total > "0") {

$ship_display = "$ship_meth_name - $currency_symbol$ship_total";
$ship_display1 = "$ship_meth_name1 - $currency_symbol$ship_total1";

} else {

$ship_display = "$ship_meth_name - Standard Carrier";

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

#########
######### Return the HTML in the variable
######### $custom_code_result.
#########

$custom_code_result = "";

$custom_code_result .= <<ENDOFTEXT;

<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<BR></FONT>
<INPUT TYPE="RADIO" NAME="shipinfo-$shipid" VALUE="$ship_meth_name1:$ship_total1"> <FONT FACE="$html_base_font_face" SIZE="$html_base_font_size" COLOR="$html_base_font_color"> $ship_display1<BR></FONT>


ENDOFTEXT

Offline

 

#2 04-21-2008 09:46:06

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Custom Shipping?

If you just have two products, each with a flat shipping rate, it would be much easier to just use product based shipping.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#3 04-21-2008 11:57:00

paisleymrs
Member
Registered: 01-31-2008
Posts: 18

Re: Custom Shipping?

HI
Now its stuck on $15.00 ... where that came from , I do not know.

This is what I have for the Refurbished unit... it works just fine... I copied and pasted and changed the cost to $19.95 and $15.00 or .95 cents comes up???
Even if I choose Product based shipping or Custom Shipping...

I also tried copying... Calculation On Total Item Quantity ...
Still nothing correct? I don't get it. I'm sorry.


#########
######### This script bases price on the quantity of
######### items.  There is a charge per item.
#########
######### 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.
#########

my $ship_meth_name = "Standard";
my $price_per_item = "25.00";
my $ship_total = "0.00";
my $ship_display = "";


#########
######### Figure out what the shipping charge will be by
######### multiplying the total quantity by the price per
######### item.

$ship_total = ($price_per_item * $item_quantity);

#########
######### Format the $ship_total as a price.
#########

$ship_total = sprintf("%.2f", $ship_total);

#########
######### Create the display based on the price.
#########

if ($ship_total > "0") {

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

} else {

$ship_display = "$ship_meth_name - $25.00";

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

#########
######### Return the HTML in the variable
######### $custom_code_result.
#########

$custom_code_result = "";

$custom_code_result .= <<ENDOFTEXT;

<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<BR></FONT>

ENDOFTEXT

Offline

 

#4 04-21-2008 14:35:50

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Custom Shipping?

Go into the product setup page for each product.  Change the 'Delivery Method' from Custom Shipping to Product Based Shipping.  A bit further down, find the fields 'Product Based - Method 1 Name' and 'Product Based - Method 1 Price'.  Fill those in with the appropriate information for your needs.  Repeat for both products.  Done.  No custom shipping script or coding required.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#5 04-22-2008 08:15:45

paisleymrs
Member
Registered: 01-31-2008
Posts: 18

Re: Custom Shipping?

After messing with it awhile it finally worked...
Thank you

One more ?

How do you access the "html" files such as, the background images, the menus, etc. on the template pages...
For instance when you go to the check out page, or cart and check the sources, it says, wwwo2innovations.com/cgi-bin/cp-app.cgi?pg=cart OR xxx -ste_chkout_proc&secure=Y  How do you access those pages on the FTP site to alter the menus and background images? I cannot find them in the admin section and I do not know what some of the code means?
Am I making any sense?
Thank you again.

Offline

 

#6 04-22-2008 08:22:02

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Custom Shipping?

You're welcome.  Those pages are all dynamically generated by the PERL script - there is no single file for each page to access via FTP.  You can style various components of them in the admin section HTML Pages & Elements.  You might want to read up in the Version 5.1 - Skinning & Design forum to learn more about it.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

Board footer