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 161 to 180 of 827
20 Apr 2007, 17:09
#161
qhome avatar

qhome

Totally Zenned

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

usps.com Click-n-ship AutoFill Button Contrib

NEW VERSION: v1.1 (FINAL)

  • Added ‘total’ as an option for Default insurance value and Default International Contents value.
  • Finally figured out how to make the backend calculate the total order weight, including attributes. This removes the need for modifying the classes/order.php file to get the weight during checkout.
  • Added BONUS STUFF which includes:
  • Super_Orders 2.0 + USPS Autofill integration
  • Super_Orders 2.0 + USPS Autofill integration + Info At a Glance
  • Normal Orders.php + USPS Autofill integration + Info At a Glance

2 files that changed since v1.0 were:

  • usps-v1.1.sql file
  • admin\includes\functions\extra_functions\functions_ordertotalweight.php file

Install the sql patch file and replace your existing function file.

This should cover all requests and bugs now, so there may not be a need for any more changes for a while.

Enjoy!
Qhome

21 Apr 2007, 09:27
#162
ladysaat avatar

ladysaat

Zen Follower

Join Date:
May 2006
Location:
Anywhere USMC points
Posts:
330
Plugin Contributions:
0

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

Okay I'm having SQL issues LOL. I got the Alternate one to install w/out an error. It says it processed 8 statements. then when I go to the configure section in my admin, I have only one thing showing which is return: full name.

The files are in the right place. I'm not sure what to do?

EDIT: NM! I ran the SQL thingy twice more and now the stuff is there. So should be fine :P.

23 Apr 2007, 15:49
#163
tcustomgolf avatar

tcustomgolf

Inactive

Join Date:
Dec 2005
Location:
NY
Posts:
162
Plugin Contributions:
0

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

Qhome...just went from 0.4 to 1.1 and noticed when I click the USPS button, my return address in the usps form displays the \ in my company name as: Tony's Custom Golf. It is written in the config without the \ of course.

For 0.4 to 1.1, I just ran the SQL file and re-uploaded the functions _ordertotalweight.php file and the usps_autofill_button.php file.

Anything else need to be done to orders .php or am I missing something else? You may want to test yourself with an apostrophe in the co. name to see if you get the same results.

23 Apr 2007, 20:46
#164
qhome avatar

qhome

Totally Zenned

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

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

tcustomgolf:

Qhome...just went from 0.4 to 1.1 and noticed when I click the USPS button, my return address in the usps form displays the \ in my company name as: Tony's Custom Golf. It is written in the config without the \ of course.

For 0.4 to 1.1, I just ran the SQL file and re-uploaded the functions _ordertotalweight.php file and the usps_autofill_button.php file.

Anything else need to be done to orders .php or am I missing something else? You may want to test yourself with an apostrophe in the co. name to see if you get the same results.

AH yes.. I added addslashes() to the results because I was calling php from within javascript. Now that I am using normal html to call the php, they are adding unnecessary slashes.

Its a quick fix, so I'll upload a patch when i get home today.
Thanks!
Q

23 Apr 2007, 23:40
#165
qhome avatar

qhome

Totally Zenned

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

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

PATCH to remove the slashes from names with apostrophes '

overwrite your admin/includes/modules/usps_autofill_button.php

24 Apr 2007, 16:34
#166
buzzville avatar

buzzville

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

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

