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.
- osCommerce Support Forum
- → Viewing Profile: blueedge
Latest News: (loading..)
Community Stats
- Group Community Member
- Active Posts 141 (0.05 per day)
- Most Active In General Support (73 posts)
- Profile Views 3,783
- Age Age Unknown
- Birthday Birthday Unknown
-
Real Name
Keith
-
Gender
Not Telling
Contact Information
1
Neutral
Latest Visitors
Posts I've Made
In Topic: USPS Shipping Labels
20 March 2012, 18:23
In Topic: USPS Shipping Labels
20 March 2012, 15:07
Well, I'm making progress. By including <? include('uspslabelfix.php');?>, the label function now works. However, like the poster above, all of the info is imported into the USPS form except for the state.
In Topic: USPS Shipping Labels
20 March 2012, 14:49
Unfortunately, I'm not getting the fix to work.
I uploaded the uspslabelfix.php file to the admin directory. Instead of editing the admin/orders.php file, I edited the admin/includes/filenames.php file and replaced
define('FILENAME_ORDERS_USPS_SHIP', 'usps_ship.php');
with
define('FILENAME_ORDERS_USPS_SHIP', 'uspsshiplabelfix.php');
Now when I click on the USPS label button from the orders.php page, a new window appears with a "Ship a USPS Package" button and the order ID in the URL. When I click on the button (and after logging into the USPS.com site), no shipping info (name, address, etc) appears in the label form on USPS.com.
I uploaded the uspslabelfix.php file to the admin directory. Instead of editing the admin/orders.php file, I edited the admin/includes/filenames.php file and replaced
define('FILENAME_ORDERS_USPS_SHIP', 'usps_ship.php');
with
define('FILENAME_ORDERS_USPS_SHIP', 'uspsshiplabelfix.php');
Now when I click on the USPS label button from the orders.php page, a new window appears with a "Ship a USPS Package" button and the order ID in the URL. When I click on the button (and after logging into the USPS.com site), no shipping info (name, address, etc) appears in the label form on USPS.com.
In Topic: Major fail! None of the products are linking correctly!
20 March 2012, 00:54
ifubar, on 06 March 2012, 08:50, said:
Update... mostly everything seems to be working, except for the Google Checkout addon.
Here's lines 132 - 140
Here's lines 132 - 140
$tax_array = array();
$tax_name_array = array();
$flagAnyOutOfStock = false;
$product_list = '';
$restricted_categories_raw = gc_get_configuration_value($config->restrictedCategories());
$resticted_categories = split('([ ]?[,][ ]?)', $restricted_categories_raw);
for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
$product_virtual = false;
if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
I don't know how to rewrite the line using preg_splilt. Could you show me the rewrite for the line containing the split function?
In Topic: Can't get UPSxml module to work
05 September 2011, 15:20
It seems that UPS.com is working. However, as a result of the hack, I wonder if the XML rate feed will simply be restored or if the feed will be modified, requiring OSC changes.
- osCommerce Support Forum
- → Viewing Profile: blueedge
- Forum Rules






Find content