Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
aldaffodil

USPS Labels not working

Recommended Posts

Hi, I have installed the new version - and everything seems to work EXCEPT when you go to the page usps_ship.php - these do not work: "Store Ship Bill" - so you cannot change the address.

 

Thanks,

Philip

Share this post


Link to post
Share on other sites

Do you have javascript disabled? It uses a javascript function to change these address values.

Hi, I have installed the new version - and everything seems to work EXCEPT when you go to the page usps_ship.php - these do not work: "Store Ship Bill" - so you cannot change the address.

 

Thanks,

Philip

Share this post


Link to post
Share on other sites

Also, noticed this has no part for in in the java script:

 

java script:clearAddress('return_cust_return');

 

I think there must be some java script missing or something - because the older versions work - just not the new version.

 

Thanks,

Philip

Edited by dwdonline

Share this post


Link to post
Share on other sites

The new file does not have use "return_cust_return" anywhere. It has been renamed to a more meaningful "return_cust_shipping" Nothing should be calling out for that function with that setting.

 

All of the javascript is defined in usps_ship.php. Try to view source of the page and make sure that about 15 lines down there is:

<script language="JavaScript">
function clearAddress (addrType)
{

 

Also, noticed this has no part for in in the java script:

 

java script:clearAddress('return_cust_return');

 

I think there must be some java script missing or something - because the older versions work - just not the new version.

 

Thanks,

Philip

Share this post


Link to post
Share on other sites

I downloaded and reinstalled the intire contrib and still those links do not work.

 

Thanks,

Philip

Share this post


Link to post
Share on other sites

I have also tried it in Internet Explorer, Firefox, and Safari and it does not work in any of them. That code is in there - it is not 15 lines though - there is a whole bunch of php code at the top of the file. It is the original file though - downloaded a few min ago from the contrib section.

 

Thanks,

Philip

Share this post


Link to post
Share on other sites

I found a mistake that may not be a problem for everyone.

 

Line 343 and 362:

	theForm.shippingDate.selectedIndex = <? echo (date('G') < USPS_CUTOFF_HOUR ? 0 : 1);?>;

should be:

	theForm.shippingDate.selectedIndex = <?php echo (date('G') < USPS_CUTOFF_HOUR ? 0 : 1);?>;

(the <? was missing the php after it - stupid me :))

It seems that some servers still translate the php, but others don't.

Edited by braclark

Share this post


Link to post
Share on other sites

revised:

USPS Labels 2.0.1 braclark 10 Aug 2006

 

Complete package, but only usps_ship.php has changed

 

fixed two places where <? should have been <?php

usps_ship.php

added feature that was added in version 1.9d "adding a default case to the state abbreviator switch"

Previous version assumed the same shipping country for billing country, now uses appropriate country

Share this post


Link to post
Share on other sites

Brandon - thanks so much! You have really improved this contribution... you added so many things that I used to customize (like setting the Ship date to the next day) myself. And signing in works better...

 

Thanks again.

 

Tim

Share this post


Link to post
Share on other sites

Thank you very much. I use it daily, so I also needed to streamline my shipping. I just hope it can be useful to you guys too.

Share this post


Link to post
Share on other sites
Guest

I installed version 1.9e a few weeks ago and now I see that we've had what seems to be an overhaul.

 

Do I need to back-out 1.9e before upgrading to 2.0.1 ?

 

 

-= Dave =-

Share this post


Link to post
Share on other sites

You don't need to, but it would leave your site cleaner if you undid the previous version first. You wouldn't have unused files left on your system.

 

Other than that, there are two different sql's depending on if it's an upgrade or a new install.

I installed version 1.9e a few weeks ago and now I see that we've had what seems to be an overhaul.

 

Do I need to back-out 1.9e before upgrading to 2.0.1 ?

-= Dave =-

Share this post


Link to post
Share on other sites