I tried running installing both sql files a couple of times, but am still getting this error:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'total' or 'subtotal' if you want to use that order value for the declaration val' at line 1
in:
[INSERT INTO configuration VALUES ('', 'Return: Full Name', 'USPS_RETURN_FULLNAME', '', 'Set this to your return address Full Name', last_insert_id(), '5', now(), now(), NULL, NULL), ('', 'Return: Company Name', 'USPS_RETURN_COMPANY_NAME', '', 'Set this to your return address Company Name', last_insert_id(), '10', now(), now(), NULL, NULL), ('', 'Return: Address 1', 'USPS_RETURN_ADDRESSONE', '', 'Set this to your return address street 1', last_insert_id(), '15', now(), now(), NULL, NULL), ('', 'Return: Address 2', 'USPS_RETURN_ADDRESSTWO', '', 'Set this to your return address street 2', last_insert_id(), '20', now(), now(), NULL, NULL), ('', 'Return: City', 'USPS_RETURN_CITY', '', 'Set this to your return address city', last_insert_id(), '25', now(), now(), NULL, NULL), ('', 'Return: State', 'USPS_RETURN_STATE', '', 'Set this to your return address state. NOTE: THIS MUST BE IN A 2 LETTER ABBREVIATED FORMAT (i.e. AZ, KY, MI)', last_insert_id(), '30', now(), now(), NULL, NULL), ('', 'Return: ZipCode', 'USPS_RETURN_ZIPCODE', '', 'Set this to your return address zipcode', last_insert_id(), '35', now(), now(), NULL, NULL), ('', 'Return: Phone Number', 'USPS_RETURN_PHONENUMBER', '', 'Set this to your company phone number for International Shipping. (no dashes: 4041234567)', last_insert_id(), '40', now(), now(), NULL, NULL), ('', 'Delivery: Default Notify via Email', 'USPS_DELIVERY_DEFAULT_EMAIL_NOTIFY', 'true', 'Set this to true if you want the Notify By Email checkbox checked by default', last_insert_id(), '45', now(), now(), NULL, "zen_cfg_select_option(array('true', 'false'),"), ('', 'Delivery: Default Contents Value', 'USPS_DELIVERY_DEFAULT_CONTENTS_VALUE', '10.00', 'Set this to 'total' or 'subtotal' if you want to use that order value for the declaration value, or set this to a price if you want a default contents value for International shipping, or leave blank to not use it', last_insert_id(), '50', now(), now(), NULL, NULL), ('', 'Delivery: Default Weight (Pounds)', 'USPS_DELIVERY_DEFAULT_WEIGHTS_POUNDS', '1', 'Set this to the default weight in pounds. Useful if you sell only one type of item. Leave blank if using the order total weight', last_insert_id(), '55', now(), now(), NULL, NULL), ('', 'Delivery: Default Weight (Ounces)', 'USPS_DELIVERY_DEFAULT_WEIGHTS_OUNCES', '', 'Set this to the default weight in ounces. Useful if you sell only one type of item. Leave blank if using the order total weight', last_insert_id(), '60', now(), now(), NULL, NULL), ('', 'Delivery: Default Shipping from Same ZipCode (Radio Button)', 'USPS_DELIVERY_SAME_ZIPCODE', 'same', 'Set this to same if you want to have your Return Address Zipcode as the default Ship-From zipcode. If set to Other, then enter in your default Ship-From zipcode in the next setting', last_insert_id(), '65', now(), now(), NULL, "zen_cfg_select_option(array('same', 'other'),"), ('', 'Delivery: Default Shipping from Other ZipCode (If Radio Button set to Other)', 'USPS_DELIVERY_OTHER_ZIPCODE', '00000', 'Set the default ZipCode you would like as your Ship-From zipcode. Only if the above setting is set to Other', last_insert_id(), '70', now(), now(), NULL, NULL), ('', 'Delivery: Default Insurance Value', 'USPS_DELIVERY_INSURANCE_VALUE', '', 'Set to 'total' or 'subtotal' if you want to use that order value for all packages, or set to a price (i.e. 5.25) if you want to use a preset price. Or leave blank to not use it', last_insert_id(), '75', now(), now(), NULL, NULL), ('', 'Delivery: Default Non-Delivery Checkbox (Return-to-Sender)', 'USPS_DELIVERY_DEFAULT_NONDELIVERY', 'Y', 'Set this to Y if you want the checkbox for Return-To-Sender to be checked by default (International Packages Only)', last_insert_id(), '80', now(), now(), NULL, "zen_cfg_select_option(array('N', 'Y'),"), ('', 'Delivery: Default Privacy Acknowledge Checkbox', 'USPS_DELIVERY_DEFAULT_ACKNOWLEDGE', 'on', 'Set this to on if you want the Acknowledge checkbox to be checked by default (International Packages Only)', last_insert_id(), '85', now(), now(), NULL, "zen_cfg_select_option(array('off', 'on'),");]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Any suggestions? Thanks!

24 Apr 2007, 17:04
#167
qhome avatar

qhome

Totally Zenned

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

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

Try thisL

