Support » Plugin: WP eCommerce » WP e-Commerce problems with USPS API Shipping quote name.

  • Resolved alfredwestlake


    I am having problems with the shipping choice names in wp e-commerce USPS shipping. The shipping choices show as:

    Standard Post<sup>®</sup> $6.99
    Priority Mail 2-Day<sup>™</sup> $8.75
    Priority Mail Express 1-Day<sup>™</sup> $35.20

    Actually it doesn’t even show the special characters it shows the character codes rather than the trademark and copyright symbols.

    I can’t seem to figure out how to or where to fix the problem. It seems to be coming from the usps API and is the:

    <label for='<?php echo wpsc_shipping_quote_html_id(); ?>’><?php echo wpsc_shipping_quote_name(); ?></label>

    But quite honestly I am lost as to how to fix it.

    Thanks for any help,

Viewing 9 replies - 1 through 9 (of 9 total)
  • bump

    After finally getting the USPS working, I believe I’m seeing a similar problem as mentioned above.


    First-Class Mail<sup>®</sup> Parcel

    Temporary fix as follows:
    In wp-e-commerce\wpsc-components\theme-engine-v1\helpers\shipping.php
    look for the wpsc_shipping_quote_name() function at line 66.

    Replace it with this:

    function wpsc_shipping_quote_name() {
       global $wpsc_cart;
      $fix = str_replace("& a m p ; l t ; sup & a m p ; g t ; & a m p ; # 1 7 4 ; & a m p ; l t ; / s u p & a m p ; g t ;", "<sup>& reg ;</sup>", $wpsc_cart->shipping_quote['name']);
      $fix = str_replace("& a  m p ; l t ; s u p & a m p ; g t ; & a m p ; # 1 5 3 ; & a m p ; l t ; / s u p & a m p ; g t ;", "<sup>& trade ;</sup>", $wpsc_cart->shipping_quote['name']);
      $wpsc_cart->shipping_quote['name']  = $fix;
       return apply_filters( 'wpsc_shipping_quote_name', $wpsc_cart->shipping_quote['name'] );

    Just take the spaces out of the search strings – every time I posted the actual code it kept converting the characters.

    Thanks robot_monster, it didn’t work for me. I did come up with a solution. But then ran into another problem with another area of WP e-Commerce. So I decided to pack it in and try a different shopping cart solution. I will probably try WooCommerce or something. Too many problems with WP e-Commerce.


    Here is my fix:
    on the wpsc-shopping_cart_page.php on line 172 replace
    <?php echo wpsc_shipping_quote_name(); ?>


    <?php $dogvars = array(“&”,”l”,”amp;t;supamp;gt;amp”,”amp;t;/supamp;gt;”,”;#174;”,”;#8482;”); $doggynew = str_replace($dogvars,””, wpsc_shipping_quote_name());?>
    <?php $doggyrate = str_replace(“Mai”,”Mail”,$doggynew);?>
    <?php echo $doggyrate; ?>


    Was this ever updated in the released code or do people still have to patch this? I don’t have exactly the same display but think it is related.

    I am still getting:
    Standard Post<sup>&#174
    rather than the display of the symbols this is code for (actually the greater than and less than symbols aren’t interpreted either but it changed when I cut and pasted).

    I want rule out any customization on my site causing this before I dig into it. Would like to know if others still get it with uncustomized code.

    It’s been several years since USPS API started returning the string that causes this.

    Plugin Author Mihai


    JimLS, this has been resolved a while back. From what i know there are no new reports about this issue so if you are using the latest version it should be good to go.

    Could you post links to any more detail? I would like to know what version this was fixed in. I am running a slightly older version because of changes in the way images are handled in the latest versions that cause my site issues.

    Plugin Author Mihai


    Try replacing your function in the usps file with the one here:

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WP e-Commerce problems with USPS API Shipping quote name.’ is closed to new replies.