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.
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
Look at the canned scripts in admin. There's one in there that does this:
<?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.
Offline
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
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
Thanks tguswell. It all makes sense now
Offline