Community Forums

Changes to USPS Service

Support for Shipping extensions

Changes to USPS Service

Postby NoJoke » Tue Jul 16, 2013 3:15 pm

As I have heard and read about, on the 28th of this month there are going to be some changes regarding USPS, is there anything that we have to change for that module on our sites so we can be sure that we are displaying the correct shipping options and prices? Or is that information pulled directly and will change on its own when those new services are implemented?

article to information about the changes on july 28th can be found here : https://liteblue.usps.gov/news/link/201 ... ws16s4.htm

Also
https://www.usps.com/business/web-tools ... elcome.htm
NoJoke
 
Posts: 382
Joined: Thu Oct 13, 2011 4:37 pm

Re: Changes to USPS Service

Postby rotaryracer » Sun Jul 28, 2013 6:23 am

Just did a test order on my cart and it looks like the new names with superscript "TM" and "R" aren't playing completely nice with OpenCart:

United States Postal Service

Priority Mail 1-Day<sup>™</sup>
$11.10

Standard Post<sup>®</sup>
$11.10

Anyone have any thoughts on how to either edit the appropriate code to make the superscript code work, or just remove it completely? The <sup> is a little goofy looking.

Thanks!

Jason
rotaryracer
 
Posts: 14
Joined: Tue Oct 16, 2012 6:45 am

Re: Changes to USPS Service

Postby BionicBill » Sun Jul 28, 2013 1:25 pm

I am seeing the same on new orders "Priority Mail 2-Day<sup>™</sup>" There should also be Priority 3 Day I think. Looks like a update is very much needed.

Just did some testing and found that First-Class Mail Parcel is not working.

I am running 1.5.4.1 OC
BionicBill
 
Posts: 10
Joined: Mon Dec 03, 2012 3:08 pm

Re: Changes to USPS Service

Postby BionicBill » Sun Jul 28, 2013 7:35 pm

Fix done

In: catalog/model/shipping/usps.php
Find:
Code: Select all
$result = str_replace('&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;', '', $result);
$result = str_replace('&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;', '', $result);


Replace with this:
Code: Select all
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;', '', $result);
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;', '', $result);


I have tested this on 1.5.4.1 and it also fixes First Class Mail which was not come up.
Note Priority Mail is Now displayed as Priority Mail 1-Day, Priority 2-Day or Priority 3-Day

I have not tested it yet but if you what to add the symbols they add for trademark I think this would work

Code: Select all
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;', '<sup>&#174</sup>', $result);
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;', '<sup>&#8482</sup>', $result);
BionicBill
 
Posts: 10
Joined: Mon Dec 03, 2012 3:08 pm

Re: Changes to USPS Service

Postby cwswebdesign » Sun Jul 28, 2013 11:36 pm

BionicBill wrote:Fix done

In: catalog/model/shipping/usps.php
Find:
Code: Select all
$result = str_replace('&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;', '', $result);
$result = str_replace('&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;', '', $result);


Replace with this:
Code: Select all
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;', '', $result);
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;', '', $result);


I have tested this on 1.5.4.1 and it also fixes First Class Mail which was not come up.
Note Priority Mail is Now displayed as Priority Mail 1-Day, Priority 2-Day or Priority 3-Day

I have not tested it yet but if you what to add the symbols they add for trademark I think this would work

Code: Select all
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt;', '<sup>&#174</sup>', $result);
$result = str_replace('&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;', '<sup>&#8482</sup>', $result);


Also if doing the above I think you also need to replace the following code
Find:
Code: Select all
               $firstclasses = array (
                  'First-Class Mail Parcel',
                  'First-Class Mail Large Envelope',
                  'First-Class Mail Letter',
                  'First-Class Mail Postcards'
               );


Replace with:
Code: Select all
                            $firstclasses = array (
                  'First-Class Mail<sup>&174</sup> Parcel',
                  'First-Class Mail<sup>&174</sup> Large Envelope',
                  'First-Class Mail<sup>&174</sup> Letter',
                  'First-Class Mail<sup>&174</sup> Postcards'
               );


Like I said I have not tested these changes to add the TM symbols.


I just tested the first fix with 1.5.5.1 and it works. Thank you!

DL
Image
http://www.evolvewebhost.com
800-970-2971

Available for hire if you need something accomplished on your site(s)
User avatar
cwswebdesign
 
Posts: 1606
Joined: Sat Dec 10, 2011 11:26 am
Location: USA

Re: Changes to USPS Service

Postby rotaryracer » Mon Jul 29, 2013 5:21 am

Works like a champ on 1.5.4 - thanks very much for the quick fix!
rotaryracer
 
Posts: 14
Joined: Tue Oct 16, 2012 6:45 am

Re: Changes to USPS Service

Postby bluebikerboy2 » Mon Jul 29, 2013 8:49 am

will these fixes work in 1.5.2.1?
gi joe and action figures www.jasonsjoesandmore.com
bluebikerboy2
 
Posts: 43
Joined: Sat May 12, 2012 4:18 pm
Location: marysville, ca

Re: Changes to USPS Service

Postby Qphoria » Mon Jul 29, 2013 9:05 am

