Jump to content

Wes_SFLL

Members
  • Content count

    10
  • Joined

  • Last visited


Reputation Activity

  1. Like
    Wes_SFLL reacted to blueedge in USPS Shipping Labels   
    The state does not appear in the USPS label form because the form is looking for the two-letter state abbreviation. However, in the case of my site, the full state name is being sent to the USPS label form. To remedy the situation, I modified Wes_SFLL's uspslabelfix.php file as follows:
     
    Added:
     
     
    $state_query = tep_db_query("SELECT zone_code FROM " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "'");
    $state_abbreviation = tep_db_fetch_array($state_query);
     
    Changed:
     
    <input type="hidden" name="form.deliveryState" value= "<?php echo $order->delivery['state'];?>" id="stateTo">
     
    To:
     
    <input type="hidden" name="form.deliveryState" value= "<?php echo $state_abbreviation['zone_code'];?>" id="stateTo">
     
    I hope that helps.
×