Hi,
I use the USPSv4 shipping module. It relies on predictable mail service names.
I've been throwing darts for a bit at trying to fix why no shipping options were showing up. It seems that they inserted html for making the REG text a superscript in all of the service names. removing it fixes this module. Here is how.
Changing line 314 in uspsv4.php
from This:
$serviceName = $serviceName->getText();
To this:
$serviceName = str_replace( "<sup>&reg;</sup>" , "" , $serviceName->getText() ) ;
Seems to correct the issue.
The above corrects domestic shipping. Do the same for line 341 too and that should correct international.
Can you confirm the same on your end?
Nice, I originally edited the .cfg.php file to add "<sup>&reg;</sup>" and then used html_entity_decode to display the content correctly, but your way is better. I do not know how long this code will work as it seems usps is changing things around, but at least for now I dont have complaining clients.
Hi Seyl,
It took hours of throwing darts to get figure out what exactly was the issue. At least we now know that it was related to naming convention and will look there first if they break it again.
- Mike
Hi,
Also add this:
$serviceName = str_replace( "<sup>&trade;</sup>" , "" , $serviceName);
below this on 314 and 341:
$serviceName = str_replace( "<sup>&reg;</sup>" , "" , $serviceName->getText() ) ;
- Mike
Thanks for the fix!
Just happened to be browsing the forum and this thread saved my life! Some time ago I developed a USPS Quotes with Insurance module, and now it is updated & ready for the new year. I also added just about every possible service option while I was at it.
Check it out here and stop footing the bill for insurance!
http://codedonors.com/shipping-modules/usps-quotes-with-insurance-virtuemart-p-44.html
Quote from: Jmcdo999 on January 07, 2011, 13:26:49 PM
Just happened to be browsing the forum and this thread saved my life! Some time ago I developed a USPS Quotes with Insurance module, and now it is updated & ready for the new year. I also added just about every possible service option while I was at it.
Hi,
Since I saved your life and all ... I guess you owe me. ;D
- Mike