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.
In my ongoing problemfest with Fedex, we find that purchases made on Saturdays have MUCH higher prices returned by Fedex than on other days. A Fedex rep believes that this is because we must be specifying Saturday as a pickup day.
Is there any way to specify the next weekday, or simply not specify a day?
Offline
I ran into this before. By default, CCP does not specify a day. And in the absence of a specified day, the FedEx API assumes the same day as the quote. To change this behavior, you'll need to edit ste_ship.pl. For instructions about editing PERL files, search previous posts on the forum. Make a backup first, and if you aren't sure about what you're doing, consider professional assistance (Stephen at cartmod.com). To proceed, locate the following code (around line 1365 or thereabouts):
$rescom = ste_ship_encodetxt($rescom); $packaging_type = ste_ship_encodetxt($packaging_type); $weight = ste_ship_encodetxt($weight); $drop_off_type = ste_ship_encodetxt($drop_off_type);
Right the above, insert the following code block:
################################################ ### Mod for Sending Ship Date On Next Weekday my $epoch = time(); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime($epoch); if ($wday eq 5) { $epoch += 259200; } elsif ($wday eq 6) { $epoch += 172800; } else { $epoch += 86400; } ## endif ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime($epoch); $year += 1900; $mon ++; $mday = sprintf("%02d",$mday); $mon = sprintf("%02d",$mon); my $ship_date = "$year$mon$mday"; $ship_date = ste_ship_encodetxt($ship_date); ##################################################
Then, locate this code (around line 1479 or thereabouts):
$request_string .= "1401,\"$weight\""; $request_string .= "1333,\"$drop_off_type\"";
Right the above, insert this code block:
#################################################### ####### Append Ship Date Field to Request ######## $request_string .= "24,\"$ship_date\""; ####################################################
That will append a ship date field to the request so that the FedEx API will not assume the current day. Right now, it should be set up to use the next week day, but you can easily modify the times above (they're in seconds) to put it as far in the future as you'd like (I used to keep it set to one week in the future when I was using FedEx). I haven't used FedEx in a while, but that was working last I checked. Of course, use at your own risk and if it doesn't work, revert to your backup. Good luck!
Offline
Well, technically I'm Da BatGirl But I take your meaning, and thank you. I'm glad it worked for you!
Offline
Whew, I was a bit worried there for a moment
Offline
Me too! LOL!
Offline
And all this time I thought he was left handed
Offline