Jump to content

USPS question


janway

Recommended Posts

I have searched but cannot find it. Where would I find the lines to change to have USPS standard post show up as different wording? I found and changed fedex's already but cant find this one. I did see some interesting comments about USPS

Link to comment
Share on other sites

The USPS API returns to the calling function the names of all the Services available based on the info submitted in the Rate Request.

 

These USPS Official Service Names are used (with very minor correction) in the list that is displayed to the customer as shipping options.

 

Changing the language file will result in changing what you see listed in the admin screen where you enable/disable the desired methods of shipping.

 

To change what gets displayed to the customer would require a bit of editing to the shipping class -- replacing the returned Official Service Names with custom phrases based on the CLASSID of the service.

Link to comment
Share on other sites

Will editing the CLASSID allow one to remove the "2 Day" type wording on Priority?

 

Since they started that wording, we've had customers from the other side of the country writing 2 days after ordering - wanting a Priority refund because it hadn't arrived.

 

If so, which file needs changing?

Link to comment
Share on other sites

With a bit of coding, I'm sure it would.

 

But this begs the question, if the USPS has given a rate for Priority-2Day, are you actually telling the USPS counter person to send it out as Priority-2Day?

 

I would also look at the admin panel for USPS and disable the Priority-2Day option -- if it's there. If not, the module should be queued for an update.

Link to comment
Share on other sites

Looking at the CLASSID values (dated July 2013), the response will include the phrase "1-Day", "2-Day", "3-Day", "Military", or "DPO" depending on the calculator's best guess at the average in-transit times based on the pickup and delivery post codes. The USPS also states there is no commitment to these in-transit times, other than Priority Mail Express.

 

So, there is probably nothing to update, and finding and killing those phrases should be easy. The code to add would be added near line 160 in shipping.class.php.

 

Try:

$mail_service = str_replace(array("1-Day", "2-Day", "3-Day", "Military", "DPO"),'',$mail_service);
$package[] = array(
  'id' => (string)$option['CLASSID'],
  'name' => $mail_service,

 

Link to comment
Share on other sites

Unintended consequence - the View Basket button disappeared from the little basket after clicking icon. Changed to Blueprint skin and tried to view basket from there. Successfully clicked button, but CC than crashed.

 

Commented out the fix above, and everything back to normal.

Link to comment
Share on other sites

CC crashed? Maybe PHP complained? Any error logged in error_log file?

 

And maybe my instructions were different than how I normally give, in that line 160 is the only new line, while what follows after that new line is existing code shown for context.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...