Yes they should work as far back as 1.5.1.3 i believe
ImageImage
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 19191
Joined: Mon Jul 21, 2008 2:02 pm
Donate to Qphoria

Re: Changes to USPS Service

Postby BionicBill » Mon Jul 29, 2013 9:58 am

I have also updated the language file usps.php under admin/language/english/shipping/usps.php to update the new names for shipping services.

Should work for 1.5.X but backup before trying.
Attachments
usps.php
(138 Bytes) Downloaded 331 times
BionicBill
 
Posts: 10
Joined: Mon Dec 03, 2012 3:08 pm

Re: Changes to USPS Service

Postby lorodoes » Mon Jul 29, 2013 12:39 pm

It appears that the First class mail fix didnt't work. I just tried it on 1.5.5.1 and I am still not getting any of the first-class mail options when going checking out.
lorodoes
 
Posts: 5
Joined: Thu Oct 13, 2011 2:31 pm

Re: Changes to USPS Service

Postby lorodoes » Mon Jul 29, 2013 1:22 pm

BionicBill wrote:I have also updated the language file usps.php under admin/language/english/shipping/usps.php to update the new names for shipping services.

Should work for 1.5.X but backup before trying.


There are only 3 lines in that file, but there are more than that in the file on my system.
lorodoes
 
Posts: 5
Joined: Thu Oct 13, 2011 2:31 pm

Re: Changes to USPS Service

Postby lorodoes » Mon Jul 29, 2013 1:48 pm

I found my problem

Code: Select all
                                        $firstclasses = array (
                                         'First-Class Mail Parcel',
                                         'First-Class Mail Large Envelope',
                                         'First-Class Mail Letter',
                                         'First-Class Mail Postcards'
                                        );


Is correct. The code that was provided by Bill for that section doesn't work.
lorodoes
 
Posts: 5
Joined: Thu Oct 13, 2011 2:31 pm

Re: Changes to USPS Service

Postby lorodoes » Mon Jul 29, 2013 1:55 pm

Nevermind I see what I did. DOH. Sorry guys. The replace is on the XML that is returned. and the array checks that xml for those matches. and again DOH.
lorodoes
 
Posts: 5
Joined: Thu Oct 13, 2011 2:31 pm

Re: Changes to USPS Service

Postby nealero » Mon Jul 29, 2013 2:00 pm

this seems to have fixed the <sup> issue but we offer two shipping options


Priority Mail Express 1-Day Flat Rate Envelope
Priority Mail 1-Day

Is there a way to change the names that are displayed so that it reads

Express Mail 1-2 Day
Priority Mail 2-3 Day

????
nealero
 
Posts: 3
Joined: Tue Jul 02, 2013 2:37 pm

Re: Changes to USPS Service

Postby thohell » Mon Jul 29, 2013 4:19 pm

I have the same issue as nealero. It fixed it so now that it works properly, but it's not displaying priority mail 1-day. Is there any way to remove the 1-day?

Thanks,
James
thohell
 
Posts: 4
Joined: Fri Apr 26, 2013 11:50 am

Re: Changes to USPS Service

Postby richdtt » Mon Jul 29, 2013 4:59 pm

nealero wrote:this seems to have fixed the <sup> issue but we offer two shipping options


Priority Mail Express 1-Day Flat Rate Envelope
Priority Mail 1-Day

Is there a way to change the names that are displayed so that it reads

Express Mail 1-2 Day
Priority Mail 2-3 Day

????


try adding
$result = str_replace('Priority Mail Express 1-Day Flat Rate Envelope', 'Express Mail 1-2 Day ', $result);
$result = str_replace('Priority Mail 1-Day', 'Priority Mail 2-3 Day', $result);
richdtt
 
Posts: 10
Joined: Tue Mar 20, 2012 8:26 pm

Re: Changes to USPS Service

Postby Sidecutter » Mon Jul 29, 2013 11:19 pm

Does anyone know if the fixes given above will work for older versions? Specifically, 1.4.9.6 in my case. I'm getting the same issues with the new changes the USPS made on the 28th.
Sidecutter
 
Posts: 145
Joined: Mon Jan 17, 2011 5:58 pm

Re: Changes to USPS Service

Postby promofire » Tue Jul 30, 2013 9:20 am

I also need to know how to fix it in 1.4.9.3

Thanks
promofire
 
Posts: 154
Joined: Wed Jan 26, 2011 1:00 pm

Re: Changes to USPS Service

Postby webauthorings » Tue Jul 30, 2013 11:48 am

Hey guys.
Not working on Version 1.4.9.3 or 1.5.1.1.
Thoughts?
Regards,
Howard Baltus
WebAuthoring.com
TheTrickery.com
User avatar
webauthorings
 
Posts: 4
Joined: Fri May 27, 2011 9:31 am

Re: Changes to USPS Service

Postby bclark856 » Tue Jul 30, 2013 2:43 pm

Same for a client using 1.4.9.5. Need a fix for this. I spent an hour and a half digging through code this morning and came up empty
bclark856
 
Posts: 1
Joined: Tue Jul 30, 2013 2:40 pm

Next

Return to Shipping

Who is online

Users browsing this forum: No registered users and 5 guests

Hosted by Arvixe Web Hosting