USPS Postal Changes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anos atrás
Since the 2011 USPS Postal changes, my cart shipping options are displayed with "<sup>®</sup>" behind each selection.  After researching the string, I have found that it is supposed to create a subscript registered trademark symbol, ®, but the symbol is not being rendered in the shipping selection screen of the shopping cart.  Is anyone else having this problem and/or does anyone know of a fix?

In other words, on the shipping selection screen:

USPS Priority Mail<sup>®</sup>

-- should be --

USPS Priority Mail®
13 anos atrás
I have run into this too and I'm working on decoding the html so that it will display the trademark symbol.  I'll share it once it's working.
13 anos atrás
I too have noticed this have have come up with this patch: you can download http://rapidshare.com/files/440848559/Nop.Shipping.USPS.zip

-or if you like to compile your own code, in [USPSComputationMethod.cs] under line 452 add the following

char tm=(char)174;
serviceCode = serviceCode.Replace("<sup>®</sup>", tm.ToString());
13 anos atrás
Honestly, I think the programmers at the usps screwed this up in major fashion.  If you look at the response string in the XML for the <MailService/> tag, you have literally:


Express Mail&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;


If you Convert all the
"&amp;"
to just "&" you get:

Express Mail&lt;sup&gt;&amp;reg;&lt;/sup&gt;


Converting this again to their corresponding symbols, you get:

Express Mail<sup>&reg;<sup>


Which would display the registered trademark as a superscript.

It looks like they are coverting their string one too many times before sending it out.

This hosed me up since I am using the USPSStrings.cs file to limit the available services.  I'll have to change these strings to match what's coming back in the XML, then convert it twice (like above) before saving it to the object list.
13 anos atrás
What do you expect from government workers :)
13 anos atrás
Hi Guys,

Can somone please post a fix for this?
13 anos atrás
oh well I simply replaced <%#Server.HtmlEncode(Eval("Name").ToString())%> with %#Server.HtmlEncode(Eval("Name").ToString().Replace("&lt;sup&gt;&amp;reg;&lt;/sup&gt;",""))%>
13 anos atrás
I too am looking for a fix on this. Can someone please update the 1.9 DLL and post for us to download please. or point out where we can get the updated files.

thanks!
13 anos atrás
Applied pepse's change above, recompiled and the results are MUCH better now.  Thanks pepse.

[FROM PEPSE'S POST - WITH MY ADDITIONAL NOTES]

Edit ~\Shipping\Nop.Shipping.USPS\USPSComputationMethod.cs

Change code snippet below starting at line 452
----------------------------------------------------------------
from:
                        while (!((tr.Name == postageStr) && (tr.NodeType == XmlNodeType.EndElement)));

                        if (shippingOptions.Find((s) => s.Name == serviceCode) == null)

to:
                        while (!((tr.Name == postageStr) && (tr.NodeType == XmlNodeType.EndElement)));
                        char tm = (char)174;
                        serviceCode = serviceCode.Replace("&lt;sup&gt;&amp;reg;&lt;/sup&gt;", tm.ToString());

                        if (shippingOptions.Find((s) => s.Name == serviceCode) == null)
----------------------------------------------------------------

Enjoy
12 anos atrás
I tried this chang and it doesn't work.  I am using 1.90.

Thank you.

Alan
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.