Post by fastercat12 » Mon Feb 14, 2011 9:58 pm

I finally got this fixed, v1.4.9.3 I use a shipping flat rate boxes calculator so it figures out the cheapest size box per dimensions of the products. It has been displaying <sup>&reg;</sup> in the box description. To remove this you will need to add this code after curl_close($ch); located in catalog/model/shipping/usps.php

add this after curl_close($ch);
// strip reg and trade out 01-02-2011
$result = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $result);

This is what it should look like
curl_close($ch);

// strip reg and trade out 01-02-2011
$result = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $result);

Always make a back up before editing.

Hope this helps some people
Fastercat12

Newbie

Posts

Joined
Tue Aug 10, 2010 11:48 pm

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by AMWard » Wed Apr 23, 2014 11:51 am

I am using Opencart 1.5.6.2 and had this same problem. This is my version of what fixed it:

Original Code was... (I added the comments just to keep it in place)
// strip reg, trade and ** out 01-02-2011
//$result = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $result);
//$result = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $result);

Then this is what I added...
//Start AMWard Edit on 04-22-2014 to remove this crap from showing up on checkout.
$result = str_replace('&lt;sup&gt;&#174;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&#8482;&lt;/sup&gt;', '', $result);
//End AMWard Edit

Initial testing showed good results. It got rid of the sup! I still have more testing to do to make sure it is all working properly. But I hope this helps someone repair the new release. I worked on this baby for hours until I derived this... I am not that fluent in PHP, just enough to get me in trouble. ::)

Newbie

Posts

Joined
Wed Apr 23, 2014 11:43 am

Post by gkoliver » Tue Jul 01, 2014 12:21 pm

Thank you very much for that fix... I'm in 1.5.6.4, and it worked perfectly! Thanks for sharing...

Newbie

Posts

Joined
Tue Jul 01, 2014 12:19 pm
Who is online

Users browsing this forum: No registered users and 7 guests