This just started happening this weekend - I can add the label to the cart, but when I get to the checkout page, the label says "Undeliverable Address" and the zipcode is highlighted. It is missing the +4 portion of the zipcode. If I edit the label, and delete or retype the zipcode, it will then accept the label (and add in the +4).

 

Anyone else experiencing this?

Share this post


Link to post
Share on other sites

Yeah, I'm getting it too.

 

I had to do 9 labels this morning like that.

I'll do some testing to see if it can be fixed.

Share this post


Link to post
Share on other sites

USPS Labels 2.0.2

 

Complete package, but only usps_ship.php has changed

 

Corrected where it would send Zip Code, Postal code, State, and Provice for all shipping addresses. Usps used to allow this, but recently changed their site and it now causes errors if Zip Code and Postal Code are both sent.

 

Short answer: I fixed it.

 

Long answer: USPS uses two different fields for Zip Code and Postal Code. Only the one that needs to be filled in is visible, and they hide the other input. It was easier to just populate the values of both fields, since USPS worked when both values were there. I guess they have just changed their code, and now it probably uses the Postal Code by default, and if it is empty then it uses Zip Code. Now, with a few extra lines of code, it only sends the needed values.

Share this post


Link to post
Share on other sites

with this new version do you have the option of not sending the Zip Code at all and just letting the USPS site automatically generat that?

Share this post


Link to post
Share on other sites
No, but you could modify your version to do that.

 

Just out of curiosity, why would you want to do that?

 

Hmm... I don't know how to modify....

 

I would want to do that to ensure the proper zip code in case the customer typed it in wrong.

Share this post


Link to post
Share on other sites

I think you are the only one who wants this "Feature", so it probaby wouldn't make it into a release.

 

In the current version (2.0.2)

Change Line 1867 from:

<input name="deliveryZipcode" maxlength="10" size="19" tabindex="40" value="<?php echo ($country_code == 1 ? (USPS_SHIP_ADDRESS == 'Shipping' ? $order->delivery['postcode'] : $order->billing['postcode']) : '');?>" id="deliveryZipcode" style="width: 175px;" title="Delivery Address Zip Code" type="text">

 

To:

<input name="deliveryZipcode" maxlength="10" size="19" tabindex="40" value="" id="deliveryZipcode" style="width: 175px;" title="Delivery Address Zip Code" type="text">

Share this post


Link to post
Share on other sites
Guest

Excellent and speedy work on a fine Contrib update! I can't believe they've changed it again! What's that, like 4 times each year on average? I'm looking to update so I can begin using it again. My version is old. I use diffrentshipping.php which is the stripped down version. Is the update sql valid for this or should I look line by line?

Share this post


Link to post
Share on other sites

The update.sql is for if you installed a version that uses the configuration panel to set your return address. If your version is very old, then you were probably editing the first few lines of differentshipping.php to set your return address. If you don't have these settings in Admin Panel - Configuration - Shipping/Packaging, then just run the other sql.

Share this post


Link to post
Share on other sites
I think you are the only one who wants this "Feature", so it probaby wouldn't make it into a release.

 

It's probably unnecessary anyway, as USPS validates and standardizes addresses. If the ZIP code doesn't match the address, USPS will correct it, or reject the address and ask you to resubmit.

 

It's sometimes rather picky as to how you spell the street name, especially when it is a numbered highway. Some areas require the name be spelled out (e.g: 14327 US Highway 53), while others will accept abbreviations. I sometimes have to use MapQuest to determine the standardized spelling of the street name before Click-n-Ship will accept it.

 

--Glen

Share this post


Link to post
Share on other sites

Yeah, USPS can be picky.

 

I have a repeat customer who I give a free upgrade to UPS every order because USPS won't accept their address, "US HWY 25E". There is no street number, and I can't find a different mailing address in the yellow pages, white pages, google, or anywhere. They are larger orders, so I don't mind spending the couple extra buck for it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×