Looked at the USPS mod a bit closer and stripped out what is not needed to just give me the total weight on the order page. Works like a charm. Hit me up if you want to do the same thing.
Modified my orders.php with just this code from the USPS mod orders.php
<?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 <==== ?>
Uploaded the two needed files in corresponding directory
functions_ordertotalweight.php
usps_autofill_button.php
Executed the following SQL:
SET @gid=0;
SELECT @gid:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title LIKE '%USPS Auto-Fill Config%'
LIMIT 1;
DELETE FROM configuration_group WHERE configuration_group_title LIKE '%USPS Auto-Fill Config%';
DELETE FROM configuration_group WHERE configuration_group_title LIKE '%USPS AutoFill%';
DELETE FROM configuration_group WHERE configuration_group_title LIKE '%USPS AutoFill Config%';
DELETE FROM admin_pages WHERE page_key='uspsautofill';
DELETE FROM configuration WHERE configuration_key LIKE 'USPS_RETURN%' LIMIT 8;
DELETE FROM configuration WHERE configuration_key LIKE 'USPS_DELIVERY%' LIMIT 9;
#ok until here 8 statements processed
# Insert New USPS AutoFill Configuration Group
INSERT INTO configuration_group VALUES ('', 'USPS AutoFill', 'USPS AutoFill Config', '1', '1');
SET @gid=last_insert_id();
UPDATE configuration_group SET sort_order = @gid WHERE configuration_group_id = @gid;
#ok until here 3 statements processed
INSERT INTO configuration VALUES (NULL, 'Delivery: Default Weight (Pounds)', 'USPS_DELIVERY_DEFAULT_WEIGHTS_POUNDS', '', '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),
(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),
(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'),"),
(NULL, 'Delivery: Default Shipping from Other ZipCode (If Radio Button set to Other)', 'USPS_DELIVERY_OTHER_ZIPCODE', '', '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),
(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);
ALTER TABLE orders DROP total_weight;
ALTER TABLE orders ADD total_weight FLOAT NOT NULL DEFAULT '-1';
#Below seems not needed for my weight total mod only
# Register the pages for Admin Access Control
#DELETE FROM admin_pages WHERE page_key='uspsautofill';
#INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order ) VALUES ('uspsautofill','BOX_CONFIGURATION_USPS_AUTOFILL','FILENAME_CONFIGURATION','1',' configuration','Y','1');
#UPDATE admin_pages SET sort_order = (SELECT configuration_group_id FROM configuration_group WHERE configuration_group_title = 'USPS AutoFill') WHERE page_key = 'uspsautofill';
#UPDATE admin_pages SET page_params = CONCAT('gID=',(SELECT configuration_group_id FROM configuration_group WHERE configuration_group_title = 'USPS AutoFill')) WHERE page_key = 'uspsautofill';
That was it. Maybe not an elegant solution but it works for me.
Bookmarks