Forums / All Other Contributions/Addons / OsCommerce Data Importer - Errors

OsCommerce Data Importer - Errors

Views: 37,960

Results 21 to 40 of 252
24 Jun 2008, 12:32 AM
#21
skipwater avatar

skipwater

Totally Zenned

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

OsCommerce Data Importer - Errors

Following earlier dialogues with Skipwater, I am now trying to include the metatags that appear in OSC categories_description and transfer them to the separate table meta_tags_categories_description

The osc default categories_description table only includes fields:
categories_id
language_id
categories_name

If I remember the default osc data base has no meta tags stored any where.

Your code looks correct.

But I can not tell if the source fields are there and spelled correctly and you have data in them.

I would start looking at your source for the fix.

Skip

• 446F63746F722057686F •

24 Jun 2008, 10:03 PM
#22
centec2b avatar

centec2b

New Zenner

Join Date:
May 2008
Posts:
52
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

skipwater:

If I remember the default osc data base has no meta tags stored any where. Your code looks correct. But I can not tell if the source fields are there and spelled correctly and you have data in them. I would start looking at your source for the fix.
Skip

Hi Skip

Thank you for those thoughts - sorted! A mixture of typos and I wrongly assumed that just because the code said that there was no data, that it was true...

I omitted to put ```
$ii++;


I propose to put it into the downloads with an explanation.  It might be useful for others who are coming across from OSC and have meta data etc

It saved a lot of typing anyway!

Thanks again 

Centec2b
24 Jun 2008, 11:47 PM
#23
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

As Albert said (who started this thread)
Feel free to upload your contribution (hey, it's open source).

Thats what it is all about :smile:

I have written a review transfer script but have not had time to put it up.

As with every project we need these little utilities and it is a great help that Zen Cart gives us a place that we can share the code so all benefit.

Skip

• 446F63746F722057686F •

19 Jul 2008, 12:10 AM
#24
embepo avatar

embepo

New Zenner

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

Re: OsCommerce Data Importer - Errors

Hello guys!

Well I have a serious problem here. I tried to use this Data Importer and it was working well till i realised the I download only english database from OScommerce. The oscommerce store has two languages but I could download only english. Please can you give me some advise how to download both databases from oscommerce to zen.

embepo

19 Jul 2008, 1:09 PM
#25
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

embepo

Attached is a languages table importer for osc to zen. Unzip and add the sql data same as the other scripts.
This will be included in an up date that I am working on.

Let us know if this fixes your issue.

Skip

• 446F63746F722057686F •

22 Jul 2008, 6:02 PM
#26
embepo avatar

embepo

New Zenner

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

Re: OsCommerce Data Importer - Errors

I tried it but it didnt work. I guess that its really complicated to write a script like that. The problem is that I could copy only english version of oscommerce but when I change language in zencart to my default slovak version, all what I see are prices. No names, no description, only prices....

22 Jul 2008, 11:37 PM
#27
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

embepo:

The problem is that I could copy only english version of oscommerce but when I change language in zencart to my default slovak version, all what I see are prices. No names, no description, only prices....

If you can look at your osc languages table and see what is the value of your languages_id (1 is normally English, 2 is Deutsch, 3 is Español ) so what is slovak?

After you check and see what value slovak is look at products_description table. You should find that the language_id has the same value.

These values will transfer to the zen cart data base.

Now look at the zen cart data base and you should see that all the language_id have your slovak id value.

I do not have a osc data base with your slovak language for testing if you want pm me with a sample of the data base and I can do some testing.

skip

• 446F63746F722057686F •

10 Aug 2008, 8:57 PM
#28
bbemis avatar

bbemis

Zen Follower

Join Date:
Feb 2006
Posts:
163
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

I'm trying to move my store from oscommerce to zen, but I can't seem to get this contribution to work. The error message I'm getting is:

Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'blowinin.ipowermysql.com' (2) in /home/content/b/l/o/blowinin/html/import_osc_products.php on line 239
Could not connect: Unknown MySQL server host 'blowinin.ipowermysql.com' (2)

This is the database host listed on my server information page on oscommerce. I have no idea why I keep getting this error? Any ideas of what I should try?

11 Aug 2008, 1:28 PM
#29
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

Based on your error you connect to the zen-cart target database fine.

This is the database host listed on my server information page on oscommerce.

Is this where you found the source database information?
OsCommence configure file:

/includes/configure.php

// define our database connection
define('DB_SERVER', 'server'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'username');
define('DB_SERVER_PASSWORD', 'username_password');
define('DB_DATABASE', 'name of database');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

Skip

• 446F63746F722057686F •

11 Aug 2008, 3:11 PM
#30
bbemis avatar

bbemis

Zen Follower

Join Date:
Feb 2006
Posts:
163
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

Actually, I think I might have figured it out....was doing something STUPID! I need to not only change from oscommerce to zen but I also need to change service providers. One database is with ipower and the other is with godaddy....I'm assuming that since they aren't on the same server, that's what's causing the problem...is that possible?

11 Aug 2008, 4:06 PM
#31
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

I'm assuming that since they aren't on the same server, that's what's causing the problem...is that possible?

Yes, each host sets up there sql differently you would need remote access to connect to a sql data base on a different server.

A work around is to transfer the old database to the new server. So the new zen-cart and old osc are on the same server.

Skip

• 446F63746F722057686F •

11 Aug 2008, 4:31 PM
#32
bbemis avatar

bbemis

Zen Follower

Join Date:
Feb 2006
Posts:
163
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

so basically, that would be just moving the back up I made to the new server right?

11 Aug 2008, 7:00 PM
#33
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

bbemis:

so basically, that would be just moving the back up I made to the new server right?

Yes, Just restore your backup to a new data base file on your new server.

• 446F63746F722057686F •

11 Aug 2008, 7:01 PM
#34
bbemis avatar

bbemis

Zen Follower

Join Date:
Feb 2006
Posts:
163
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

Thanks so much Skip! I'll give it a try....

21 Aug 2008, 7:36 PM
#35
testerservers avatar

testerservers

New Zenner

Join Date:
Jun 2008
Posts:
71
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

Hello all,

My issue isn't any errors, it's just that after it completes the process and says everything is done, there is nothing in the Zen database. Here's what I've done:

1. I have a localhost and Zen Cart installed with sample products and such.
2. I have osCom on a remote server with my products in the database.
3. I backed up the osCom from the remote server and loaded it locally. It displays my data with no issues.
4. I have put the contrib files in my root folder of my Zen Cart, which is locally. I've made all the needed changes to the two files as required.
import_osc_meta_tags.php
import_osc_configure.php

I've double-checked every thing to make sure I didn't miss anything, but no products are showing up in the Zen Cart.

To be sure to get the data to transfer correctly, I emptied all of the sample data from the Zen Cart tables
categories
categories_description
products

and tried the process again. The tables are still empty, yet I'm not getting any errors at all and when it finishes, it says that everything imported ok.

Any help would be appreciated, and thanks for your valued time.

Here are the results of each attempt I've made

[B]Test connection to localhost Target Server OK!
Test ironman_zencart Target Database OK!
Connected to the localhost Source Server
Opened wifence_i749osc Source Database
Starting Exportation of osCommerce wifence_i749osc Data Base[/B]
Exporting Categories Meta Tags........................ Done 21 Records Exported
Exporting Products Meta Tags.................................... Done 33 Records Exported
[B]Closing wifence_i749osc Source Database[/B]
-----------------------------------------------------------------------------------------
[B]Connected to the localhost Target Server
Opened ironman_zencart Target Database
Starting Importation of osCommerce Data Into ironman_zencart Data Base[/B]

Importing Categories Meta Tags...
..................... Done 21 Records Imported
Importing Products Meta Tags...
................................. Done 33 Records Imported
[B]Closing ironman_zencart Target Database[/B]
-----------------------------------------------------------------------------------------
[B]All Done[/B]
21 Aug 2008, 8:08 PM
#36
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

  1. I have a localhost and Zen Cart installed with sample products and such. OK.
  2. I have osCom on a remote server with my products in the database.
  3. I backed up the osCom from the remote server and loaded it locally. It displays my data with no issues.
  4. I have put the contrib files in my root folder of my Zen Cart, which is locally. OK.
    I've made all the needed changes to the two files as required. OK.
    import_osc_meta_tags.php
    This script is the one script that needs the must user intervention. This is due to osc default, it has no meta tag data. So if you have meta tag data it is because a mod was added to osc. You will have to match the osc meta tag tabels and fields to the zen cart tabels and fields.
    import_osc_configure.php Only import_osc_products.php, import_osc_customers.php and import_osc_orders.php use this file.

I've double-checked every thing to make sure I didn't miss anything, but no products are showing up in the Zen Cart.
If you just run import_osc_products.php it should give you export record counts and import record counts. If they match then go into you zen cart and see if you now have categories and products.

To be sure to get the data to transfer correctly, I emptied all of the sample data from the Zen Cart tables
categories
categories_description
products
Each script empties the tables before they load data. They do not append any records.

So if you run import_osc_customers.php all the customers are transfered?
Also if you run import_osc_products.php are the products transfered?
Same gos for import_osc_orders.php.

• 446F63746F722057686F •

21 Aug 2008, 9:50 PM
#37
testerservers avatar

testerservers

New Zenner

Join Date:
Jun 2008
Posts:
71
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

Thanks for the reply skipwater.

However, the problem not only still exists, it's the same even when I use a default oscom database.

But never the less, I ran the import_osc_products.php file and it says everything is completed but at the very bottom of the page it says

Importing Customers ...
Incorrect integer value: '' for column 'customers_authorization' at row 1

When I run import_osc_meta_tags.php it says this at the end of the page after it says everything is transferred.

Importing Categories ...
Incorrect datetime value: '' for column 'last_modified' at row 1

This is a new database. When I run import_osc_meta_tags.php it says everything is done, but still, no data has been transferred. I double-checked my databases and they're not using any prefixes in the table names.

The osc database with my products on it has "Easy Populate" on it. That's the only addon my osc has.

The strange thing is that all of my databases work perfectly, locally and remotely, but trying to transfer from the osc to the DEFAULT Zen Cart is a challenge right now.

I'm going to keep trying to figure this out, and I appreciate the info you've provided because it did help me understand a bit more of what I need to do and why.

Hopefully I can get this task at hand dealt with soon.

Thanks for your help.

[UPDATE]
I also noticed that the tables/fields that are to be populated are emptied, but noting is replaced, even though they had data in them.

21 Aug 2008, 11:20 PM
#38
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

But never the less, I ran the import_osc_products.php file and it says everything is completed but at the very bottom of the page it says

Importing Customers ...
Incorrect integer value: '' for column 'customers_authorization' at row 1

You say import_osc_products.php but state a import_osc_customers.php error

Incorrect integer value: '' for column 'customers_authorization' at row 1

The customers_authorization value come from the drop down menu
value="0" Approved
value="1" Pending Approval - Must be Authorized to Browse
value="2" Pending Approval - May Browse No Prices
value="3" Pending Approval - May browse with prices but may not buy
value="4" Banned - Not allowed to login or shop

This value is not originating from the osc data base.

The osc database with my products on it has "Easy Populate" on it. That's the only addon my osc has.
If this is true you do not need to run import_osc_meta_tags.php because you do not have any meta tags to transfer.

Skip

• 446F63746F722057686F •

22 Aug 2008, 3:16 AM
#39
testerservers avatar

testerservers

New Zenner

Join Date:
Jun 2008
Posts:
71
Plugin Contributions:
0

Re: OsCommerce Data Importer - Errors

Hi skipwater,

Thanks for all of your help. You've helped me out quite a bit. Here's my results.

1. I decided to do the transfers from my remote server/databases, and it works perfectly. (remote server to remote server, on the same server)

2. There must be an issue on my end locally, because the local database only has 33 products in it, but the online database has over 2,800 products in it.

I ran the
import_osc_products.php 1st, but I didn't check it until after I ran
import_osc_meta_tags.php

I am so happy and glad that you helped me understand things I didn't understand. I am taking a master database and I'm splitting it up amongst 15 domains. Once I transfer the database to each site, I'm simply deleting the data I don't need.

Question 1... If I am using just a default osc database, do I have to run import_osc_meta_tags.php?

Question 2... When I upload my images for my products to the /images/ folder, will my images show up for each product?

Question 3... Will I have to manually put the options back in for each product?

Once again, thanks for your help and time you've taken out to assist me. I'll work on the local transferring issue after I get this 1st remote site down-packed.

Tester

22 Aug 2008, 12:49 PM
#40
skipwater avatar

skipwater

Totally Zenned

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

Re: OsCommerce Data Importer - Errors

Question 1... If I am using just a default osc database, do I have to run import_osc_meta_tags.php?
NO.
Question 2... When I upload my images for my products to the /images/ folder, will my images show up for each product?
YES.
Question 3... Will I have to manually put the options back in for each product?
NO. (What ever was in the osc product will be in your new zen product.)

Skip

• 446F63746F722057686F •