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 06-16-2015 10:27:15

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Custom Shipping By Price

Hello:

Are there sample codes on how to setup custom shipping by price?

For an example:

$1.00-$20.00 shipping is $5.00
$20.01-$40.00 shipping is $10.00

Thanks for any help.

Offline

 

#2 06-16-2015 15:05:55

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

Re: Custom Shipping By Price

Look at the canned scripts in admin.  There's one in there that does this:

Code:

<?php 

$info = $this->globals('ecom.customship');

$method = 'Standard Carrier';

if ($info['total'] >= '0' && $info['total'] <= '9.99') {

     $custom = array($method => '2.50');

} elseif ($info['total'] > '9.99' && $info['total'] <= '15.99') {

     $custom = array($method => '3.95');

} elseif ($info['total'] > '15.99' && $info['total'] <= '49.99') {

     $custom = array($method => '5.00');

} else {

     $custom = array($method => '0.00');

} // End of if statement.

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

?>

Just modify the values as needed.


Nick Hendler

Offline

 

#3 06-17-2015 09:51:10

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Custom Shipping By Price

I'm sure this may be a silly question, but once I create my script how do I activate it to be the main shipping method? Thanks.

Offline

 

#4 06-17-2015 10:07:31

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Custom Shipping By Price

For each product, go into Delivery and change Delivery Method to Custom Shipping Method & Custom Shipping: Method to whatever you have called the shipping file ( I use the 'Calculation of shipping total' - I've changed the values to suit my couriers pricing).

Terry

Offline

 

#5 06-17-2015 10:13:37

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Custom Shipping By Price

Thanks tguswell. It all makes sense now smile

Offline

 

Board footer