DELETE FROM configuration_group WHERE configuration_group_title LIKE '%USPS Auto-Fill Config%';
DELETE FROM configuration WHERE configuration_key LIKE 'USPS_RETURN%' LIMIT 8;
DELETE FROM configuration WHERE configuration_key LIKE 'USPS_DELIVERY%' LIMIT 9;
INSERT INTO configuration_group VALUES ('', 'USPS Auto-Fill Config', 'USPS Auto-Fill Config', '1', '1');
SELECT @gid := configuration_group_id 
FROM configuration_group where configuration_group_title LIKE '%USPS Auto-Fill Config%';
UPDATE configuration_group SET sort_order = @gid WHERE configuration_group_id = @gid;
INSERT INTO configuration VALUES ('', 'Return: Full Name', 'USPS_RETURN_FULLNAME', '', 'Set this to your return address Full Name', @gid, '5', now(), now(), NULL, NULL),
                                 ('', 'Return: Company Name', 'USPS_RETURN_COMPANY_NAME', '', 'Set this to your return address Company Name', @gid, '10', now(), now(), NULL, NULL),
                                 ('', 'Return: Address 1', 'USPS_RETURN_ADDRESSONE', '', 'Set this to your return address street 1', @gid, '15', now(), now(), NULL, NULL),
                                 ('', 'Return: Address 2', 'USPS_RETURN_ADDRESSTWO', '', 'Set this to your return address street 2', @gid, '20', now(), now(), NULL, NULL),
                                 ('', 'Return: City', 'USPS_RETURN_CITY', '', 'Set this to your return address city', @gid, '25', now(), now(), NULL, NULL),
                                 ('', 'Return: State', 'USPS_RETURN_STATE', '', 'Set this to your return address state. NOTE: THIS MUST BE IN A 2 LETTER ABBREVIATED FORMAT (i.e. AZ, KY, MI)', @gid, '30', now(), now(), NULL, NULL),
                                 ('', 'Return: ZipCode', 'USPS_RETURN_ZIPCODE', '', 'Set this to your return address zipcode', @gid, '35', now(), now(), NULL, NULL),
                                 ('', 'Return: Phone Number', 'USPS_RETURN_PHONENUMBER', '', 'Set this to your company phone number for International Shipping. (no dashes: 4041234567)', @gid, '40', now(), now(), NULL, NULL),
                                 ('', 'Delivery: Default Notify via Email', 'USPS_DELIVERY_DEFAULT_EMAIL_NOTIFY', 'true', 'Set this to true if you want the Notify By Email checkbox checked by default', @gid, '45', now(), now(), NULL, "zen_cfg_select_option(array('true', 'false'),"),
                                 ('', 'Delivery: Default Contents Value', 'USPS_DELIVERY_DEFAULT_CONTENTS_VALUE', '10.00', 'Set this to total or subtotal if you want to use that order value for the declaration value, or set this to a price if you want a default contents value for International shipping, or leave blank to not use it', @gid, '50', now(), now(), NULL, NULL),
                                 ('', 'Delivery: Default Weight (Pounds)', 'USPS_DELIVERY_DEFAULT_WEIGHTS_POUNDS', '1', 'Set this to the default weight in pounds. Useful if you sell only one type of item. Leave blank if using the order total weight', @gid, '55', now(), now(), NULL, NULL),
                                 ('', 'Delivery: Default Weight (Ounces)', 'USPS_DELIVERY_DEFAULT_WEIGHTS_OUNCES', '', 'Set this to the default weight in ounces. Useful if you sell only one type of item. Leave blank if using the order total weight', @gid, '60', now(), now(), NULL, NULL),
                                 ('', 'Delivery: Default Shipping from Same ZipCode (Radio Button)', 'USPS_DELIVERY_SAME_ZIPCODE', 'same', 'Set this to same if you want to have your Return Address Zipcode as the default Ship-From zipcode. If set to Other, then enter in your default Ship-From zipcode in the next setting', @gid, '65', now(), now(), NULL, "zen_cfg_select_option(array('same', 'other'),"),
                                 ('', 'Delivery: Default Shipping from Other ZipCode (If Radio Button set to Other)', 'USPS_DELIVERY_OTHER_ZIPCODE', '00000', 'Set the default ZipCode you would like as your Ship-From zipcode. Only if the above setting is set to Other', @gid, '70', now(), now(), NULL, NULL),
                                 ('', 'Delivery: Default Insurance Value', 'USPS_DELIVERY_INSURANCE_VALUE', '', 'Set to total or subtotal if you want to use that order value for the insurance value, or set to a price (i.e. 5.25) if you want to use a preset price. Or leave blank to not use it', @gid, '75', now(), now(), NULL, NULL),
                                 ('', 'Delivery: Default Non-Delivery Checkbox (Return-to-Sender)', 'USPS_DELIVERY_DEFAULT_NONDELIVERY', 'Y', 'Set this to Y if you want the checkbox for Return-To-Sender to be checked by default (International Packages Only)', @gid, '80', now(), now(), NULL, "zen_cfg_select_option(array('N', 'Y'),"),
                                 ('', 'Delivery: Default Privacy Acknowledge Checkbox', 'USPS_DELIVERY_DEFAULT_ACKNOWLEDGE', 'on', 'Set this to on if you want the Acknowledge checkbox to be checked by default (International Packages Only)', @gid, '85', now(), now(), NULL, "zen_cfg_select_option(array('off', 'on'),");
ALTER TABLE `orders` DROP `total_weight`;
ALTER TABLE `orders` ADD `total_weight` FLOAT NOT NULL DEFAULT '-1';
24 Apr 2007, 18:09
#168
buzzville avatar

buzzville

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

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

that seems to have done the trick! Thanks so much!

24 Apr 2007, 19:17
#169
ladysaat avatar

ladysaat

Zen Follower

