Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Importing Products Via phpMyAdmin

Importing Products Via phpMyAdmin

Views: 3,143

Results 1 to 7 of 7
13 Aug 2009, 7:31 PM
#1
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Importing Products Via phpMyAdmin

I want to upload products by the thousand via phpMyAdmin. My thoughts are that I could have alot finer control of ZenCart if I just work with the tables directly, instead of using Easy Populate. Also, I have not been able to get Easy Populate to work. It gives a strange error when I try to upload a table. I could try it again. I have tried the free version.

First I tried to upload my spreadsheet to just the zen_products table. They were in the table ok, but the products where not showing up in the store. Then I found the zen_products_to_categories table and manually in phpMyAdmin added a reference to one of the products via it's id number and then gave it the category number. The category link on the left in the store shows that a product now exists in the category, but If I click on the category, it still says that no products exist in the category.

If somebody would kindly tell me ALL of the tables which are needed in order to add products, then it would save me some time. I'd be greatful.

I'll do this though, even if it takes me all month.

Jason

13 Aug 2009, 7:37 PM
#2
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: Importing Products Via phpMyAdmin

I just found the zen_products_description table. I added a reference to my product here and it is showing up when I click on the category in the left column of my store. Boy, I sure have alot of work to do now. Then maybe I'll be able to say to myself.

YOU'RE THE MAN NOW DOG

14 Aug 2009, 6:16 PM
#3
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: Importing Products Via phpMyAdmin

I got my tables to be correct, and I uploaded them. But there is still a problem. All of the space characters in my descriptions and other fields which have spaces are disappearing. I am using Tab Delimited. I think that I may need to know how to either enclose or encapsulate the fields. I need more knowledge about how CSV files are constructed. I have not been able to find this information.

Jason

14 Aug 2009, 7:00 PM
#4
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: Importing Products Via phpMyAdmin

I answered my own question. Here is what I did.

I went to the Import Tab for the table

I set the character set of the file to ASCII

I choose CSV using LOAD DATA

Then

Replace table data with file unchecked
Ignore duplicate rows unchecked
Fields terminated by /t ( this means tab )
Fields enclosed by nothing ( not even a space, nothing )
Fields escaped by /
Lines terminated by AUTO
Column names leave blank
Use LOCAL keyword Yes

Then hit go

I figured it out myself. Neener Neener Neener Neener Neener

27 Mar 2011, 4:26 PM
#5
caroofikus avatar

caroofikus

New Zenner

Join Date:
Jan 2007
Posts:
22
Plugin Contributions:
2

Re: Importing Products Via phpMyAdmin

Jason,

Good information. I had everything in place, I thought, but needed to update the zen_products_to_categories table to get everything to show. I didn't care for Easy Populate's layout, but I may give it a go again someday.

For anybody else having trouble with this, I found that if I tried to import my spreadsheet with old items included on it, I would get an error. Leaving only my updates on the spreadsheet got everything to work fine.

Caroofikus

20 Jul 2011, 4:01 PM
#6
lndlyb4 avatar

lndlyb4

New Zenner

Join Date:
Mar 2009
Posts:
78
Plugin Contributions:
0

Re: Importing Products Via phpMyAdmin

I found that I also had to make sure the product_type column was set to 1 or I won't get a product info page. You can set this in the cvs file before import in the "products_type" column or do a sql query from phpmyadmin "update zen_products set products_type = 1 where products_type = 0" (Click on the zen_products table. Click SQL tab and type the above query into the Run SQL query/queries on database field. Always backup database before running queries.)

20 Jul 2011, 4:14 PM
#7
lndlyb4 avatar

lndlyb4

New Zenner

Join Date:
Mar 2009
Posts:
78
Plugin Contributions:
0

Re: Importing Products Via phpMyAdmin

Is there a limit to 100 records when importing into a category?