Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Shipping Labels


xiloicta

Recommended Posts

OK, here is the situation, im not an expert on this, so maybe for you it is so simple, im using OSCommerce 2.2, everything works normal, but once the costumer has been made the shoping, there is no way to print a shipping label directly from the administration tool, i talk with USPS support, and they say the API is able to print the label from my Store Administration Tool, now, I open the usps.php, that comes in includes/modules/shipping and i can't see any script that refers to the function read o work with the generation of a shipping label, as i said, im just an amateur on this, so maybe i miss something at this script.

 

anyone have an information about this,

 

1.- It is posible to print a shipping label straigth from the ADMN tool and pay for it? 2.- there is any script i have to add to usps.php ?

3.- I missing something?

3.- shall i surrender and print it from Paypal?

4.- Quit and open a Tamales Restorant?

 

any sggestion welcome!!

 

Xilo

Link to comment
Share on other sites

1.- It is posible to print a shipping label straigth from the ADMN tool and pay for it? 2.- there is any script i have to add to usps.php ?

3.- I missing something?

3.- shall i surrender and print it from Paypal?

4.- Quit and open a Tamales Restorant?

The solution is:

0.- Search "usps shipping labels" in contributions resulting in http://addons.oscommerce.com/info/1498

Link to comment
Share on other sites

  • 2 years later...

Yes, today's new USPS redesign has caused problems for me as well. Once all of the shipping info is auto-entered at usps.com, the next page of the process is now invalid, so I have to manually enter all of the information. Hoping for a quick and easy fix!

Link to comment
Share on other sites

I too can no longer print labels from the admin screen. When I click the print shipping label button, I am taken to the USPS website with the info filled in (just like always). When I click continue from that screen, I am taken to the login screen. I login and get a page has moved message. When I go to the new shipping page, the customer's address isn't filled in and my company name isn't on return address. Once again, they have done a redesign without any thought as to the impact it will have on their business customers. I too am hoping for a fast and easy fix.

-- A ship in a harbor is safe, but that is not a ships ultimate purpose.

Link to comment
Share on other sites

I believe they have zero regard on how it impacts everyone. :(

 

 

It looks like the pages have changed and the field names. Why would they do that?

 

krdito- that information isnt entered on USPS.com when you click to create a label, that is your existing USPS_ship.php page that populates and sends it to USPS (or what used to be there)

Link to comment
Share on other sites

WTH!!! I can't believe that they did this...!!!! BAD start to a monday!

 

I did a test on usps.com and now the link needs a label id which the oldway didn't need to get to the next page.

 

Anyone got the hot fix?

Link to comment
Share on other sites

Thjis is a bog USPS f-up. No wonder they are going broke, an apparent lack of any customer consideration. What A-holes. I assume there are a lot of people that this will affect. Hope a fix comes soon. This seriously affects our business - but what does USPS care?

Link to comment
Share on other sites

I have been having an email conversation with USPS and their response is that the redesign didn't have any effect on the API. They keep telling me to contact my 3rd party vendor. However, I don't have a 3rd party vendor. Does anyone have any suggestions other than to check out shipping via Fedex or UPS?

-- A ship in a harbor is safe, but that is not a ships ultimate purpose.

Link to comment
Share on other sites

The way the contribution works is different. They have altered the way the fields are populated on their site (which the contribution recreated) and then sent to USPS via that web page.

 

The "contact your 3rd party vendor" is their standard response unfortunately.

 

The contribution will no longer function with this USPS redesign

Edited by costast2
Link to comment
Share on other sites

hello;

 

new to this forum, but unfortunately familiar with this issue. i've inherited support for store built from oscommerce, and yesterday, shipping labels stopped working. after some review of how things were working, i see that the form, form fields, etc. have changed. looks now like a multi-part form, etc.

 

has anyone experiencing this problem looked into stamps.com (comes with oscommerce module) or another way to produce USPS labels for orders? is anyone working on a fix for this module, and in need of help testing, etc.?

 

thanks -

gary

Link to comment
Share on other sites

Ok After 14 hours of hacking that code apart I got it working.... all the code for the return address is hard coded so that I could get this working faster. I ended up using some code I found for the zen cart forum and did a include to the order.php to the new file that I created. I will try and update the usps shipping labels. Again its not really clean but I have 50 labels I need to print from the weekend and didn't want this problem to go on any longer.

 

Maybe someone can add back in all the cool variables etc from the original one. All credit goes to the past authors.

Link to comment
Share on other sites

In orders.php you should have:

 

a href="' . tep_href_link(FILENAME_ORDERS_USPS_SHIP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' .

 

Change it to:

 

a href="' . tep_href_link('uspslabelfix.php', 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' .

 

then just upload the new uspslabelfix file i made

Link to comment
Share on other sites

For some reason, when I use the file that you updated, it does not bring over the state, I believe it is because it is being saved in the database as the full state name and not the 2 letter abbr. Is there a way to covert this before it is sent to usps?

 

Thanks

Edited by dsolutions
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

I am still trying to figure out if we can override the preset return address from when your usps.com account was setup. I ship from 2 different sites and want the info to auto load but it sure looks like it doesn't wanna play fair. O well.... at least we can still use this to print labels...

 

 

I like how much easier it is to print labels...available to print until midnight and the new pdf option sure is nice. NO MORE DOUBLE CHARGES so I hope.

Link to comment
Share on other sites

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.

 

Where did you add this? Which file and where in the file.

 

Did you get it all working with these changes? It might be useful to put together a more informative release to specify all the information needed including the exact changes (again, file and location).

 

Thanks for everyone's work on this.

Link to comment
Share on other sites

Can someone please tell me where in orders.php that I put the following line of code.

 

<?PHP include('uspslabelfix.php');?>

 

Wes said it goes just before the </td> but I must not be finding the right one, because I am getting an error.

 

Thank you and a grateful thanks to Wes for solving the problem.

-- A ship in a harbor is safe, but that is not a ships ultimate purpose.

Link to comment
Share on other sites

Alright in orders.php under your admin folder find the old code for usps label shipping which should look like....

 

<a href="' . tep_href_link(FILENAME_ORDERS_USPS_SHIP, 'oID=' . $HTTP_GET_VARS['oID'])

 

after that entire line but before the next occurrence of </td> add this:

 

<? include('uspslabelfix.php');?>

 

OR (the same thing can be done by adding include('uspslabelfix.php'); just before the ?> at the end of the line )

 

What you are doing is adding a button that has a bunch of hidden form elements to your orders.php file...

 

Make sure to upload uspslabelfix.php from the contribution at http://addons.oscommerce.com/info/1498 to your admin folder.

 

Doing it this way over replacing the filename for the usps label contribution is great just in case they switch back to the old way...

Link to comment
Share on other sites

OK. Why not just name your fix file usps_ship.php and replace the current usps_ship.php? Of cpourse I tried that and the only carry-over is the oID/Reference Number. Why arenlt the other fields populating properly?

Link to comment
Share on other sites

OK, just add to uspslabelfix.php below global $db;

 

require('includes/application_top.php');

$oID = (int)tep_db_prepare_input($HTTP_GET_VARS['oID']);

include(DIR_WS_CLASSES . 'order.php');

$order = new order($oID);

 

rename uspslabelfix.php usps_ship.php, drop into your admin folder, and you got the imported data.

 

Now, to try my meager skills at fixing the two letter state.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...