Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Any easy way to move customer from 2.2 rc2a to 2.3.1?


catalano

Recommended Posts

One of my 2.2 RC2a sites was just hacked again, so I'm going to bite the bullet and upgrade to 2.3.1. Since there aren't a huge number of products in the store I'm just going to do a clean install and re-enter all of the products. But I would like to be able to move the registered customers over. Can anyone point me to a good 'how to' for this?

 

Thanks,

Chris

Link to comment
Share on other sites

Hi Chirs,

 

If you use phpmyadmin to access your existing sites database with the info that you want to move over, you will need to copy over the following tables

address_book

customers

customers_info

 

You might also want to add the order tables over as well....

Nic

 

 

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Just importing the customers, or customers and orders, without importing the products table will give you broken links or, even worse, bad links.

 

 

Run this query in phpMyAmin on your old tables before backing up:

 

ALTER TABLE `reviews` ADD `reviews_status` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `last_modified` 

 

this makes products review the same as the new tables.

 

Back up your address book, customer tables, products tables and orders tables.

 

When you install empty each new table before running the backup

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Ok, backing up the existing tables and importing into the new installation seems doable. xpajun pointed out a change that needs to be made to the reviews table before doing that. I had understood that the majority of the database files were significantly different between the two versions, but 2 people have stated that I can import the orders tables as well, but didn't mention any other modifications. Does that seem right?

 

Thanks.

Link to comment
Share on other sites

There are three new tables, and the alteration to the products_review I posted above, there have also been significant changes to the configuration table data.

 

To import data to 2.3 from 2.2 do the following:

 

In phpMyAdmin

Run the SQL query I posted above on your old database

Export the following table data (only) with the EXPORT type REPLACE:

address_book

address_format

categories

categories_description

customers

customers_basket

customers_basket_attributes

customers_info

manufacturers

manufacturers_info

orders

orders_products

orders_products_attributes

orders_products_download

orders_status

orders_status_history

orders_total

products

products_attributes_download

products_description

products_notifications

products_options

products_options_values

products_options_values_to_products_options

products_to_categories

products_to_categories

reviews

reviews_description

specials

 

your queries will look like this:

 

REPLACE INTO `categories` (`categories_id`, `categories_image`, `parent_id`, `sort_order`, `date_added`, `last_modified`) VALUES

followed by a list of values

 

This should eliminate the need to drop and create table or truncate them as the queries should overwrite any queries already in the tables

 

Now just run the queries on your new database

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Thank you. I'm just waiting for my hosting company to finish checking the site for any more malware then I will install the new osc software and try this migration. I'll post back with my experience.

 

There are three new tables, and the alteration to the products_review I posted above, there have also been significant changes to the configuration table data.

 

To import data to 2.3 from 2.2 do the following:

 

In phpMyAdmin

Run the SQL query I posted above on your old database

Export the following table data (only) with the EXPORT type REPLACE:

address_book

address_format

categories

categories_description

customers

customers_basket

customers_basket_attributes

customers_info

manufacturers

manufacturers_info

orders

orders_products

orders_products_attributes

orders_products_download

orders_status

orders_status_history

orders_total

products

products_attributes_download

products_description

products_notifications

products_options

products_options_values

products_options_values_to_products_options

products_to_categories

products_to_categories

reviews

reviews_description

specials

 

your queries will look like this:

 

REPLACE INTO `categories` (`categories_id`, `categories_image`, `parent_id`, `sort_order`, `date_added`, `last_modified`) VALUES

followed by a list of values

 

This should eliminate the need to drop and create table or truncate them as the queries should overwrite any queries already in the tables

 

Now just run the queries on your new database

Link to comment
Share on other sites

Ok, I had a problem when importing the data into the new installation. Here's what I did:

 

Run the first SQL query you posted

Export the database as instructed

Perform a new install of OSC 2.3.1 into a new directory

Go to PHPMyAdmin and perform an IMPORT selecting the exported file

Receive error

 

Error

SQL query:

 

