Hi Folks,
I'm currently moving an existing 2.1 store to 2.2 and realised that Max was the way to go, so as I'm doing a clean Max 1.7 install and then moving things over I thought I'd copy/paste in things I found useful.
The first thing I did after getting the basic install up and running was move the products, customers and orders data over from the old site to new.
To do this I did the following. I made a copy of my existing store mysql database and called it lscriptupd, my max 1.7 installation is called lscriptosc22.
I then ran a copy of the max1.7 install on the lscriptupd database which modified all my tables and made them osc2.2 compatible. I then developed sql to empty the new max installation and replace it with osc2.2 updated data. (If I'm going to fast, ask and I'll go into more detail)
Finally I ran the following SQL which moved the data over into my new max installation. After copying the graphic files into the correct directoy I had a working site. I just need to finish hacking the bts templates together and finalising some of the stylesheet and it will be live.(The max has saved me so much time, thanks everyone who's made it what it is.)
Anyway the SQL, don't forget to change the old/new database names to be ones that you use.
delete from lscriptosc22.categories;
insert into lscriptosc22.categories select * from lscriptupd.categories;
delete from lscriptosc22.categories_description;
insert into lscriptosc22.categories_description (categories_id,language_id,categories_name) select categories_id,language_id,categories_name from lscriptupd.categories_description;
delete from lscriptosc22.manufacturers;
insert into lscriptosc22.manufacturers select * from lscriptupd.manufacturers;
delete from lscriptosc22.manufacturers_info;
insert into lscriptosc22.manufacturers_info select * from lscriptupd.manufacturers_info;
delete from lscriptosc22.products;
insert into lscriptosc22.products (manufacturers_id,products_date_added,products_dat e_available,products_id,products_image,products_la st_modified,products_model,products_ordered,produc ts_price,products_quantity,products_status,product s_tax_class_id,products_weight) select manufacturers_id,products_date_added,products_date _available,products_id,products_image,products_las t_modified,products_model,products_ordered,product s_price,products_quantity,products_status,products _tax_class_id,products_weight from lscriptupd.products;
delete from lscriptosc22.products_attributes;
insert into lscriptosc22.products_attributes select * from lscriptupd.products_attributes;
delete from lscriptosc22.products_attributes_download;
insert into lscriptosc22.products_attributes_download select * from lscriptupd.products_attributes_download;
delete from lscriptosc22.products_description;
insert into lscriptosc22.products_description select * from lscriptupd.products_description;
delete from lscriptosc22.products_options;
insert into lscriptosc22.products_options (products_options_id,language_id,products_options_ name) select products_options_id, language_id,products_options_name
from lscriptupd.products_options;
delete from lscriptosc22.products_options_values;
insert into lscriptosc22.products_options_values select * from lscriptupd.products_options_values;
delete from lscriptosc22.products_options_values_to_products_o ptions;
insert into lscriptosc22.products_options_values_to_products_o ptions select * from lscriptupd.products_options_values_to_products_opt ions;
delete from lscriptosc22.products_to_categories;
insert into lscriptosc22.products_to_categories select * from lscriptupd.products_to_categories;
delete from lscriptosc22.categories_description where language_id<>1;
delete from lscriptosc22.products_description where language_id<>1;
delete from lscriptosc22.products_options where language_id<>1;
delete from lscriptosc22.products_options_values where language_id<>1;
delete from lscriptosc22.address_book;
insert into lscriptosc22.address_book select * from lscriptupd.address_book;
delete from lscriptosc22.address_format;
insert into lscriptosc22.address_format select * from lscriptupd.address_format;
delete from lscriptosc22.customers;
insert into lscriptosc22.customers (customers_id,customers_gender,customers_firstname ,customers_lastname,customers_dob,customers_email_ address,customers_default_address_id,customers_tel ephone,customers_fax,customers_password,customers_ newsletter) select customers_id,customers_gender,customers_firstname, customers_lastname,customers_dob,customers_email_a ddress,customers_default_address_id,customers_tele phone,customers_fax,customers_password,customers_n ewsletter from lscriptupd.customers;
delete from lscriptosc22.customers_basket_attributes;
insert into lscriptosc22.customers_basket_attributes (customers_basket_attributes_id,customers_id,produ cts_id,products_options_id,products_options_value_ id) select customers_basket_attributes_id,customers_id,produc ts_id,products_options_id,products_options_value_i d from lscriptupd.customers_basket_attributes;
delete from lscriptosc22.customers_basket;
insert into lscriptosc22.customers_basket select * from lscriptupd.customers_basket;
delete from lscriptosc22.customers_info;
insert into lscriptosc22.customers_info select * from lscriptupd.customers_info;
delete from lscriptosc22.orders;
insert into lscriptosc22.orders select *,0 from lscriptupd.orders;
delete from lscriptosc22.orders_products;
insert into lscriptosc22.orders_products select * from lscriptupd.orders_products;
delete from lscriptosc22.orders_products_attributes;
insert into lscriptosc22.orders_products_attributes select * from lscriptupd.orders_products_attributes;
delete from lscriptosc22.orders_products_download;
insert into lscriptosc22.orders_products_download select * from lscriptupd.orders_products_download;
delete from lscriptosc22.orders_status;
insert into lscriptosc22.orders_status select * from lscriptupd.orders_status;
delete from lscriptosc22.orders_status_history;
insert into lscriptosc22.orders_status_history select * from lscriptupd.orders_status_history;
delete from lscriptosc22.orders_total;
insert into lscriptosc22.orders_total select * from lscriptupd.orders_total;
Any questions, hollar.
Cheers
Mark





LinkBack URL
About LinkBacks






Bookmarks