fjelsten Posted October 18, 2005 Posted October 18, 2005 I have recently installed 2.2 MS2 and some contributions[1], though I cannot see that they are relevant. The DB is a transfer from 2.1 CVS (I think). Everything appears to be running fine - except that new accounts are messed up. I can make a new account without problems (seen from the user's side) but if I check the account from the admin site I get: Warning: reset(): Passed variable is not an array or object in /home2/dktechge/public_html/catalog/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home2/dktechge/public_html/catalog/admin/includes/classes/object_info.php on line 18 And the Customer details page comes up as empty, though the country is Afghanistan (which was not the original country). Does anybody have any idea? Thanks very much in advance. ---- [1] Quick stock update, Low stock products report, Back-ordered products reports, and a couple of shipping modules and a bank transfer payment module. None of these should com into play at creating an account, right?
Guest Posted October 18, 2005 Posted October 18, 2005 You have incomplete customer data - look for a customer in the customers table that does not have a corresponding address_book entry :-" Matti
fjelsten Posted October 18, 2005 Author Posted October 18, 2005 You have incomplete customer data - look for a customer in the customers table that does not have a corresponding address_book entry :-" Thank you for your help. I know that the data is missing (verified in the DB) - my question is why is it missing? Why is no address added on saving a new customer? Thanks in advance.
Jan Zonjee Posted October 18, 2005 Posted October 18, 2005 I know that the data is missing (verified in the DB) - my question is why is it missing? Why is no address added on saving a new customer? Maybe the fix mentioned here helps.
fjelsten Posted October 18, 2005 Author Posted October 18, 2005 Maybe the fix mentioned here helps. I tried this but of this fix is more than just editing those lines in database.php - well, then it did not help. Any other suggestions?
fjelsten Posted October 19, 2005 Author Posted October 19, 2005 OK, if nobody has any suggestion, maybe somebody can tell me what to look for? I know little about these things but for customers to be unable to make accounts and sunsequently buy stuff from my shop, well that is probably not the best state for a business...
Guest Posted October 19, 2005 Posted October 19, 2005 The DB is a transfer from 2.1 CVS (I think). You must update your database to MS2 - because your original is CVS you will need to do this manually by comparing the two. Matti
fjelsten Posted October 19, 2005 Author Posted October 19, 2005 You must update your database to MS2 - because your original is CVS you will need to do this manually by comparing the two. Thank you very much. I will try this later. Is there somewhere I can see a list of database changes?
fjelsten Posted October 19, 2005 Author Posted October 19, 2005 Looking through the database, it seems like customers_newsletter is not set on new accounts - it's NULL The structure of the Customers table is exactly like the PDF with the table stucture that came with OSC (in /DOCS directory)
fjelsten Posted October 19, 2005 Author Posted October 19, 2005 You have incomplete customer data - look for a customer in the customers table that does not have a corresponding address_book entry :-" Actually I have just verified that there was address book entries in the DB for the problem customers! Also, I have changed the database so it's like MS2, but still it's the same.
Jan Zonjee Posted October 19, 2005 Posted October 19, 2005 Peter, My guess is that it goes wrong in this piece of code: default: $customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'"); $customers = tep_db_fetch_array($customers_query); $cInfo = new objectInfo($customers); Perhaps if you try to do that query in phpMyAdmin, say with customers_id 33, you will get an error or some other indication that will tell you what exactly goes wrong. If I'm right, it will not return anything or give an error. select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from customers c left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '33';
fjelsten Posted October 19, 2005 Author Posted October 19, 2005 Perhaps if you try to do that query in phpMyAdmin, say with customers_id 33, you will get an error or some other indication that will tell you what exactly goes wrong. If I'm right, it will not return anything or give an error. I get an empty result - nothing is returned. Any idea where to progress from here? Thanks for your help.
Guest Posted October 20, 2005 Posted October 20, 2005 Looking through the database, it seems like customers_newsletter is not set on new accounts - it's NULL The structure of the Customers table is exactly like the PDF with the table stucture that came with OSC (in /DOCS directory) How about the address_book table? - address_book_id should be auto_increment - this is different from both 2.1 and MS1 Matti
fjelsten Posted October 20, 2005 Author Posted October 20, 2005 How about the address_book table? - address_book_id should be auto_increment - this is different from both 2.1 and MS1 Yepeeeeeeee! This worked! Thank you so much. Now for the small complaint: this information is not visible in the database diagram under /DOCS - I think it may a good idea to include this info. Now I will need to check the rest of the database for these discrepancies. Does anyone have a link to a database diagram with this information? Thank you again!
fjelsten Posted October 20, 2005 Author Posted October 20, 2005 Now I will need to check the rest of the database for these discrepancies. Does anyone have a link to a database diagram with this information? Apparently this does not exist? This makes it very hard upgrading! Anyway in trying to get the database up MS22 speed I removed some fields and now when I try to view orders I get: 1054 - Unknown column 'customers_company' in 'field list' select customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from orders where orders_id = '908' When I look at the supplied documents for the MS22 database there isn't supposed to be a customers_company in the order table Is the documentation wrong?
Jan Zonjee Posted October 20, 2005 Posted October 20, 2005 When I look at the supplied documents for the MS22 database there isn't supposed to be a customers_company in the order table Is the documentation wrong? Guess so, this is the sql for the table orders: CREATE TABLE `orders` ( `orders_id` int(11) NOT NULL auto_increment, `customers_id` int(11) NOT NULL default '0', `customers_name` varchar(64) NOT NULL default '', `customers_company` varchar(32) default NULL, `customers_street_address` varchar(64) NOT NULL default '', `customers_suburb` varchar(32) default NULL, `customers_city` varchar(32) NOT NULL default '', `customers_postcode` varchar(10) NOT NULL default '', `customers_state` varchar(32) default NULL, `customers_country` varchar(32) NOT NULL default '', `customers_telephone` varchar(32) NOT NULL default '', `customers_email_address` varchar(96) NOT NULL default '', `customers_address_format_id` int(5) NOT NULL default '0', `delivery_name` varchar(64) NOT NULL default '', `delivery_company` varchar(32) default NULL, `delivery_street_address` varchar(64) NOT NULL default '', `delivery_suburb` varchar(32) default NULL, `delivery_city` varchar(32) NOT NULL default '', `delivery_postcode` varchar(10) NOT NULL default '', `delivery_state` varchar(32) default NULL, `delivery_country` varchar(32) NOT NULL default '', `delivery_address_format_id` int(5) NOT NULL default '0', `billing_name` varchar(64) NOT NULL default '', `billing_company` varchar(32) default NULL, `billing_street_address` varchar(64) NOT NULL default '', `billing_suburb` varchar(32) default NULL, `billing_city` varchar(32) NOT NULL default '', `billing_postcode` varchar(10) NOT NULL default '', `billing_state` varchar(32) default NULL, `billing_country` varchar(32) NOT NULL default '', `billing_address_format_id` int(5) NOT NULL default '0', `payment_method` varchar(32) NOT NULL default '', `cc_type` varchar(20) default NULL, `cc_owner` varchar(64) default NULL, `cc_number` varchar(32) default NULL, `cc_expires` varchar(4) default NULL, `last_modified` datetime default NULL, `date_purchased` datetime default NULL, `orders_status` int(5) NOT NULL default '0', `orders_date_finished` datetime default NULL, `currency` char(3) default NULL, `currency_value` decimal(14,6) default NULL, PRIMARY KEY (`orders_id`) ) TYPE=MyISAM;
fjelsten Posted October 21, 2005 Author Posted October 21, 2005 Thank you. Do you know if a complete list is available anywhere?
Jan Zonjee Posted October 21, 2005 Posted October 21, 2005 Thank you. Do you know if a complete list is available anywhere? If you have downloaded osCommerce 2.2MS2 you will find in the folder catalog a folder called install. The file oscommerce.sql in there has the complete description of tables and fields.
fjelsten Posted December 11, 2005 Author Posted December 11, 2005 I am sorry to ressurrect this old thread but it seems by problems are not completely over. I updated the DB the best I could and all went swell until some old customers started complaining that they got the following error on ordering: 1054 - Unknown column 'global_product_notifications' in 'field list' select global_product_notifications from customers_info where customers_info_id = '24' [TEP STOP] I messed a bit more with the DB. Now when I edit some customers from the admin site, I get: Warning: reset(): Passed variable is not an array or object in /home2/dktechge/public_html/catalog/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home2/dktechge/public_html/catalog/admin/includes/classes/object_info.php on line 18 From what I can see I need to update some of the old data but I cannot find the problem. Please see the query below: SELECT `customers`.`customers_id`, `address_book`.`address_book_id`, `customers_info`.`customers_info_date_of_last_logon`, `customers_info`.`customers_info_number_of_logons`, `customers`.`customers_newsletter`, `customers_info`.`global_product_notifications`, `customers_info`.`customers_info_date_account_last_modified`, `customers_info`.`customers_info_date_account_created` FROM `customers` INNER JOIN `address_book` ON (`customers`.`customers_id` = `address_book`.`customers_id`) INNER JOIN `customers_info` ON (`address_book`.`customers_id` = `customers_info`.`customers_info_id`) WHERE (`customers`.`customers_lastname` = "Fjelsten") ORDER BY `customers`.`customers_id` customers_id, address_book_id, customers_info_date_of_last_logon, customers_info_number_of_logons, customers_newsletter, global_product_notifications, customers_info_date_account_last_modified, customers_info_date_account_created 2 1 06-12-2005 14:33 84 1 1 25-06-2003 10:18 28-03-2003 22:35 2 2 06-12-2005 14:33 84 1 1 25-06-2003 10:18 28-03-2003 22:35 2 3 06-12-2005 14:33 84 1 1 25-06-2003 10:18 28-03-2003 22:35 2 4 06-12-2005 14:33 84 1 1 25-06-2003 10:18 28-03-2003 22:35 2 5 06-12-2005 14:33 84 1 1 25-06-2003 10:18 28-03-2003 22:35 460 8 06-12-2005 16:39 1 1 21-10-2005 01:25 470 22 06-12-2005 16:38 1 0 06-12-2005 16:15 Clicking Edit in Admin under Customers works for customer_id 2 and 470 but not for 460. I get the "Warning: reset():" error mentioned above. I simply do not get it. Customer 2 and 460 was made before upgrading to MS2, 470 after. Can anybody help me - just anything is helpful, I'm completely stuck! My DB structure for reference: -- phpMyAdmin SQL Dump -- version 2.6.1-pl2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 11, 2005 at 08:54 AM -- Server version: 4.0.25 -- PHP Version: 4.3.11 -- -- -------------------------------------------------------- -- -- Table structure for table `address_book` -- CREATE TABLE `address_book` ( `customers_id` int(5) NOT NULL default '0', `address_book_id` int(11) NOT NULL auto_increment, `entry_gender` char(1) NOT NULL default '', `entry_company` varchar(32) default NULL, `entry_firstname` varchar(32) NOT NULL default '', `entry_lastname` varchar(32) NOT NULL default '', `entry_street_address` varchar(64) NOT NULL default '', `entry_suburb` varchar(32) default NULL, `entry_postcode` varchar(10) NOT NULL default '', `entry_city` varchar(32) NOT NULL default '', `entry_state` varchar(32) default NULL, `entry_country_id` int(5) NOT NULL default '0', `entry_zone_id` int(5) NOT NULL default '0', PRIMARY KEY (`address_book_id`,`customers_id`) ) TYPE=MyISAM AUTO_INCREMENT=25; -- -------------------------------------------------------- -- -- Table structure for table `address_format` -- CREATE TABLE `address_format` ( `address_format_id` int(5) NOT NULL auto_increment, `address_format` varchar(128) NOT NULL default '', `address_summary` varchar(48) NOT NULL default '', PRIMARY KEY (`address_format_id`) ) TYPE=MyISAM AUTO_INCREMENT=6; -- -------------------------------------------------------- -- -- Table structure for table `banners` -- CREATE TABLE `banners` ( `banners_id` int(11) NOT NULL auto_increment, `banners_title` varchar(64) NOT NULL default '', `banners_url` varchar(255) NOT NULL default '', `banners_image` varchar(64) NOT NULL default '', `banners_group` varchar(10) NOT NULL default '', `banners_html_text` text, `expires_impressions` int(7) default '0', `expires_date` datetime default NULL, `date_scheduled` datetime default NULL, `date_added` datetime NOT NULL default '0000-00-00 00:00:00', `date_status_change` datetime default NULL, `status` int(1) NOT NULL default '1', PRIMARY KEY (`banners_id`) ) TYPE=MyISAM AUTO_INCREMENT=1; -- -------------------------------------------------------- -- -- Table structure for table `banners_history` -- CREATE TABLE `banners_history` ( `banners_history_id` int(11) NOT NULL auto_increment, `banners_id` int(11) NOT NULL default '0', `banners_shown` int(5) NOT NULL default '0', `banners_clicked` int(5) NOT NULL default '0', `banners_history_date` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`banners_history_id`) ) TYPE=MyISAM AUTO_INCREMENT=1; -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE `categories` ( `categories_id` int(11) NOT NULL auto_increment, `categories_image` varchar(64) default NULL, `parent_id` int(11) NOT NULL default '0', `sort_order` int(3) default NULL, `date_added` datetime default NULL, `last_modified` datetime default NULL, PRIMARY KEY (`categories_id`), KEY `idx_categories_parent_id` (`parent_id`) ) TYPE=MyISAM AUTO_INCREMENT=57; -- -------------------------------------------------------- -- -- Table structure for table `categories_description` -- CREATE TABLE `categories_description` ( `categories_id` int(11) NOT NULL default '0', `language_id` int(11) NOT NULL default '1', `categories_name` varchar(32) NOT NULL default '', PRIMARY KEY (`categories_id`,`language_id`), KEY `idx_categories_name` (`categories_name`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `configuration` -- CREATE TABLE `configuration` ( `configuration_id` int(11) NOT NULL auto_increment, `configuration_title` varchar(64) NOT NULL default '', `configuration_key` varchar(64) NOT NULL default '', `configuration_value` varchar(255) NOT NULL default '', `configuration_description` varchar(255) NOT NULL default '', `configuration_group_id` int(11) NOT NULL default '0', `sort_order` int(5) default NULL, `last_modified` datetime default NULL, `date_added` datetime NOT NULL default '0000-00-00 00:00:00', `use_function` varchar(255) default NULL, `set_function` varchar(255) default NULL, PRIMARY KEY (`configuration_id`) ) TYPE=MyISAM AUTO_INCREMENT=232; -- -------------------------------------------------------- -- -- Table structure for table `configuration_group` -- CREATE TABLE `configuration_group` ( `configuration_group_id` int(11) NOT NULL auto_increment, `configuration_group_title` varchar(64) NOT NULL default '', `configuration_group_description` varchar(255) NOT NULL default '', `sort_order` int(5) default NULL, `visible` int(1) default '1', PRIMARY KEY (`configuration_group_id`) ) TYPE=MyISAM AUTO_INCREMENT=16; -- -------------------------------------------------------- -- -- Table structure for table `counter` -- CREATE TABLE `counter` ( `startdate` char(8) default NULL, `counter` int(12) default NULL ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `counter_history` -- CREATE TABLE `counter_history` ( `month` char(8) default NULL, `counter` int(12) default NULL ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `countries` -- CREATE TABLE `countries` ( `countries_id` int(5) NOT NULL auto_increment, `countries_name` varchar(64) NOT NULL default '', `countries_iso_code_2` char(2) NOT NULL default '', `countries_iso_code_3` char(3) NOT NULL default '', `address_format_id` int(5) NOT NULL default '0', PRIMARY KEY (`countries_id`), KEY `IDX_COUNTRIES_NAME` (`countries_name`) ) TYPE=MyISAM AUTO_INCREMENT=240; -- -------------------------------------------------------- -- -- Table structure for table `currencies` -- CREATE TABLE `currencies` ( `currencies_id` int(11) NOT NULL auto_increment, `title` varchar(32) NOT NULL default '', `code` char(3) NOT NULL default '', `symbol_left` varchar(12) default NULL, `symbol_right` varchar(12) default NULL, `decimal_point` char(1) default NULL, `thousands_point` char(1) default NULL, `decimal_places` char(1) default NULL, `value` float(13,8) default NULL, `last_updated` datetime default NULL, PRIMARY KEY (`currencies_id`) ) TYPE=MyISAM AUTO_INCREMENT=7; -- -------------------------------------------------------- -- -- Table structure for table `customers` -- CREATE TABLE `customers` ( `customers_id` int(5) 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(5) NOT NULL default '1', `customers_telephone` varchar(32) NOT NULL default '', `customers_fax` varchar(32) default NULL, `customers_password` varchar(40) NOT NULL default '', `customers_newsletter` char(1) NOT NULL default '0', PRIMARY KEY (`customers_id`) ) TYPE=MyISAM AUTO_INCREMENT=472; -- -------------------------------------------------------- -- -- Table structure for table `customers_basket` -- CREATE TABLE `customers_basket` ( `customers_basket_id` int(5) NOT NULL auto_increment, `customers_id` int(5) NOT NULL default '0', `products_id` tinytext NOT NULL, `customers_basket_quantity` int(2) NOT NULL default '0', `final_price` decimal(8,2) NOT NULL default '0.00', `customers_basket_date_added` varchar(8) default NULL, PRIMARY KEY (`customers_basket_id`) ) TYPE=MyISAM AUTO_INCREMENT=1730; -- -------------------------------------------------------- -- -- Table structure for table `customers_basket_attributes` -- CREATE TABLE `customers_basket_attributes` ( `customers_basket_attributes_id` int(5) NOT NULL auto_increment, `customers_id` int(5) NOT NULL default '0', `products_id` tinytext NOT NULL, `products_options_id` int(5) NOT NULL default '0', `products_options_value_id` int(5) NOT NULL default '0', PRIMARY KEY (`customers_basket_attributes_id`) ) TYPE=MyISAM AUTO_INCREMENT=360; -- -------------------------------------------------------- -- -- Table structure for table `customers_info` -- CREATE TABLE `customers_info` ( `customers_info_id` int(5) NOT NULL default '0', `customers_info_date_of_last_logon` datetime default NULL, `customers_info_number_of_logons` int(5) default NULL, `customers_info_date_account_created` datetime default NULL, `customers_info_date_account_last_modified` datetime default NULL, `global_product_notifications` int(1) default '0', PRIMARY KEY (`customers_info_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `geo_zones` -- CREATE TABLE `geo_zones` ( `geo_zone_id` int(5) NOT NULL auto_increment, `geo_zone_name` varchar(32) NOT NULL default '', `geo_zone_description` varchar(255) NOT NULL default '', `last_modified` datetime default NULL, `date_added` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`geo_zone_id`) ) TYPE=MyISAM AUTO_INCREMENT=5; -- -------------------------------------------------------- -- -- Table structure for table `gp_country_to_postal` -- CREATE TABLE `gp_country_to_postal` ( `gp_country` char(2) NOT NULL default '', `gp_postal_reference` int(11) NOT NULL default '0', PRIMARY KEY (`gp_country`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `gp_postal_to_weight` -- CREATE TABLE `gp_postal_to_weight` ( `gp_postal_reference` int(11) NOT NULL default '0', `gp_from_postal` varchar(10) NOT NULL default '', `gp_to_postal` varchar(10) NOT NULL default '', `gp_weight_ref` char(3) NOT NULL default '', PRIMARY KEY (`gp_postal_reference`,`gp_from_postal`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `gp_weight` -- CREATE TABLE `gp_weight` ( `gp_weight_ref` char(3) NOT NULL default '', `gp_weight_price_string` text NOT NULL, `gp_free_shipping_over` decimal(15,4) NOT NULL default '-1.0000', `gp_shipping_subsidized` decimal(15,4) NOT NULL default '-1.0000', PRIMARY KEY (`gp_weight_ref`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `languages` -- CREATE TABLE `languages` ( `languages_id` int(5) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `code` char(2) NOT NULL default '', `image` varchar(64) default NULL, `directory` varchar(32) default NULL, `sort_order` int(3) default NULL, PRIMARY KEY (`languages_id`), KEY `IDX_LANGUAGES_NAME` (`name`) ) TYPE=MyISAM AUTO_INCREMENT=6; -- -------------------------------------------------------- -- -- Table structure for table `manufacturers` -- CREATE TABLE `manufacturers` ( `manufacturers_id` int(11) NOT NULL auto_increment, `manufacturers_name` varchar(32) NOT NULL default '', `manufacturers_image` varchar(64) default NULL, `date_added` datetime default NULL, `last_modified` datetime default NULL, PRIMARY KEY (`manufacturers_id`), KEY `IDX_MANUFACTURERS_NAME` (`manufacturers_name`) ) TYPE=MyISAM AUTO_INCREMENT=35; -- -------------------------------------------------------- -- -- Table structure for table `manufacturers_info` -- CREATE TABLE `manufacturers_info` ( `manufacturers_id` int(11) NOT NULL default '0', `languages_id` int(11) NOT NULL default '0', `manufacturers_url` varchar(255) NOT NULL default '', `url_clicked` int(5) NOT NULL default '0', `date_last_click` datetime default NULL, PRIMARY KEY (`manufacturers_id`,`languages_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `newsletters` -- CREATE TABLE `newsletters` ( `newsletters_id` int(11) NOT NULL auto_increment, `title` varchar(255) NOT NULL default '', `content` text NOT NULL, `module` varchar(255) NOT NULL default '', `date_added` datetime NOT NULL default '0000-00-00 00:00:00', `date_sent` datetime default NULL, `status` int(1) default NULL, `locked` int(1) default '0', PRIMARY KEY (`newsletters_id`) ) TYPE=MyISAM AUTO_INCREMENT=11; -- -------------------------------------------------------- -- -- Table structure for table `orders` -- CREATE TABLE `orders` ( `orders_id` int(11) NOT NULL auto_increment, `customers_id` int(11) NOT NULL default '0', `customers_name` varchar(64) NOT NULL default '', `customers_company` varchar(32) default NULL, `customers_street_address` varchar(64) NOT NULL default '', `customers_suburb` varchar(32) default NULL, `customers_city` varchar(32) NOT NULL default '', `customers_postcode` varchar(10) NOT NULL default '', `customers_state` varchar(32) default NULL, `customers_country` varchar(32) NOT NULL default '', `customers_telephone` varchar(32) NOT NULL default '', `customers_email_address` varchar(96) NOT NULL default '', `customers_address_format_id` int(5) NOT NULL default '0', `delivery_name` varchar(64) NOT NULL default '', `delivery_company` varchar(32) default NULL, `delivery_street_address` varchar(64) NOT NULL default '', `delivery_suburb` varchar(32) default NULL, `delivery_city` varchar(32) NOT NULL default '', `delivery_postcode` varchar(10) NOT NULL default '', `delivery_state` varchar(32) default NULL, `delivery_country` varchar(32) NOT NULL default '', `delivery_address_format_id` int(5) NOT NULL default '0', `billing_name` varchar(64) NOT NULL default '', `billing_company` varchar(32) default NULL, `billing_street_address` varchar(64) NOT NULL default '', `billing_suburb` varchar(32) default NULL, `billing_city` varchar(32) NOT NULL default '', `billing_postcode` varchar(10) NOT NULL default '', `billing_state` varchar(32) default NULL, `billing_country` varchar(32) NOT NULL default '', `billing_address_format_id` int(5) NOT NULL default '0', `payment_method` varchar(32) NOT NULL default '', `cc_type` varchar(20) default NULL, `cc_owner` varchar(64) default NULL, `cc_number` varchar(32) default NULL, `cc_expires` varchar(4) default NULL, `last_modified` datetime default NULL, `date_purchased` datetime default NULL, `orders_status` int(5) NOT NULL default '0', `orders_date_finished` datetime default NULL, `currency` char(3) default NULL, `currency_value` decimal(14,6) default NULL, PRIMARY KEY (`orders_id`) ) TYPE=MyISAM AUTO_INCREMENT=924; -- -------------------------------------------------------- -- -- Table structure for table `orders_products` -- CREATE TABLE `orders_products` ( `orders_products_id` int(11) NOT NULL auto_increment, `orders_id` int(11) NOT NULL default '0', `products_id` int(11) NOT NULL default '0', `products_model` varchar(12) default NULL, `products_name` varchar(64) NOT NULL default '', `products_price` decimal(15,4) NOT NULL default '0.0000', `final_price` decimal(15,4) NOT NULL default '0.0000', `products_tax` decimal(7,4) NOT NULL default '0.0000', `products_quantity` int(2) NOT NULL default '0', PRIMARY KEY (`orders_products_id`) ) TYPE=MyISAM AUTO_INCREMENT=1026; -- -------------------------------------------------------- -- -- Table structure for table `orders_products_attributes` -- CREATE TABLE `orders_products_attributes` ( `orders_products_attributes_id` int(5) NOT NULL auto_increment, `orders_id` int(5) NOT NULL default '0', `orders_products_id` int(5) NOT NULL default '0', `products_options` varchar(32) NOT NULL default '', `products_options_values` varchar(32) NOT NULL default '', `options_values_price` decimal(10,2) NOT NULL default '0.00', `price_prefix` char(1) NOT NULL default '', PRIMARY KEY (`orders_products_attributes_id`) ) TYPE=MyISAM AUTO_INCREMENT=202; -- -------------------------------------------------------- -- -- Table structure for table `orders_products_download` -- CREATE TABLE `orders_products_download` ( `orders_products_download_id` int(11) NOT NULL auto_increment, `orders_id` int(11) NOT NULL default '0', `orders_products_id` int(11) NOT NULL default '0', `orders_products_filename` varchar(255) NOT NULL default '', `download_maxdays` int(2) NOT NULL default '0', `download_count` int(2) NOT NULL default '0', PRIMARY KEY (`orders_products_download_id`) ) TYPE=MyISAM AUTO_INCREMENT=1; -- -------------------------------------------------------- -- -- Table structure for table `orders_status` -- CREATE TABLE `orders_status` ( `orders_status_id` int(5) NOT NULL default '0', `language_id` int(5) NOT NULL default '1', `orders_status_name` varchar(50) NOT NULL default '', PRIMARY KEY (`orders_status_id`,`language_id`), KEY `idx_orders_status_name` (`orders_status_name`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `orders_status_history` -- CREATE TABLE `orders_status_history` ( `orders_status_history_id` int(11) NOT NULL auto_increment, `orders_id` int(11) NOT NULL default '0', `orders_status_id` int(5) NOT NULL default '0', `date_added` datetime NOT NULL default '0000-00-00 00:00:00', `customer_notified` int(1) default '0', `comments` text, PRIMARY KEY (`orders_status_history_id`) ) TYPE=MyISAM AUTO_INCREMENT=2037; -- -------------------------------------------------------- -- -- Table structure for table `orders_total` -- CREATE TABLE `orders_total` ( `orders_total_id` int(10) unsigned NOT NULL auto_increment, `orders_id` int(11) NOT NULL default '0', `title` varchar(255) NOT NULL default '', `text` varchar(255) NOT NULL default '', `value` decimal(15,4) NOT NULL default '0.0000', `class` varchar(32) NOT NULL default '', `sort_order` int(11) NOT NULL default '0', PRIMARY KEY (`orders_total_id`), KEY `idx_orders_total_orders_id` (`orders_id`) ) TYPE=MyISAM AUTO_INCREMENT=1596; -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `products_id` int(11) NOT NULL auto_increment, `products_quantity` int(4) NOT NULL default '0', `products_model` varchar(15) default NULL, `products_image` varchar(64) default NULL, `products_price` decimal(15,4) NOT NULL default '0.0000', `products_date_added` datetime NOT NULL default '0000-00-00 00:00:00', `products_last_modified` datetime default NULL, `products_date_available` datetime default NULL, `products_weight` decimal(5,2) NOT NULL default '0.00', `products_status` tinyint(1) NOT NULL default '0', `products_tax_class_id` int(11) NOT NULL default '0', `manufacturers_id` int(11) default NULL, `products_ordered` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`), KEY `idx_products_date_added` (`products_date_added`) ) TYPE=MyISAM AUTO_INCREMENT=149; -- -------------------------------------------------------- -- -- Table structure for table `products_attributes` -- CREATE TABLE `products_attributes` ( `products_attributes_id` int(11) NOT NULL auto_increment, `products_id` int(11) NOT NULL default '0', `options_id` int(11) NOT NULL default '0', `options_values_id` int(11) NOT NULL default '0', `options_values_price` decimal(15,4) NOT NULL default '0.0000', `price_prefix` char(1) NOT NULL default '', PRIMARY KEY (`products_attributes_id`) ) TYPE=MyISAM AUTO_INCREMENT=111; -- -------------------------------------------------------- -- -- Table structure for table `products_attributes_download` -- CREATE TABLE `products_attributes_download` ( `products_attributes_id` int(11) NOT NULL default '0', `products_attributes_filename` varchar(255) NOT NULL default '', `products_attributes_maxdays` int(2) default '0', `products_attributes_maxcount` int(2) default '0', PRIMARY KEY (`products_attributes_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `products_description` -- CREATE TABLE `products_description` ( `products_id` int(11) NOT NULL auto_increment, `language_id` int(11) NOT NULL default '1', `products_name` varchar(64) NOT NULL default '', `products_description` text, `products_url` varchar(255) default NULL, `products_viewed` int(5) default '0', PRIMARY KEY (`products_id`,`language_id`), KEY `products_name` (`products_name`) ) TYPE=MyISAM AUTO_INCREMENT=149; -- -------------------------------------------------------- -- -- Table structure for table `products_notifications` -- CREATE TABLE `products_notifications` ( `products_id` int(11) NOT NULL default '0', `customers_id` int(11) NOT NULL default '0', `date_added` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`products_id`,`customers_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `products_options` -- CREATE TABLE `products_options` ( `products_options_id` int(11) NOT NULL default '0', `language_id` int(11) NOT NULL default '1', `products_options_name` varchar(32) NOT NULL default '', PRIMARY KEY (`products_options_id`,`language_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `products_options_values` -- CREATE TABLE `products_options_values` ( `products_options_values_id` int(11) NOT NULL default '0', `language_id` int(11) NOT NULL default '1', `products_options_values_name` varchar(64) NOT NULL default '', PRIMARY KEY (`products_options_values_id`,`language_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `products_options_values_to_products_options` -- CREATE TABLE `products_options_values_to_products_options` ( `products_options_values_to_products_options_id` int(11) NOT NULL auto_increment, `products_options_id` int(11) NOT NULL default '0', `products_options_values_id` int(11) NOT NULL default '0', PRIMARY KEY (`products_options_values_to_products_options_id`) ) TYPE=MyISAM AUTO_INCREMENT=48; -- -------------------------------------------------------- -- -- Table structure for table `products_to_categories` -- CREATE TABLE `products_to_categories` ( `products_id` int(11) NOT NULL default '0', `categories_id` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`,`categories_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `reviews` -- CREATE TABLE `reviews` ( `reviews_id` int(11) NOT NULL auto_increment, `products_id` int(11) NOT NULL default '0', `customers_id` int(11) default NULL, `customers_name` varchar(64) NOT NULL default '', `reviews_rating` int(1) default NULL, `date_added` datetime default NULL, `last_modified` datetime default NULL, `reviews_read` int(5) NOT NULL default '0', PRIMARY KEY (`reviews_id`) ) TYPE=MyISAM AUTO_INCREMENT=1; -- -------------------------------------------------------- -- -- Table structure for table `reviews_description` -- CREATE TABLE `reviews_description` ( `reviews_id` int(11) NOT NULL default '0', `languages_id` int(11) NOT NULL default '0', `reviews_text` text NOT NULL, PRIMARY KEY (`reviews_id`,`languages_id`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `sessions` -- CREATE TABLE `sessions` ( `sesskey` varchar(32) NOT NULL default '', `expiry` int(11) unsigned NOT NULL default '0', `value` text NOT NULL, PRIMARY KEY (`sesskey`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `specials` -- CREATE TABLE `specials` ( `specials_id` int(11) NOT NULL auto_increment, `products_id` int(11) NOT NULL default '0', `specials_new_products_price` decimal(15,4) NOT NULL default '0.0000', `specials_date_added` datetime default NULL, `specials_last_modified` datetime default NULL, `expires_date` datetime default NULL, `date_status_change` datetime default NULL, `status` int(1) NOT NULL default '1', PRIMARY KEY (`specials_id`) ) TYPE=MyISAM AUTO_INCREMENT=29; -- -------------------------------------------------------- -- -- Table structure for table `tax_class` -- CREATE TABLE `tax_class` ( `tax_class_id` int(11) NOT NULL auto_increment, `tax_class_title` varchar(32) NOT NULL default '', `tax_class_description` varchar(255) NOT NULL default '', `last_modified` datetime default NULL, `date_added` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`tax_class_id`) ) TYPE=MyISAM AUTO_INCREMENT=4; -- -------------------------------------------------------- -- -- Table structure for table `tax_rates` -- CREATE TABLE `tax_rates` ( `tax_rates_id` int(5) NOT NULL auto_increment, `tax_zone_id` int(5) NOT NULL default '0', `tax_class_id` int(5) NOT NULL default '0', `tax_priority` int(5) default '1', `tax_rate` decimal(9,4) NOT NULL default '0.0000', `tax_description` varchar(255) NOT NULL default '', `last_modified` datetime default NULL, `date_added` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`tax_rates_id`) ) TYPE=MyISAM AUTO_INCREMENT=5; -- -------------------------------------------------------- -- -- Table structure for table `whos_online` -- CREATE TABLE `whos_online` ( `customer_id` int(5) default NULL, `full_name` varchar(64) NOT NULL default '', `session_id` varchar(128) NOT NULL default '', `ip_address` varchar(15) NOT NULL default '', `time_entry` varchar(14) NOT NULL default '', `time_last_click` varchar(14) NOT NULL default '', `last_page_url` varchar(64) NOT NULL default '' ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `zones` -- CREATE TABLE `zones` ( `zone_id` int(5) NOT NULL auto_increment, `zone_country_id` int(5) NOT NULL default '0', `zone_code` varchar(5) NOT NULL default '', `zone_name` varchar(32) NOT NULL default '', PRIMARY KEY (`zone_id`) ) TYPE=MyISAM AUTO_INCREMENT=3; -- -------------------------------------------------------- -- -- Table structure for table `zones_to_geo_zones` -- CREATE TABLE `zones_to_geo_zones` ( `association_id` int(5) NOT NULL auto_increment, `zone_country_id` int(5) NOT NULL default '0', `zone_id` int(5) default NULL, `geo_zone_id` int(5) default NULL, `last_modified` datetime default NULL, `date_added` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`association_id`) ) TYPE=MyISAM AUTO_INCREMENT=49;
fjelsten Posted December 15, 2005 Author Posted December 15, 2005 Does nobody have any idea? This is really a big problem for me.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.