Hi,

I have zc 150 with a few admin mods installed. I transferred the php files with filezilla as usual with no hiccups but when I tried to copy & paste the dbscript sql file into the admin I got an warning error message saying it could not be installed. I am no sql guru but here is what I tried. Any help will be appreciated. Thanks.





-- DROP TABLE IF EXISTS `subcontractors`;

CREATE TABLE `subcontractors` (
`subcontractors_id` int(10) unsigned NOT NULL auto_increment,
`short_name` varchar(20) NOT NULL default '',
`full_name` varchar(100) NOT NULL default '',
`street1` varchar(100) NOT NULL default '',
`city` varchar(255) NOT NULL default '',
`state` varchar(255) NOT NULL default '',
`zip` varchar(10) NOT NULL default '',
`email_address` varchar(100) NOT NULL default '',
`telephone` varchar(32) NOT NULL default '',
`contact_person` varchar(100) NOT NULL default '',
PRIMARY KEY (`subcontractors_id`)
) TYPE=MyISAM COMMENT='subcontractors' AUTO_INCREMENT=0;

INSERT INTO subcontractors VALUES (0, 'ownstock', 'Own stock', 'Street','City','State','ZIP','[email protected]','telephone','contact name');

UPDATE subcontractors SET subcontractors_id=0 where short_name='ownstock';

ALTER TABLE `orders_products`
ADD `po_sent` char(1) NOT NULL default '0',
ADD `po_number` int(20),
ADD `po_sent_to_subcontractor` int(10),
ADD `po_date` DATE,
ADD `item_shipped` CHAR(1) NOT NULL default '0';

ALTER TABLE `products`
ADD `default_subcontractor` int(10) NOT NULL default '0';

SET @poid=9999;
SELECT (@poid:=configuration_group_id) as poid
FROM configuration_group
WHERE configuration_group_title= 'Purchase Orders';
DELETE FROM configuration WHERE configuration_group_id = @poid;
DELETE FROM configuration_group WHERE configuration_group_id = @poid;

INSERT INTO configuration_group VALUES ('', 'Purchase Orders', 'Purchase Order Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @poid=9999;
SELECT (@poid:=configuration_group_id) as poid
FROM configuration_group
WHERE configuration_group_title= 'Purchase Orders';

DELETE FROM configuration WHERE configuration_key='PO_OWN_STOCK_EMAIL';
DELETE FROM configuration WHERE configuration_key='PO_NOTIFY';
DELETE FROM configuration WHERE configuration_key='PO_SUBJECT';

INSERT INTO configuration VALUES ('','PO - send packing lists', 'PO_SEND_PACKING_LISTS', '1', '0 - never, 1 - always, 2 - sometimes (default yes), 3 - sometimes (default no)', @poid, 101, now(), now(), NULL, NULL),
('','PO - notify customer', 'PO_NOTIFY', '1', '0 - no customer notification of PO updates, 1 - notify customer', @poid, 102, now(), now(), NULL, NULL),
('','PO - subject', 'PO_SUBJECT', '{contact_person}: New order (#{po_number}) for {full_name}', 'Subject of PO emails, {po_number} will be replaced with the actual number', @poid, 103, now(), now(), NULL, NULL),
('','PO - from email name', 'PO_FROM_EMAIL_NAME', 'PurchaseOrderManager', 'The FROM email NAME for sent Purchase Orders', @poid, 104, now(), now(), NULL, NULL),
('','PO - from email address', 'PO_FROM_EMAIL_ADDRESS', '[email protected]', 'The FROM email ADDRESS for sent Purchase Orders', @poid, 105, now(), now(), NULL, NULL),
('','PO - sent comments', 'PO_SENT_COMMENTS', 'Order Submitted to Shipping Department for Fulfillment', 'Comments added to the account when submitted to subcontractor', @poid, 106, now(), now(), NULL, NULL),
('','PO - full ship comments', 'PO_FULLSHIP_COMMENTS', 'Thanks for your order!', 'Comments added to the account when the order has shipped in full', @poid, 107, now(), now(), NULL, NULL),
('','PO - partial ship comments', 'PO_PARTIALSHIP_COMMENTS', 'Part of your order has shipped! The rest of your order will ship soon. You will be notified by email when your order is complete.', 'Comments added to the account when part of the order has shipped', @poid, 108, now(), now(), NULL, NULL),
('','PO - full ship packinglist', 'PO_FULLSHIP_PACKINGLIST', 'Thanks for your order!', 'Comments added to the packing list when the order has shipped in full', @poid, 109, now(), now(), NULL, NULL),
('','PO - partial ship packinglist', 'PO_PARTIALSHIP_PACKINGLIST', 'This is a partial shipment. The rest of your order has shipped or will ship separately.', 'Comments added to the packing list when part of the order has shipped', @poid, 110, now(), now(), NULL, NULL),
('','PO - packinglist filename', 'PO_PACKINGLIST_FILENAME', 'packinglist.pdf', 'packing list filename', @poid, 111, now(), now(), NULL, NULL),
('','PO - omit from unknown email 1', 'PO_UNKNOWN_OMIT1', '\nIf you would prefer to enter tracking information for this order\ndirectly, please visit:\n', 'Text to omit from emails sent for unknown customers 1 of 3', @poid, 112, now(), now(), NULL, NULL),
('','PO - omit from unknown email 2', 'PO_UNKNOWN_OMIT2', '{delivery_name}\n', 'Text to omit from emails sent for unknown customers 2 of 3', @poid, 113, now(), now(), NULL, NULL),
('','PO - omit from unknown email 3', 'PO_UNKNOWN_OMIT3', '', 'Text to omit from emails sent for unknown customers 3 of 3', @poid, 114, now(), now(), NULL, NULL),
('','PO - change shipping from', 'PO_CHANGE_SHIPPING_FROM', '', 'Change this shipping option to something else on POs and Packing Lists', @poid, 115, now(), now(), NULL, NULL),
('','PO - change shipping to', 'PO_CHANGE_SHIPPING_TO', 'Cheapest', 'Value to change shipping option to on POs and Packing Lists', @poid, 116, now(), now(), NULL, NULL);

INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order )
VALUES
('dropshipsendpos','BOX_CUSTOMERS_SEND_POS','FILENAME_SEND_POS',CONCAT('gID=',@c gi), 'customers', 'Y', @cgi),
('dropshipsendposnc','BOX_CUSTOMERS_SEND_POS_NC','FILENAME_SEND_POS_NC',CONCAT(' gID=',@cgi), 'customers', 'Y', @cgi),
('dropshipconftrack','BOX_CUSTOMERS_CONFIRM_TRACKING','FILENAME_CONFIRM_TRACKING ',CONCAT('gID=',@cgi), 'customers', 'Y', @cgi),
('dropshipeditsubs','BOX_TOOLS_EDIT_SUBCONTRACTORS','FILENAME_SUBCONTRACTORS',CO NCAT('gID=',@cgi), 'tools', 'Y', @cgi),
('dropshipsetsubs','BOX_TOOLS_SET_SUBCONTRACTORS','FILENAME_SET_SUBCONTRACTORS', CONCAT('gID=',@cgi), 'tools', 'Y', @cgi);