Page 15 of 83 FirstFirst ... 513141516172565 ... LastLast
Results 141 to 150 of 827
  1. #141
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

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

    ah... nm I see where I was confused. zone_code has the value. That worked for USA packages. a few kinks to iron out in the international half. but looks promising! :)

  2. #142
    Join Date
    Nov 2006
    Posts
    30
    Plugin Contributions
    0

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

    I used ($order_check->fields['zone_code']) and the state dropdown fills up all fine. Again for international provinces the worst case is to put all of them in a PHP array. Congrats to your upcoming version!

  3. #143
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

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

    I would really like to have htis otion put on my site. if you can tellme exactly how to do it. I went to the admins/orders.php and i dont see anywhere to load or paste. HELP!! My site designers have no idea how to do this.


    Quote Originally Posted by qhome View Post
    USPS.com Click-N-Ship Auto-Fill for Zen-Cart
    Version: v0.1
    Date: 12-Sep-2006
    Designed for: Zen Cart v1.3.x (may also work on 1.2.x)

    This contrib adds a simple, yet highly advanced javscript button to your Admin->Orders page that can automatically take the Shipping Address of that customer and pre-fill the Click-N-Ship form at www.usps.com. A few other people have made previous attempts at this and have failed. This one, however, is working perfectly.

    Unlike some other attempts at this, you do not have to be initially logged into your usps.com account to use this. You can complete the form process and the usps.com website will keep the label when it asks you to log in.

    This contrib is also completely modular. There is only a one-line change to the
    admin/orders.php file to require the module file. And it works with both Domestic and International, Everytime!

    Works on all major browsers.

    let me know if you have any problems.

    Enjoy!

  4. #144
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

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

    OK i got it!

    I had to add some logic to the queries, as your setup would only work if they were from USA. So now I do a Country query first. If they are from USA, I run the query with the state/zone_code, if not, I run the old query since there would be no matching zone for a province (which is what the state field becomes if you are from another country).

    I added the GetCountry function as a PHP function now, I had to make an array of all the countries, which is how I had to do the old javascript one anyway (i just copied the html source and split on the html code snippet delimiters )

    I suppose I could add the GetState as a php function and save myself from having the logic on the queries, but I don't know that either way really matters more than the other. As long as it works, and it works good :)

    I've got it working with all countries now, and I've rewritten a bit of the code. I'm going to look at adding APO address support if its easy enough and I hope to have a new version within the week.

    Thanks again lnksys for your help and for all those who help test it and enjoy it.

    :)
    Last edited by qhome; 12 Apr 2007 at 12:46 AM.

  5. #145
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

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

    Quote Originally Posted by jijizworld.com View Post
    I would really like to have htis otion put on my site. if you can tellme exactly how to do it. I went to the admins/orders.php and i dont see anywhere to load or paste. HELP!! My site designers have no idea how to do this.
    If you don't have any modifications to your existing orders.php file, then just rename it and upload the one I included. There is no need to modify unless you have your own custom changes.

  6. #146
    Join Date
    Nov 2006
    Posts
    30
    Plugin Contributions
    0

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

    That's great qhome. Thanks for your prompt work. Actually I had a little more in my change - I always fill the USPS shipping reference number with the order number - you might want to incorporate that when rewriting the code?

    Quote Originally Posted by qhome View Post
    OK i got it!

    I had to add some logic to the queries, as your setup would only work if they were from USA. So now I do a Country query first. If they are from USA, I run the query with the state/zone_code, if not, I run the old query since there would be no matching zone for a province (which is what the state field becomes if you are from another country).

    I added the GetCountry function as a PHP function now, I had to make an array of all the countries, which is how I had to do the old javascript one anyway (i just copied the html source and split on the html code snippet delimiters )

    I suppose I could add the GetState as a php function and save myself from having the logic on the queries, but I don't know that either way really matters more than the other. As long as it works, and it works good :)

    I've got it working with all countries now, and I've rewritten a bit of the code. I'm going to look at adding APO address support if its easy enough and I hope to have a new version within the week.

    Thanks again lnksys for your help and for all those who help test it and enjoy it.

    :)

  7. #147
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

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

    i am still not understanding how to do this. Do you have a walk thru for dummies course?

    Quote Originally Posted by qhome View Post
    If you don't have any modifications to your existing orders.php file, then just rename it and upload the one I included. There is no need to modify unless you have your own custom changes.

  8. #148
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

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

    Quote Originally Posted by jijizworld.com View Post
    i am still not understanding how to do this. Do you have a walk thru for dummies course?
    I thought I made the readme file pretty easy. Just upload files, and install the sql. Thats it.

  9. #149
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

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

    Quote Originally Posted by linksys View Post
    That's great qhome. Thanks for your prompt work. Actually I had a little more in my change - I always fill the USPS shipping reference number with the order number - you might want to incorporate that when rewriting the code?
    Heh actually that was supposed to go in with v0.4 version.. i just forgot it. But yea its there now. thx

  10. #150
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

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

    NEW VERSION 1.0 !!!


    Updates:

    If upgrading from v0.4, you only need to copy the
    admin/includes/modules/usps_autofill_button.php
    thats the only changed file since v0.4.


    • Firefox (and other browsers) now supported! Thanks to zen-cart member linksys for helping me set the code up in a more proper way with native html instead of putting it all as javascript, the contrib works with all browsers now.
    • Added feature to use the order_id as the usps reference number field for the order. It will auto-populate now (no config changes)
    • Rewrote/Cleaned up code to check the logic before running unnecessary functions (total_weight function won’t run if using fixed weight, subtotal query won’t run unless using the value for declaration/insurance. Removed some excess javascript code now that much of it is done with server-side php
    • Attempted to cleanup the readme file to make it easier to read/understand.


    Thanks to linksys' tips, I realize now that I could have been using HTML for the form the whole time and use javascript for submitting the form. So thats what I did, thus making it super compatible with most browsers. I've tested it with quite a few more browsers now as well.

    Enjoy and let me know if you have any problems.
    (Note that v1.0 is for zc 1.3.7 only)

    I've attached a copy here until the download page approves the new version.
    Last edited by qhome; 9 Apr 2008 at 03:37 AM.

 

 
Page 15 of 83 FirstFirst ... 513141516172565 ... LastLast

Similar Threads

  1. v139h Fill the total_weight table without having to click on the USPS click-in-Ship Mod
    By bradlawson25 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 4 Dec 2013, 06:11 PM
  2. Replies: 1
    Last Post: 11 Jun 2010, 05:46 PM
  3. autoclick usps click-n-ship button missing?
    By fattyfat in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 24 Sep 2009, 02:52 AM
  4. usps.com Click-n-ship AutoFill stopped working?
    By EZorb in forum Addon Shipping Modules
    Replies: 1
    Last Post: 12 Jul 2009, 09:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR