Guest Posted January 3, 2011 Share Posted January 3, 2011 Anyone out there still using CC3 and the USPS shipping module? Unfortunately USPS messed with something again and now all the USPS International rates are not showing...only the domestic rates. Does anyone know what they did/what code they changed? :angry: Quote Link to comment Share on other sites More sharing options...
dslusarc Posted January 5, 2011 Share Posted January 5, 2011 They have added the registered trade mark symbol after the names of the mail services (I will refrain from commenting of the merits of such a change). I only have Express International Mail shipping option on my website so in my calc.php I changed if(($sum>0) && (($api=="RateV2") || ($key=="Express Mail International"))){ to: if(($sum>0) && (($api=="RateV2") || ($key=="Express Mail<sup>&reg;</sup> International"))){ This allows the rate to be calculated and seen by the customer so they can buy off my website but they see the following as the shipping option: USPS Express Mail <sup>®</sup> International I have not figure out how to fix how it looks. I have tried to use just ® for the trademark symbol but it does not work it wants it all spelled out to get the rate but then does not show the trademark on the website checkout, just the code for the trademark. Don Quote Link to comment Share on other sites More sharing options...
Guest hotspur29 Posted January 7, 2011 Share Posted January 7, 2011 I am having the same problem, but I do not have the same code in my calc.php file as the previous post. Are there any other solutions out there to solve this issue? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 7, 2011 Share Posted January 7, 2011 This is a string that has had html special characters converted into their 'entities' so that the browser is told to show those exact characters and the user can actually see those characters. Where the conversion took place, I don't know. "Express Mail<sup>&reg;</sup> International" is seen in the browser as "USPS Express Mail <sup>®</sup> International" To do what you want - to have the html code to actually be html code - you need to decode the string first: if(($sum>0) && (($api=="RateV2") || ($key=="Express Mail<sup>&reg;</sup> International"))){ $key = html_entity_decode($key); ... } Then it should look like: USPS Express Mail ® International But I can't confirm this extra statement won't break something elsewhere as my copy of the code for CC3.0.20 calc.php for USPS shipping module uses RateV3 (not V2), and doesn't have that if() statement in it anyway. Quote Link to comment Share on other sites More sharing options...
dslusarc Posted January 14, 2011 Share Posted January 14, 2011 My calc.php was modified to only allow Express Mail for outside of the USA. I found the way to modify it in the forums some time ago. Anyhow your additional code fixed my issue. I added this like you said and worked! Here is what I added: $key = html_entity_decode($key); Here is my new line of code: if(($sum>0) && (($api=="RateV2") || ($key=="Express Mail<sup>&reg;</sup> International"))){ $key = html_entity_decode($key); And now I get the trademark symbol on the website! Thanks! Quote Link to comment Share on other sites More sharing options...
sparky5693 Posted January 16, 2011 Share Posted January 16, 2011 I'm on the right track, but I was wondering if someone can tell me what I did wrong here.... all it's giving me is the priority international. I was hoping to also offer first class mail international package. if(($sum>0) && (($api=="RateV3") || ($key=="First-Class Mail<sup>&reg;</sup> International Package") or ($key=="Priority Mail<sup>&reg;</sup> International"))){ $key = html_entity_decode($key); Quote Link to comment Share on other sites More sharing options...
Guest shakticom Posted January 28, 2011 Share Posted January 28, 2011 I am having the opposite of this issue; My cart only offers international even to domestic customers. The USPS Module update did not fix this. Quote Link to comment Share on other sites More sharing options...
KyBabyCakes Posted February 7, 2011 Share Posted February 7, 2011 Hi, If you are using CubeCart V3.020 and need to remove the weird HTML form the customer view you need to modify the Modules/Shipping/USPS/calc.php. Find around line 188 foreach($rates as $key => $value){ Directly after that add $key = html_entity_decode($key); This worked for me. Now if I could just find a way to limit what international rates were returned and how to order them to show least expensive to most expensive, I would be good. LOL! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.