Zen Cart Logo
Forums / All Other Contributions/Addons / Problem with databse transfer oscommerce to zencart

Problem with databse transfer oscommerce to zencart

Locked

Views: 7,428

Results 1 to 20 of 32
This thread is locked. New replies are disabled.
2 Apr 2008, 4:31 PM
#1
ksmglobal avatar

ksmglobal

New Zenner

Join Date:
Nov 2007
Posts:
12
Plugin Contributions:
0

Problem with databse transfer oscommerce to zencart

Hi,

I am moving a database from OScommerce to Zencart.
I have moved all the categories OK.
I have moved all the product structure OK.
BUT when I try to import the products I get the following error message:

Error
SQL query:

--
-- Database: mydatabase_name

--
-- Dumping data for table products

INSERT INTO products
VALUES ( 1, 33, '228', 'products/1.jpg', 'products/1.jpg', 'products/1.jpg', '', '', '', '', '', '', '', '', '', '', '', '', 2.8500, NULL , '2007-12-20 23:08:16', NULL , 1.00, 1, 0, NULL , 1, 0, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'G,0', 7, '', '', '', '', 0.00, 2288, 2.85, '0' ) ;

MySQL said:

#1136 - Column count doesn't match value count at row 1

2 Apr 2008, 4:58 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Problem with databse transfer oscommerce to zencart

This is telling you that osCommerce and Zen Cart don't have the same table structure for products.

One or both may have extra fields added since they split, and the osCommerce from which you are transferring may have mods that have added extra fields.

Have you compared the products tables in both to see what differences there are?

2 Apr 2008, 6:16 PM
#3
ksmglobal avatar

ksmglobal

New Zenner

Join Date:
Nov 2007
Posts:
12
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

I have already added all tables into zencart that existed in the oscommerce database. There are now more tables in the zencart than in the oscommerce.

2 Apr 2008, 6:39 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Problem with databse transfer oscommerce to zencart

The issue isn't about adding tables, it's that the products table in Zen Cart appears to be a different shape to that for the osCommerce database from which you are converting.

This is getting highlighted because you have adopted a high risk approach to conversion, namely dumping each osCommerce row into a Zen Cart row in the hope that the fields will match, rather than mapping the fields so that you know that data is being taken from osCommerce and placed into the right field in Zen Cart.

2 Apr 2008, 6:46 PM
#5
ksmglobal avatar

ksmglobal

New Zenner

Join Date:
Nov 2007
Posts:
12
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

Do you have any suggestions how I can rectify this and get all the products imported?

2 Apr 2008, 8:40 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Problem with databse transfer oscommerce to zencart

Since the tables appear to have different structures, assign the data from one to the other using column names that you have mapped between them, rather than by inserting a list of values. If Zen Cart has more column names you may need to assign default values to the new columns.

2 Apr 2008, 10:32 PM
#7
ksmglobal avatar

ksmglobal

New Zenner

Join Date:
Nov 2007
Posts:
12
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

Would you be willing to sort this out for me if I paid you?

3 Apr 2008, 1:47 PM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Problem with databse transfer oscommerce to zencart

I have a partner who is especially skilled in this type of conversion, and she has contacted you separately. But we would recommend that you take a look at this mod first (sorry all documentation is in French, but it's pretty easy to use even if you don't understand the docs).

6 May 2008, 1:12 AM
#10
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

I know many people would love this, thanks alot for the great contribution.> albertsavage:

I have released a new OSC - Zen data importer.

New and improved for multi-step migrations and easy to use.

If you still need it, that will solve most of your problems.

Albert

30 Jul 2008, 9:37 AM
#11
1kell avatar

1kell

Zen Follower

Join Date:
Jul 2008
Posts:
151
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

I have never done a transfer like this myself and I am wondering where you find this information:

//Source Database with OSC records
$source_db_host = 'localhost';
$source_db = 'database';
$source_db_username = 'user';
$source_db_password = 'password';
$source_db_table_prefix = '';

And how exactly do you transfer a databse - what do you do to point your browser to that file, and then why do you delete it? Sorry this looks easy to some but I dont understand, :blush:

30 Jul 2008, 10:24 AM
#12
1kell avatar

1kell

Zen Follower

Join Date:
Jul 2008
Posts:
151
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

okay I now have:

the mysql server, data base name, user, password

Mysql goes where in first, a group of numbers?
Database name next
Username next
Password next

no more changes...

Do that to both osc and zencart bits.

But what does it mean to point browser to this file and run script?:frusty:

30 Jul 2008, 8:23 PM
#13
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Problem with databse transfer oscommerce to zencart

1kell:

I have never done a transfer like this myself and I am wondering where you find this information:

