1 Attachment(s)
Re: FedEx Shipping using REST API
Saturday shipping does work, it was just hard to see because it wasn't specifically called out. I have updated Github to show when a method is priced for Saturday delivery.
Attachment 20342
Re: FedEx Shipping using REST API
Quote:
Originally Posted by
njcyx
Thanks. Take time.
I'm not sure if there is a way to test this feature other than Thursday and Friday...
look at this line:
https://github.com/scottcwilson/zenc...xrest.php#L402
this is where the ship date gets set for rates.
if you want to test for saturday delivery, before this line:
https://github.com/scottcwilson/zenc...xrest.php#L375
you can add:
PHP Code:
$shipDate = new DateTime();
// choose one of the following. only use 1, else you will get 2 weeks out for a date. which should still work...
$shipDate->modify('next friday');
$shipDate->modify('next thursday');
then change line 402 to
PHP Code:
'shipDateStamp' => $shipDate->('Y-m-d'),
best.
2 Attachment(s)
Re: FedEx Shipping using REST API
Quote:
Originally Posted by
swguy
Saturday shipping does work, it was just hard to see because it wasn't specifically called out. I have updated Github to show when a method is priced for Saturday delivery.
Attachment 20342
Hi @swguy, thanks. I have a new finding here.
Attachment 20343
Attachment 20344
If I set "Show Estimated Transit Time" to false, there is no Saturday delivery option. But if I set it to true, I can get the similar quote as your screenshot (Saturday options show up properly).
Re: FedEx Shipping using REST API
Quote:
Originally Posted by
carlwhat
look at this line:
https://github.com/scottcwilson/zenc...xrest.php#L402
this is where the ship date gets set for rates.
if you want to test for saturday delivery, before this line:
https://github.com/scottcwilson/zenc...xrest.php#L375
you can add:
PHP Code:
$shipDate = new DateTime();
// choose one of the following. only use 1, else you will get 2 weeks out for a date. which should still work...
$shipDate->modify('next friday');
$shipDate->modify('next thursday');
then change line 402 to
PHP Code:
'shipDateStamp' => $shipDate->('Y-m-d'),
best.
That is so smart! Thanks!
Re: FedEx Shipping using REST API
Yep, that seems to be how it works.
Re: FedEx Shipping using REST API
Quote:
Originally Posted by
swguy
Saturday shipping does work, it was just hard to see because it wasn't specifically called out. I have updated Github to show when a method is priced for Saturday delivery.
Attachment 20342
My 2nd thought. This screenshot looks strange. Only two Saturday delivery options and ground show the estimate delivery date. All the other options (such as 2day, saver, regular overnight) don't show the estimate delivery date.
Re: FedEx Shipping using REST API
Please look at the configuration description for this option:
Show Estimated Transit Time
Display the transit time for ground methods?
Re: FedEx Shipping using REST API
Quote:
Originally Posted by
swguy
Please look at the configuration description for this option:
Show Estimated Transit Time
Display the transit time for ground methods?
I see. Thanks for pointing me out. I haven't paid attention to the 2nd line under this option...
So if this option is set to true, transit time for ground and Saturday delivery options are all displayed.
If this option is set to false, transit time for ground and Saturday delivery options are all hidden.
It might be better to split this option into two options instead?
Re: FedEx Shipping using REST API
Quote:
Originally Posted by
njcyx
That is so smart! Thanks!
Hi @carlwhat, I just tested your suggested code. Unfortunately, I received the following error:
PHP Parse error: syntax error, unexpected '(', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
I did some study and test. If I changed the last line as your suggested into:
'shipDateStamp' => $shipDate->format('Y-m-d'),
Then it works.
Re: FedEx Shipping using REST API
Quote:
Originally Posted by
njcyx
Hi @carlwhat, I just tested your suggested code. Unfortunately, I received the following error:
PHP Parse error: syntax error, unexpected '(', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
I did some study and test. If I changed the last line as your suggested into:
'shipDateStamp' => $shipDate->format('Y-m-d'),
Then it works.
sorry about that. but yes that is the way to do it. not sure how i screwed that up. but glad you got that working.