Post by NoJoke » Wed Jul 17, 2013 4:15 am

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

Newbie

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by rotaryracer » Sun Jul 28, 2013 7:23 pm

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

Newbie

Posts

Joined
Tue Oct 16, 2012 7:45 pm

Post by BionicBill » Mon Jul 29, 2013 2:25 am

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

Newbie

Posts

Joined
Tue Dec 04, 2012 4:08 am

Post by BionicBill » Mon Jul 29, 2013 8:35 am

Fix done

In: catalog/model/shipping/usps.php
Find:

Code: Select all

$result = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $result);
Replace with this:

Code: Select all

$result = str_replace('&lt;sup&gt;&#174;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&#8482;&lt;/sup&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('&lt;sup&gt;&#174;&lt;/sup&gt;', '<sup>&#174</sup>', $result);
$result = str_replace('&lt;sup&gt;&#8482;&lt;/sup&gt;', '<sup>&#8482</sup>', $result);

Newbie

Posts

Joined
Tue Dec 04, 2012 4:08 am

Post by cwswebdesign » Mon Jul 29, 2013 12:36 pm

BionicBill wrote:Fix done

In: catalog/model/shipping/usps.php
Find:

Code: Select all

$result = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $result);
Replace with this:

Code: Select all

$result = str_replace('&lt;sup&gt;&#174;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&#8482;&lt;/sup&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('&lt;sup&gt;&#174;&lt;/sup&gt;', '<sup>&#174</sup>', $result);
$result = str_replace('&lt;sup&gt;&#8482;&lt;/sup&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

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Newbie

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by rotaryracer » Mon Jul 29, 2013 6:21 pm

Works like a champ on 1.5.4 - thanks very much for the quick fix!

Newbie

Posts

Joined
Tue Oct 16, 2012 7:45 pm

Post by bluebikerboy2 » Mon Jul 29, 2013 9:49 pm

will these fixes work in 1.5.2.1?

gi joe and action figures www.jasonsjoesandmore.com


Newbie

Posts

Joined
Sun May 13, 2012 5:18 am
Location - marysville, ca

Post by Qphoria » Mon Jul 29, 2013 10:05 pm

Yes they should work as far back as 1.5.1.3 i believe

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by BionicBill » Mon Jul 29, 2013 10:58 pm

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.

Newbie

Posts

Joined
Tue Dec 04, 2012 4:08 am

Post by lorodoes » Tue Jul 30, 2013 1:39 am

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.

Newbie

Posts

Joined
Fri Oct 14, 2011 3:31 am

Post by lorodoes » Tue Jul 30, 2013 2:22 am

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.

Newbie

Posts

Joined
Fri Oct 14, 2011 3:31 am

Post by lorodoes » Tue Jul 30, 2013 2:48 am

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.

Newbie

Posts

Joined
Fri Oct 14, 2011 3:31 am

Post by lorodoes » Tue Jul 30, 2013 2:55 am

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.

Newbie

Posts

Joined
Fri Oct 14, 2011 3:31 am

Post by nealero » Tue Jul 30, 2013 3:00 am

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

????

Newbie

Posts

Joined
Wed Jul 03, 2013 3:37 am

Post by thohell » Tue Jul 30, 2013 5:19 am

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

Newbie

Posts

Joined
Sat Apr 27, 2013 12:50 am

Post by richdtt » Tue Jul 30, 2013 5:59 am

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);

Newbie

Posts

Joined
Wed Mar 21, 2012 9:26 am

Post by Sidecutter » Tue Jul 30, 2013 12: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.

Newbie

Posts

Joined
Tue Jan 18, 2011 6:58 am

Post by promofire » Tue Jul 30, 2013 10:20 pm

I also need to know how to fix it in 1.4.9.3

Thanks

Newbie

Posts

Joined
Thu Jan 27, 2011 2:00 am

Post by webauthorings » Wed Jul 31, 2013 12: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
Newbie

Posts

Joined
Fri May 27, 2011 10:31 pm

Post by bclark856 » Wed Jul 31, 2013 3:43 am

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

Newbie

Posts

Joined
Wed Jul 31, 2013 3:40 am
Who is online

Users browsing this forum: No registered users and 12 guests