ok, that is the part that is hard to explain. I didn't really make a query. I modified the tables I exported from zen cart. I made sure I added the "Drop Table" and had "Complete Inserts" marked before I exported the tables I needed.
So I knew what the format was to look like, I created a test account and that was exported along with the data. I then copied and pasted the data from those same tables from osc onto the zen carts. Example below is from test account using Customer table.
OSC cusomters table with info...
Code:
[DROP TABLE IF EXISTS `customers`;
CREATE TABLE `customers` (
`customers_id` int(11) NOT NULL auto_increment,
`customers_gender` char(1) NOT NULL default '',
`customers_firstname` varchar(32) NOT NULL default '',
`customers_lastname` varchar(32) NOT NULL default '',
`customers_dob` datetime NOT NULL default '0000-00-00 00:00:00',
`customers_email_address` varchar(96) NOT NULL default '',
`customers_default_address_id` int(11) default NULL,
`customers_telephone` varchar(32) NOT NULL default '',
`customers_fax` varchar(32) default NULL,
`customers_password` varchar(40) NOT NULL default '',
`customers_newsletter` char(1) default NULL,
`customers_group_id` smallint(5) unsigned NOT NULL default '0',
`customers_group_ra` enum('0','1') NOT NULL default '0',
`customers_payment_allowed` varchar(255) NOT NULL default '',
`customers_shipment_allowed` varchar(255) NOT NULL default '',
PRIMARY KEY (`customers_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=250;
INSERT INTO `customers` (`customers_id`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`, `customers_group_id`, `customers_group_ra`, `customers_payment_allowed`, `customers_shipment_allowed`) VALUES(2, 'f', 'demo', 'Jones', '1975-03-11 00:00:00', '[email protected]', 2, '207-232-0707', '', 'b9c7617f9b1eb80665c2c73ed2edfafa:4c', '1', 0, '0', '', '');
Zen's cusomter table with info:
Code:
DROP TABLE IF EXISTS `zen_customers`;
CREATE TABLE `zen_customers` (
`customers_id` int(11) NOT NULL auto_increment,
`customers_gender` char(1) NOT NULL default '',
`customers_firstname` varchar(32) NOT NULL default '',
`customers_lastname` varchar(32) NOT NULL default '',
`customers_dob` datetime NOT NULL default '0001-01-01 00:00:00',
`customers_email_address` varchar(96) NOT NULL default '',
`customers_nick` varchar(96) NOT NULL default '',
`customers_default_address_id` int(11) NOT NULL default '0',
`customers_telephone` varchar(32) NOT NULL default '',
`customers_fax` varchar(32) default NULL,
`customers_password` varchar(40) NOT NULL default '',
`customers_newsletter` char(1) default NULL,
`customers_group_pricing` int(11) NOT NULL default '0',
`customers_email_format` varchar(4) NOT NULL default 'TEXT',
`customers_authorization` int(1) NOT NULL default '0',
`customers_referral` varchar(32) NOT NULL default '',
`customers_paypal_payerid` varchar(20) NOT NULL default '',
`customers_paypal_ec` tinyint(1) unsigned NOT NULL default '0',
`customers_tax_exempt` varchar(32) default NULL,
PRIMARY KEY (`customers_id`),
KEY `idx_email_address_zen` (`customers_email_address`),
KEY `idx_referral_zen` (`customers_referral`(10)),
KEY `idx_grp_pricing_zen` (`customers_group_pricing`),
KEY `idx_nick_zen` (`customers_nick`),
KEY `idx_newsletter_zen` (`customers_newsletter`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=256 ;
INSERT INTO `zen_customers` (`customers_id`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_nick`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`, `customers_group_pricing`, `customers_email_format`, `customers_authorization`, `customers_referral`, `customers_paypal_payerid`, `customers_paypal_ec`, `customers_tax_exempt`) VALUES(20, 'm', 'Demo', 'Account', '1964-04-06 00:00:00', [email protected]', '', 20, '', '', '377bad57f53fb42e65077000be1e1c23:6b', '1', 0, 'HTML', 0, '', '', 0, NULL);
What I did was take the following from the osc table:
Code:
INSERT INTO `customers` (`customers_id`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`, `customers_group_id`, `customers_group_ra`, `customers_payment_allowed`, `customers_shipment_allowed`) VALUES(2, 'f', 'demo', 'Jones', '1975-03-11 00:00:00', '[email protected]', 2, '207-232-0707', '', 'b9c7617f9b1eb80665c2c73ed2edfafa:4c', '1', 0, '0', '', '');
and paste it under the data from the zen table so it looked like this:
Code:
INSERT INTO `zen_customers` (`customers_id`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_nick`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`, `customers_group_pricing`, `customers_email_format`, `customers_authorization`, `customers_referral`, `customers_paypal_payerid`, `customers_paypal_ec`, `customers_tax_exempt`) VALUES(20, 'm', 'Demo', 'Account', '1964-04-06 00:00:00', [email protected]', '', 20, '', '', '377bad57f53fb42e65077000be1e1c23:6b', '1', 0, 'HTML', 0, '', '', 0, NULL);
INSERT INTO `customers` (`customers_id`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`, `customers_group_id`, `customers_group_ra`, `customers_payment_allowed`, `customers_shipment_allowed`) VALUES(2, 'f', 'demo', 'Jones', '1975-03-11 00:00:00', '[email protected]', 2, '207-232-0707', '', 'b9c7617f9b1eb80665c2c73ed2edfafa:4c', '1', 0, '0', '', '');
I then modified the data from the osc to match the zen data just above it. Took me a few tries to get it to match. Then once it was done I uploaded that sql file. I dropped the customers table and rebuilt it and inserted all my new data, (customers).
I had to do this on all the address book and customer tables. Took awhile, but in the end it all worked out.
Hope this helps and good luck.