Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Labels not working


aldaffodil

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

Link to comment
Share on other sites

  • Replies 273
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
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
Link to comment
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

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
Share on other sites

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 =-

Link to comment
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 =-

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment
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">

Link to comment
Share on other sites

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?

Link to comment
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.

Link to comment
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

Link to comment
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.

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...