Join Date:
May 2006
Location:
Anywhere USMC points
Posts:
330
Plugin Contributions:
0

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

Hey guys, I have this mod, haven't installed it yet as I just read the thread about the USPS rates changing in May and the carts are erroring now because USPS changed something.

Are you guys experiencing errors using USPS? how about with this mod?

24 Apr 2007, 19:22
#170
qhome avatar

qhome

Totally Zenned

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

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

ladysaat:

Hey guys, I have this mod, haven't installed it yet as I just read the thread about the USPS rates changing in May and the carts are erroring now because USPS changed something.

Are you guys experiencing errors using USPS? how about with this mod?

My mod is fullproof! :P (says me!)

This mod won't have any problems with the rate changes. The rates have already changed once since my first alpha version.

The only thing that would break it is if they redesigned the address form, and I'd be quick to fix it :)

Be sure to get the latest version from the Downloads area:
http://tinyurl.com/2vyo6c

24 Apr 2007, 19:25
#171
ladysaat avatar

ladysaat

Zen Follower

Join Date:
May 2006
Location:
Anywhere USMC points
Posts:
330
Plugin Contributions:
0

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

aha says grasshoppah!!!

(getting latest version now :P )

25 Apr 2007, 14:43
#172
linksys avatar

linksys

New Zenner

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

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

So if they'd change the address form to be like UPS, will you still be able to "be quick to fix it"? :wink:

Seriously, is UPS' address form workable?

qhome:

The only thing that would break it is if they redesigned the address form, and I'd be quick to fix it :)

25 Apr 2007, 15:49
#173
qhome avatar

qhome

Totally Zenned

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

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

linksys:

So if they'd change the address form to be like UPS, will you still be able to "be quick to fix it"? :wink:

Seriously, is UPS' address form workable?

I'm taking a look at it... and there are parts that look like they might be hackable... but then im not so sure... I will see what can be done... but lets hope that usps doesn't update like UPS :P

For the fun of it, I'm looking at FedEx too... that one appears even easier than USPS. but it requires that you log in first it seems

25 Apr 2007, 18:00
#174
qhome avatar

qhome

Totally Zenned

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

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

qhome:

For the fun of it, I'm looking at FedEx too... that one appears even easier than USPS. but it requires that you log in first it seems

Well, in my initial testing, it does appear to be possible. It seems that you do have to be logged in, otherwise it resets the form when it reloads it. But you can log into FedEx and check the "Remember me on this computer" box and you shouldn't have that problem after that.

Does anyone have a use for it? I can reuse much of the usps stuff it seems... perhaps this will give more experience to try to figure out the UPS one too

26 Apr 2007, 14:51
#175
linksys avatar

linksys

New Zenner

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

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

That sounds great! I don't use Fedex but that's definitely a plus to this mod.

qhome:

Well, in my initial testing, it does appear to be possible. It seems that you do have to be logged in, otherwise it resets the form when it reloads it. But you can log into FedEx and check the "Remember me on this computer" box and you shouldn't have that problem after that.

Does anyone have a use for it? I can reuse much of the usps stuff it seems... perhaps this will give more experience to try to figure out the UPS one too

29 Apr 2007, 19:02
#176
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

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

I use FedEx all the time.. just don't use IE.. but if you implement FedEx into this I may have to switch back strictly for the store :)

29 Apr 2007, 20:25
#177
qhome avatar

qhome

Totally Zenned

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

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

samad64:

I use FedEx all the time.. just don't use IE.. but if you implement FedEx into this I may have to switch back strictly for the store :)

Ya IE dependency is not a requirement.. my early tests worked with IE6/7 FF 2.0 and Opera 9.x

30 Apr 2007, 03:56
#178
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

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

qhome:

Ya IE dependency is not a requirement.. my early tests worked with IE6/7 FF 2.0 and Opera 9.x

Ah.. I figured that since USPS Auto Fill requires it the FedEx one would too :P

EDIT: dang.. i haven't messed with this mod in a while. latest version does work with firefox :D thanks qhome!

30 Apr 2007, 10:48
#179
qhome avatar

qhome

Totally Zenned

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

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

samad64:

Ah.. I figured that since USPS Auto Fill requires it the FedEx one would too :P

EDIT: dang.. i haven't messed with this mod in a while. latest version does work with firefox :D thanks qhome!

Yep FF support is here and its not goin anywhere. And I even tried to get the usps paypal one to work again..

I might not be able to do that one tho.. but I might have a 3rd party automated scripting tool that Im working on that might support everything if I do it right.

03 May 2007, 03:43
#180
sbross avatar

sbross

New Zenner

Join Date:
Feb 2007
Posts:
64
Plugin Contributions:
0

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

I have the same problem that buzzville had with both sql files. I tried to copy an paste the code you gave to fix it and I still get some errors.

Scott