//Source Database with OSC records
$source_db_host = 'localhost';
$source_db = 'database';
$source_db_username = 'user';
$source_db_password = 'password';
$source_db_table_prefix = '';

And how exactly do you transfer a databse - what do you do to point your browser to that file, and then why do you delete it? Sorry this looks easy to some but I dont understand, :blush:

You filled in this with your information ?
//Source Database with OSC records
$source_db_host = 'localhost';
$source_db = 'database';
$source_db_username = 'user';
$source_db_password = 'password';
$source_db_table_prefix = '';

// Target Database Zen Cart
$target_db_host = 'localhost';
$target_db = 'database';
$target_db_username = 'user';
$target_db_password = 'password';
$target_db_table_prefix = '';

Next you need to ftp the file to your url.

Then start your browser and in the address window.
Enter the location where you ftp the file to.

This Example will run the Products transfer:
http://www.yoursite.com/temp/import_osc_products.php

Do the same for each import file.

You delete the import files because once used they are never used again. Plus for security.

NOTE: BACKUP YOUR DataBases before Using these scripts.

3 Aug 2008, 9:46 PM
#14
ohsgal avatar

ohsgal

New Zenner

Join Date:
Aug 2008
Location:
Raymore, MO
Posts:
5
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

albertsavage:

I have released a new OSC - Zen data importer.

New and improved for multi-step migrations and easy to use.

If you still need it, that will solve most of your problems.

Albert

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_41&products_id=918

:clap:Albert, You have just saved me a ton of work, thanks for this contribution!
Thanks!

10 Nov 2009, 2:55 AM
#15
owihb avatar

owihb

New Zenner

Join Date:
Nov 2009
Location:
Southern California
Posts:
2
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

I've tried the Os commerce Data Importer Version 1.8 here is where I'm stuck. I followed the directions and did not get any error messages except this page (import_osc_configure.php) is blank in my browser.

Is it suppose to be a blank page?

When I check my Zen Cart, there are no products in there from Os Commerce.

Am I'm looking in the right place, is there something else I'm suppose to do now.

Please help,
Frustrated in So. CA

10 Nov 2009, 3:25 AM
#16
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Problem with databse transfer oscommerce to zencart

OwihB:

I've tried the Os commerce Data Importer Version 1.8 here is where I'm stuck. I followed the directions and did not get any error messages except this page (import_osc_configure.php) is blank in my browser.

Is it suppose to be a blank page?

When I check my Zen Cart, there are no products in there from Os Commerce.

Am I'm looking in the right place, is there something else I'm suppose to do now.

Please help,
Frustrated in So. CA

This should help you http://www.zen-cart.com/forum/showpost.php?p=778254&postcount=102

Also that is where the support thread is.

Skip

10 Nov 2009, 4:50 AM
#17
owihb avatar

owihb

New Zenner

Join Date:
Nov 2009
Location:
Southern California
Posts:
2
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

Thank you Skip,

The only thing I needed to import were the products and the import_osc_products.php worked fine.

It read that the data was imported/done


RE: import_osc_configure.php

(this comes up as a blank page, is it suppose to be blank?)


If the data imported worked like the import_osc_products.php page said it did, then where would I find my data? Is there a change in my Zen Cart admin area that needs changing to show the new imported data? I've read through other post, can't seem to find my answers.

Thanks

10 Nov 2009, 12:59 PM
#18
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Problem with databse transfer oscommerce to zencart


RE: import_osc_configure.php

(this comes up as a blank page, is it suppose to be blank?)


This file is called from the other import scripts and is never called using your browser. And if you call it using your browser it would be a blank page.

If import_osc_products.php worked fine then you will find your products under admin->catalog->Categories / Products.

Skip

11 Nov 2009, 3:49 PM
#19
2vrouhas avatar

2vrouhas

New Zenner

Join Date:
Aug 2009
Location:
Preston,UK
Posts:
8
Plugin Contributions:
0

Re: Problem with databse transfer oscommerce to zencart

I'm also having a problem with this. I have imported the data as suggested into import_osc_configure.php. ie database, passwords etc. but when I try to download the import_osc_products.php I am getting an error.
Warning: mysql_connect() [function.mysql-connect]: Access denied for user '_osc1'@'localhost' (using password: YES) in /home/****/public_html/***.com/import_osc_products.php on line 241
Could not connect: Access denied for user '****_osc1'@'localhost' (using password: YES).
I have rechecked the passwords and database details and also my config.php. I'm sure that I'm doing something obvious but after 2 days still can't work it out!
Would be grateful for any suggestions that might help.
Thanks

11 Nov 2009, 5:31 PM
#20
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Problem with databse transfer oscommerce to zencart

You have two (2) data bases source and target. Most likely they have to different user names and two different passwords. I would check this first.

Next if you are transferring the data across two different severs then you must setup remote access between the severs.

Skip