-- -- Dumping data for table `orders` -- REPLACE INTO `orders` (`orders_id`, `customers_id`, `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`, `last_modified`, `date_purchased`, `orders_status`, `orders_date_finished`, `currency`, `currency_value`, `buysafe_cart_id`, `buysafe_client_ip`, `buysafe_session_id`) VALUES (1, 2, 'Bob Smith', '', '123 Cherry Lane'[...]

 

MySQL said:

 

#1054 - Unknown column 'buysafe_cart_id' in 'field list'

 

 

Any idea what I did wrong?

 

Thanks,

Chris

Link to comment
Share on other sites

Buysafe Cart Is is a column added for one click installs i am sure, you can delete this colum from the old database i doubt its used!

remove this column and try again with new queries, or alternatively add a new column to you new database, but thats not the best practice

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Hi Nic,

 

Do I need to delete everything that did get imported first? If so, how do I do that? I'm not really sure how much was successful. Or should I just remove the whole OSC installation and start again?

 

Thanks,

Chris

 

Buysafe Cart Is is a column added for one click installs i am sure, you can delete this colum from the old database i doubt its used!

remove this column and try again with new queries, or alternatively add a new column to you new database, but thats not the best practice

Nic

Link to comment
Share on other sites

Hi,

No you don’t, if table have gone in successfully that’s fine just work on the one's that are causing you problems.

I do not like to do any quick method but would rather compare the make up of each tables colum’s and ensure they match, if they do not I amend the older Dbase so it fits with the new.

 

This way I know that inserting info is going to be easy

 

Regards

 

Nic

 

 

 

 

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

I was just lurking and came across this thread. I was surprised that noone pointed the original poster to a document that discussing how to port live installations from v2.2 to v2.3.

 

Does not such a document exist?

 

If not, does anyone care to write such a doc that that already been through the pain of an upgrade? ;-)

Link to comment
Share on other sites

Hi Karl,

if it did and I was aware of its existence then I certainly would have, I would imagine that Chris might have drawn that thought also.

Its been pointed out here already that such a thing is only good for some users who have a basic cart, most however have sites with modifications added to it impacting on DB tables so there is no possibility of a one for all document, if you wish to have a crack at it though I would welcome it :-)

Nic

 

 

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Yeah, even with the very thorough instructions from xpajun I still had a problem because my installation had the buysafe stuff included. And that was installed automatically as part of the standard install by my cpanel. So I had to manually delete those fields before I could import the data into 2.3.1.

 

Hi Karl,

if it did and I was aware of its existence then I certainly would have, I would imagine that Chris might have drawn that thought also.

Its been pointed out here already that such a thing is only good for some users who have a basic cart, most however have sites with modifications added to it impacting on DB tables so there is no possibility of a one for all document, if you wish to have a crack at it though I would welcome it :-)

Nic

Link to comment
Share on other sites

One other problem just detected. I'm going through the catalog in the new store and setting up all of the downloadable product attributes. I keep getting an error when I try to insert the downloadable product. When I go back and look at the database via phpmyadmin, I notice that the products_attributes_downloads is already populated with all of my old data, but products_attributes is not. Then I went back to look at xpajun's instructions and that table (products_attributes) wasn't in the list of tables to export/import. Was that an oversight or should it have been included?

 

Thanks,

Chris

Link to comment
Share on other sites

Sorry it would have been an oversight.

 

 

I keep thinking about writing out a proper how to upgrade from 2.2 to 2.3 but there are very few store that don't have contributions added and each add-on makes it more complicated

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

No problem. I went out on a limb and exported just that table and imported it into the new store and all seems well.

 

Thanks.

 

Sorry it would have been an oversight.

 

 

I keep thinking about writing out a proper how to upgrade from 2.2 to 2.3 but there are very few store that don't have contributions added and each add-on makes it more complicated

Link to comment
Share on other sites

I followed xpajun's instructions a few posts back. After creating the dbase export I used phpmyadmin to import it into the new osc dbase. Just click on the "Import" tab and then use the File button to locate the saved export file.

 

Can u tell us more how you did?

Link to comment
Share on other sites

  • 1 year later...

I did follow Xpajun procedure and so far so good .... articles and customers are ok, but will do more testing before i will go online with 2.3. Thanks Xpajun !

Baterije & Akumulatorji OsCommerce store

Link to comment
Share on other sites

  • 4 months later...

Hello,

I have followed Xpajun instructions and import was very smooth but I cannot see imported categories in administration. Did someone faced this issue?

 

Thank you for advice in advance.

 

Petr

Link to comment
Share on other sites

  • 10 months later...

Just importing the customers, or customers and orders, without importing the products table will give you broken links or, even worse, bad links.

 

 

Run this query in phpMyAmin on your old tables before backing up:

 

ALTER TABLE `reviews` ADD `reviews_status` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `last_modified`

 

this makes products review the same as the new tables.

 

Back up your address book, customer tables, products tables and orders tables.

 

When you install empty each new table before running the backup

 

@@Xpajun

 

My old database from 2.2 was already installed into the 2.3 site. (likely why I'm having problems logging in now)

 

If I want to follow this process you start on in the quote above, do I need to dump the current database (the 2.2 brought into 2.3) and work on the old one before importing it?

 

If so, do I import it into the phpAdmin and do this work there?

 

Thank you,

Suzanne

Link to comment
Share on other sites

  • 3 months later...

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

  • 7 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...