Code:
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';
Bookmarks