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.
Hi,
Ive been looking over the forum to find a shipping method and dont seem to be able to get started.
All i need is two options for the customers:
2-5 Days = Free
Next Day = £5
For UK orders.
I dont ship to any other country as of yet.
Is there any chance someone could help me out? or point me in a direction where i can learn how to make one?
Enox
Offline
There are no extra details required, no weight / length parameters, no surcharges just two simple methods.
unfortunately not simple enough for me to get right. ><
Offline
In it''s simplest form:
<?php $custom = array('2-5 Days' => '0.00', 'Next Day' => '5.00'); $this->globals('ecom.customship_response',$custom); ?>
or for country only
<?php $info = $this->globals('ecom.customship'); if ($info['country'] == 'United Kingdom') { $custom = array('2-5 Day s' => '0.00', 'Next Day' => '5.00'); } // end of if statement. $this->globals('ecom.customship_response',$custom); ?>
But the last example holds no action for an order that doesn't match the country so it will only produce a shipping error (since no shipping amount or method is created) at which time the default rate will be pulled. No matter what you put in a custom shipping script it will not void or stop an order, it either creates the shipping amounts or pulls the default shipping amount on an error.
John
Offline
Hi John.
Sincere thanks!
Offline
Hi
Can I adapt this to provide additional shipping options for my UK customers:
Current shipping method code:
if (($info['country'] == 'UK - England & Wales')||($info['country'] == 'UK - Scotland Mainland')){
$method = 'UK Standard Delivery';
if ($info['total'] > '0' && $info['total'] <= '9.99') {
$custom = array($method => '3.95');
} elseif ($info['total'] > '9.99' && $info['total'] <= '39.99') {
$custom = array($method => '6.95');
} elseif ($info['total'] > '39.99') {
$custom = array($method => '3.95');
} else {
$custom = array($method => '0.00');
}
}
If I understand correctly, all I need to do is add the options into the array:
e.g.:
if ($info['total'] > '0' && $info['total'] <= '9.99') {
$custom = array($method => '3.95','Delivery before 10am' => '8.95', 'Delivery before 12pm' => '6.95');
...etc. etc.
Am I right?
Regards
Julian
Offline