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 01-06-2025 03:14:49

antsevo
Member
From: Surrey, UK
Registered: 02-08-2005
Posts: 624
Website

Shipping Choices with estimated delivery date included in display

Not too sure how easy this is to do, but I would like customers to choose their postage options (2nd Class, 1st Class, Tracked 24, Special Delivery etc)

But after each of the options I would like the estimated date that the order would be received.

I understand that this may be a little tricky to do to take in account weekend and Bank Holidays etc..

But any pointers would be great


Anthony - Manufacturers of Personalised and Celebrity Face Masks

Offline

 

#2 01-06-2025 11:07:17

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

Re: Shipping Choices with estimated delivery date included in display

If you're using realtime shipping via FedEx or UPS, just turn delivery estimates on using settings:

Store / Component / Settings / UPS OnLine Tools Settings
Store / Component / Settings / FedEx Web Services Settings

If you're using some other method, the estimates could be added like with a custom shipping script.  How are you shipping now?


Nick Hendler

Offline

 

#3 01-06-2025 11:51:00

antsevo
Member
From: Surrey, UK
Registered: 02-08-2005
Posts: 624
Website

Re: Shipping Choices with estimated delivery date included in display

Thanks Nick.... makes sense...

Currently shipping via Royal Mail and use UPS only for foreign orders

All using Custom Shipping Script


Anthony - Manufacturers of Personalised and Celebrity Face Masks

Offline

 

#4 01-07-2025 10:21:20

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

Re: Shipping Choices with estimated delivery date included in display

Custom shipping script was the right answer.  Delivery estimates work based on a global array which you can create in your custom shipping script. 

First, turn delivery estimates on for UPS.  That will get those estimates right.  In your UPS script, after the call to the ecom.shiprealtime namespace where you get a result and loop through it, the 'delest' key for each returned rating will hold the delivery estimate.  You can simply append that to your custom shipping option name to display it.  If you use a space and wrap the estimate in parenthesis, it will be stripped where necessary when determining the shipping method name for items in the order.  Example:

Code:

// Ensure $custom, $delinfo and $info are defined properly...

$result = $this->include_namespace('ecom','shiprealtime',array('delinfo'  => $delinfo, 'packages' => $info['packages']));

if ((!($this->isError($result))) && (!(empty($result)))) {

     foreach ($result as $num => $service) {

          $custom[$service['name'] . ' (' . $service['delest'] . ')'] = $service['rate'];

     } // End of if statement.

} // End of foreach statement.

For your Royal Mail script, use similar logic.  You won't have a delivery estimate from Royal Mail, but you can figure one out based on delivery times and all you need to do is append that to the shipping method name(s) in your custom script as you see above.  Example:

Code:

$now    = $this->globals('core_datetime.epoch');
$custom = array();

$custom['Royal Mail One Day (' .  @date('D, M j',$now + 86400) . ')'] = 9.00;
$custom['Royal Mail OneTwo Day (' .  @date('D, M j',$now + 172800) . ')'] = 7.00;

I hope that helps.


Nick Hendler

Offline

 

#5 01-07-2025 12:24:49

antsevo
Member
From: Surrey, UK
Registered: 02-08-2005
Posts: 624
Website

Re: Shipping Choices with estimated delivery date included in display

Brilliant!!

Thanks for taking the time, again to do that.

I will implement this in the next day or two.


Anthony - Manufacturers of Personalised and Celebrity Face Masks

Offline

 

Board footer