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 10-13-2003 08:05:00

cybermed
Member
From: Burke Va - US
Registered: 09-06-2001
Posts: 54
Website

Custom Shipping

Nick, I got the upgrade and not sure how configure the "User Defined Calculation" is this the ome I use? How would I program this to achieve he following:

The first 2 items cost @ $4.95 to ship

1 additional item adds $2.00, 2 adds $4.00, 3 adds $6.00
and so on.

EX: 1 = $6.95, 2= $8.95, 3= $10.95 and so on

Also need to be able to offer "Express Mail" (next day)
option: 2 video games @ $15.95 I would like to have the option
for all items, but may not use.

What is the proper expression code to use? Thanks for your prompt attention!

Offline

 

#2 10-13-2003 08:34:13

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

Re: Custom Shipping



Also need to be able to offer "Express Mail" (next day)
option: 2 video games @ $15.95 I would like to have the option
for all items, but may not use.

In understand the first part, but am not sure what you mean by what I've quoted above.  How would the pricing on that level work?


Nick Hendler

Offline

 

#3 10-13-2003 18:40:22

cybermed
Member
From: Burke Va - US
Registered: 09-06-2001
Posts: 54
Website

Re: Custom Shipping

Let me see if I can make it clearer! smile

1) If you buy upto 2 items it cost $4.95 to ship
(The first 2 items cost @ $4.95 to ship)

3 Items will add $2.00 to the $4.95 to equal $6.95
4 Items will add $4.00 to the $4.95 to equal $8.95
5 Items will add $6.00 to the $4.95 to equal $10.95
6 Items will add $8.00 to the $4.95 to equal $12.95

snd so on.....

EX: 1 = $6.95, 2= $8.95, 3= $10.95 and so on

Hope this helps! smile

Offline

 

#4 10-14-2003 07:56:26

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

Re: Custom Shipping

I got the first part very clear, what I don't understand is how you're handling the video games.


Nick Hendler

Offline

 

#5 10-14-2003 20:00:10

cybermed
Member
From: Burke Va - US
Registered: 09-06-2001
Posts: 54
Website

Re: Custom Shipping

Nick,  Re the Video Games we can over-ride custom settings for each product correct? We will manually add these prices. Can you please just help us with the first part that you understand? smile  Evan

Offline

 

#6 10-15-2003 08:26:39

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

Re: Custom Shipping

Right.  So, for the script you need:

Code:


my $ship_meth_name = "Standard Carrier";
my $price_per_item_first = "4.95";
my $price_per_item_next = "2.00";

if ($item_quantity <= "2") {

$ship_total = "$price_per_items_first";

} else {

$item_quantity_calc = ($item_quantity - 2);
$ship_total = ($item_quantity_calc * $price_per_item_next);
$ship_total = ($ship_total + $price_per_item_first);

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

$ship_total = sprintf("%.2f", $ship_total);
$ship_display = "$ship_meth_name - $currency_symbol$ship_total";

$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


Nick Hendler

Offline

 

#7 10-19-2003 18:35:24

cybermed
Member
From: Burke Va - US
Registered: 09-06-2001
Posts: 54
Website

Re: Custom Shipping

Can the above code be also used for CCp5? We need to have this done for CCP5 until we complete the upgrade...

Offline

 

#8 10-20-2003 11:24:57

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

Re: Custom Shipping

No.  Custom shipping scripts in 5.0 are done differently (both variables and display output are different).


Nick Hendler

Offline

 

#9 10-21-2003 08:50:00

cybermed
Member
From: Burke Va - US
Registered: 09-06-2001
Posts: 54
Website

Re: Custom Shipping

Nick, I added the custom code above did a SQL Update to make ALL products for Custom Shipping. I did a few test buys and it worked yesterday but now it wont work. Alls I get in the Shipping price "Standard Carrier - $0.00" . There is NO price when its time to check out..  Can you please guide me as to what needs to be done or hwt I could have done wrong?  THANKS! smile Evan

Offline

 

#10 10-27-2003 10:16:05

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

Re: Custom Shipping

This was fixed via email.  The issue was the line:

Code:


$ship_total = "$price_per_items_first";

Which should have read:

Code:


$ship_total = "$price_per_item_first";


Nick Hendler

Offline

 

Board footer