Zen Cart Logo
Forums / Addon Shipping Modules / usps.com Click-n-ship AutoFill Button Contrib

usps.com Click-n-ship AutoFill Button Contrib

Views: 224,989

Results 241 to 260 of 827
1 Mar 2008, 8:56 AM
#241
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

usps.com Click-n-ship AutoFill Button Contrib

Ok, let me try to field these the best I can.

  1. For the Alter Table command. It works fine in Mysql 4.x.. but i haven't tested Mysql 5.. so maybe i need to make that change to make it compatible.

  2. Ya I know about the old BOF should be EOF.. honestly i didnt update the SO one since the original 1.1b.. as I made no code changes and SO hasn't changed either. So thats always been there I guess.. I will look to see where the problem is.

  3. Thats just something to ignore.. something with the way I'm "faking" the page fields.. I have to send it to the form by applying the form action. It's just one of those things.

  4. Now the important part is to understand how the contrib works. It is not any fancy API call or anything to populate from start to finish of the label creation process. It is strictly a page-to-page javascript form fake. I am basically creating a clone of the real form, then sending the form action command to the real address. This means that it can only go one page deep... at least from what I can tell. I have learned a bit more about javascript since then, but I don't think you can force a variable on page 1 if it only exists on page 2.. So its only meant to work for the first page auto-fill. It's not perfect.. but its the best there is.

  5. I will first try to fix the problem.. then you can try to add the weight modifications to it.


For the second post... This goes back to number 4... You'll have to change your mode of operations for it to work the way you want, as what it does is necessary based on the way it works.

How I use it is:

  1. Open Fresh browser (i.e. not logged into usps site yet)
  2. Click on the USPS button and it populates the form. Click "Continue"
  3. Choose Shipping option, click continue
  4. Login. This will keep you logged in for the next 10 min, and that resets each time you refresh or there is activity. So now as long as you create a new label within the next 10 min you should not have to log in again.

Now that I'm logged in, I close the usps site.. the label is in the virtual cart on the usps site.. and as long as I don't close down ALL instances of the browser, it will stay logged in, even tho you closed that window.

From this point on:

  1. Click on the USPS button and it populates the form. Click "Continue"
  2. Choose Shipping option, click continue
  3. close window
    repeat

Even if you take more than 10 min.. and you are logged out.. or even if you shut down all browsers.. Your labels will still be there in the usps virtual cart so no worries.. login when you need to... its just another step that occurs every so often.. it won't affect any of your labels.

I do this 3 step process until I hit 10... then i finish the full print out and start over with an empty cart.

1 Mar 2008, 10:03 AM
#242
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

Wow! I didn't expect any response until tomorrow. You must be a nightowl like me or in a completely different time zone.
Anyway, except for #2 on the first post, the other problems I can live with. With regard to the 2nd post, I understand the rationale and I can use the same technique. I thought it would help if you make the TARGET of the button action the SAME window rather than _BLANK to force a new window, but now I realize that would make it harder to get back to the SO window for the next order. Cie la vie!
Yes, I guess what is really needed is a full API method, but that would be a lot more development. I was even thinking about integration with the Ty Tracker mod to get the tracking number into the database. Just dreaming. Ran into a nasty with USPS...wanted to barcode scan the tracking number from the label into TyTracker but the barcode number on the label is 30 digits long and the tracking number is only the last 20 of those. Does it ever end??

Thanks for all your help. This is a great contrib. BTW, I also love the Tabbed Products mod. It made a big difference on our site. I will send you the link when it goes live.

Maury

1 Mar 2008, 11:07 AM
#243
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

OK, I found the error in #2. It was the 'short' php tags in the comments. :frusty:
Here's the corrected section (also fixed the EOF):

            <td align="right" colspan="<?php echo $colspan; ?>"><table border="0" cellspacing="0" cellpadding="2">
             <?php // ====> BOF: USPS.com AutoFill <==== ?>
             <?php require(DIR_WS_MODULES . 'usps_autofill_button.php'); ?>             
             <tr><td align="right" colspan="2"><?php echo "Total Weight is $lbsval lbs. $ozval oz."; ?></td></tr>
             <?php // ====> EOF: USPS.com AutoFill <==== ?>

However, every good answer generates a new question. :lamo:
When I added in the fix to SO to show me the type of shipping, it also shows the weight and I realized that the AutoFill module is NOT including the tare weight of the container. I had 1 item at 1.9 lbs plus 2 at 0.5 lbs each and a tare weight of 0.5 lbs. The AutoFill mod showed 2 lbs 15 oz while the SO calculation was 3.4 lbs (correct). Hope this can be fixed easily.

Maury

1 Mar 2008, 5:16 PM
#244
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

However, every good answer generates a new question. :lamo:
When I added in the fix to SO to show me the type of shipping, it also shows the weight and I realized that the AutoFill module is NOT including the tare weight of the container. I had 1 item at 1.9 lbs plus 2 at 0.5 lbs each and a tare weight of 0.5 lbs. The AutoFill mod showed 2 lbs 15 oz while the SO calculation was 3.4 lbs (correct). Hope this can be fixed easily.

Maury

I do remember vaguely looking at TARE weight stuff in the calculations at some point, but forgot what the result was. Originally I didn't make the TotalWeight stuff, that was given to me from another member. Sadly it wasn't complete and I had to learn a bit more before I finally fixed it.. so I can't remember if I included TARE stuff or if I even knew how to handle that back then. I will revisit that.

I'm glad you enjoy it otherwise. I actually modified my orders.php file to include a little textbox that I can paste the number that usps gives:
1234 3456 5678 6789 6789

and use javascript to remove spaces and linkify it to include:

http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=12343456567867896789
``` and auto populate it in the comments box for me
2 Mar 2008, 8:18 AM
#245
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

qhome:

I'm glad you enjoy it otherwise. I actually modified my orders.php file to include a little textbox that I can paste the number that usps gives:
1234 3456 5678 6789 6789

and use javascript to remove spaces and linkify it to include:

http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?origTrackNum=12343456567867896789


Could you explain this a little further? Where does USPS give you the normal tracking number? I think it is on  the 'Scan Sheet' if you produce one on their site, or maybe on the 'receipt' at the end of the transaction?? I want to be able to enter it into Ty Tracker.

With regard to another question I had:
> 5. I had a mod in SO to force the details to show the weight **and method** with the shipper e.g. "United States Postal Service (1x2.5 lbs)(Priority Mail 2-3 days) $6.65" rather than simply "United States Postal Service $6.65".
I realize now that the weight is not important in that line if you show the correct weight (including tare) in the line above. However, the **shipping method**, which is the one the customer chose and is stored in the orders table, is critical. Otherwise, how do you know which selection to make when you go to the USPS page? In orders.php that info is shown in the sidebox when you look at the 'edit' page. But in Super Orders it only shows in the shipping cost line when you go to the 'details' page. And if you do an 'edit totals' then it only shows the shipper (from the orders_total table), not the method. Guess I'll have to bug Frank (Blindside) about that one.
2 Mar 2008, 3:01 PM
#246
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

mauryg:

Could you explain this a little further? Where does USPS give you the normal tracking number? I think it is on the 'Scan Sheet' if you produce one on their site, or maybe on the 'receipt' at the end of the transaction?? I want to be able to enter it into Ty Tracker.

At the end after you print it shows the 20 numbers on the receipt page.. I copy and paste them line by line into each order. Realize tho that I am using the "usps+info-at-a-glance+quick-update-order" version that allows me to update stuff from the quick view of the orders on the side so I don't have to goto the details page each time.

It's not the best but there's no other way that I've found.

mauryg:

With regard to another question I had:

I realize now that the weight is not important in that line if you show the correct weight (including tare) in the line above. However, the shipping method, which is the one the customer chose and is stored in the orders table, is critical. Otherwise, how do you know which selection to make when you go to the USPS page? In orders.php that info is shown in the sidebox when you look at the 'edit' page. But in Super Orders it only shows in the shipping cost line when you go to the 'details' page. And if you do an 'edit totals' then it only shows the shipper (from the orders_total table), not the method. Guess I'll have to bug Frank (Blindside) about that one.

You should easily be able to add that info the the sidebox on SO too.. That would be the only way I can think of unfortunately... tho i will give the variable set a try. I'm wondering if I can make javascript execute different code based on the page.. Now you got me thinking..... bad stuff (good stuff) happens when I start thinking :p

20 Mar 2008, 5:00 PM
#247
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

UPDATE v1.3

USPS.com added 2 new fields to the Click-N-Ship form. So I added those fields to the contrib:

• Updated admin/includes/module/usps_autofill_button.php to include support for 2 new fields on the USPS.com website:
o Get Tracking updates (checkbox)
o Email field for Get Tracking updates
Now you can set a default email address for automatic tracking updates that will email you when a package is delivered.
• Updated usps.sql file to include new fields.
• No other files were changed. If upgrading from v1.2, simply use the new module file and run the sql.

I've uploaded the file to the downloads section. Might take some time for the admins to authorize it.

26 Mar 2008, 6:52 PM
#248
coop1979 avatar

coop1979

New Zenner

Join Date:
May 2006
Location:
Columbia, SC
Posts:
26
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

I've got a problem where if a customer pays with PayPal Express Checkout, everything is fine and all of their shipping information passes through to USPS correctly, but if someone pays using a Credit Card with Website Payments Pro, none of the shipping information transfers to USPS.

Any ideas?

27 Mar 2008, 1:45 AM
#249
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

Coop1979:

I've got a problem where if a customer pays with PayPal Express Checkout, everything is fine and all of their shipping information passes through to USPS correctly, but if someone pays using a Credit Card with Website Payments Pro, none of the shipping information transfers to USPS.

Any ideas?

Do you offer any other payment types? do they work ok? USPS mod shouldn't be affected by the payment method, but I don't use Paypal Pro... What happens when you click the usps button with these orders?

27 Mar 2008, 3:00 AM
#250
coop1979 avatar

coop1979

New Zenner

Join Date:
May 2006
Location:
Columbia, SC
Posts:
26
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

i use paypal express checkout, google checkout, standard paypal, and website payments pro. i haven't tested it on google checkout yet, bit with wpp it just fills the store address info but leaves the customer fields blank.

27 Mar 2008, 3:09 AM
#251
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

Coop1979:

i use paypal express checkout, google checkout, standard paypal, and website payments pro. i haven't tested it on google checkout yet, bit with wpp it just fills the store address info but leaves the customer fields blank.

Does the Zen-Cart order view show all the info tho? I'm wondering if the WPP uses a separate address location than the ORDERS table, but that would be strange. Unfortunately I don't have a WPP account. Any chance you can set up temporary backend access for me to take a look.

27 Mar 2008, 6:15 AM
#252
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

Coop1979:

i use paypal express checkout, google checkout, standard paypal, and website payments pro. i haven't tested it on google checkout yet, bit with wpp it just fills the store address info but leaves the customer fields blank.

That sounds really weird to me since all the information for the shipping address should be in your database unless you are bypassing the checkout_shipping page like PayPal Express wants to do or your customer is not logged in to your site in order to make a purchase. You might want to rethink your checkout procedure.

27 Mar 2008, 10:55 AM
#253
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

mauryg:

That sounds really weird to me since all the information for the shipping address should be in your database unless you are bypassing the checkout_shipping page like PayPal Express wants to do or your customer is not logged in to your site in order to make a purchase. You might want to rethink your checkout procedure.

But I thought zen-cart also stored a copy of the address locally on the way back... but yea if there is no shipping address in the database, then usps contrib won't be able to find it.

18 Apr 2008, 11:56 AM
#254
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: usps.com Click-n-ship AutoFill Button Contrib

ANy Chance this could work for UPS?

18 Apr 2008, 12:01 PM
#255
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

webskipper:

ANy Chance this could work for UPS?

I have been unable to get it to work with UPS. I had a partial one working for FedEx but I'm told they changed their form now so I haven't checked the new one yet.

19 Apr 2008, 4:49 AM
#256
linksys avatar

linksys

New Zenner

Join Date:
Nov 2006
Posts:
30
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

Anybody has problem with USPS autofill lately? Looks like they changed the label form validation which broke my autofill. After I click the auto fill button in ZenCart: the USPS site gives me this error:

Internal Error : We've experienced an unexpected condition.
Error Tracking Number : 1208580274849

Manually filling on their site works fine. I guess they are adding more field validation now and the autofill form I use misses some field values? :blink:

19 Apr 2008, 4:55 AM
#257
kehrli avatar

kehrli

Zen Follower

Join Date:
Aug 2007
Location:
Cannon Beach, OR
Posts:
180
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

I had the same error. It started today. My autofill module has been working fine for many months. I upgraded to the latest version of the AutoFill module just now, and the problem went away.

I like it when problems go away... :smile:

19 Apr 2008, 6:36 AM
#258
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

linksys:

Anybody has problem with USPS autofill lately? Looks like they changed the label form validation which broke my autofill. After I click the auto fill button in ZenCart: the USPS site gives me this error:

Internal Error : We've experienced an unexpected condition.
Error Tracking Number : 1208580274849

Manually filling on their site works fine. I guess they are adding more field validation now and the autofill form I use misses some field values? :blink:

I am having the same problem but unfortunately upgrading the module has not solved the error and it is still not working. I am on 1.3.7.1 zencart and I used the upgrade from the 1.3.7 folder of the download. Any ideas?? Doing it manually is such a pain!!

19 Apr 2008, 8:03 AM
#259
kehrli avatar

kehrli

Zen Follower

Join Date:
Aug 2007
Location:
Cannon Beach, OR
Posts:
180
Plugin Contributions:
0

Re: usps.com Click-n-ship AutoFill Button Contrib

I take it back. I'm still having trouble with mine too. When I reinstalled I just hit an address for testing and go to the first page without generating the error. All of my address data and the recipient's data showed up in the correct boxes. But I didn't go past the first page. When I do try to go on, I just get a page that says "Error" in the upper left corner in an otherwise blank page. (not the most informative error message I've ever seen). So I'm not resolved either.

I suspect that USPS has made some changes to their software. I hope the author of the module is able to fix it. I've really come to rely on it.

19 Apr 2008, 11:00 AM
#260
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: usps.com Click-n-ship AutoFill Button Contrib

I'm looking at it now.