Forums / Setting Up Categories, Products, Attributes / How to import catergories from a csv ???

How to import catergories from a csv ???

Views: 1,266

Results 1 to 3 of 3
15 Apr 2010, 10:17 AM
#1
kate_1 avatar

kate_1

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
47
Plugin Contributions:
0

How to import catergories from a csv ???

Hi,

I have an csv of the catergories I need for my shop which looks like this:
categories_id,parent_id,name
"17","0","Toys"
"18","6","Stationery" etc...

How can I import these into the database? Or how would I go about writing an sql statement to do so?

I need the categories to keep the id's in the csv as I am using them for easy populate for the product csv.

Any help appreciated! :smile:

15 Apr 2010, 7:06 PM
#2
kate_1 avatar

kate_1

New Zenner

Join Date:
Aug 2007
Location:
UK
Posts:
47
Plugin Contributions:
0

Re: How to import catergories from a csv ???

Decided to do it the long way & import manually. :dontgetit

15 Apr 2010, 8:53 PM
#3
jollyjim avatar

jollyjim

Totally Zenned

Join Date:
May 2005
Location:
Cheshire, UK
Posts:
401
Plugin Contributions:
2

Re: How to import catergories from a csv ???

For future reference:

INSERT INTO categories (categories_id, categories_image, parent_id, sort_order, date_added, last_modified, categories_status) VALUES
(17, NULL, 0, 0, '2010-04-15 22:34:34', NULL, 0),
(18, NULL, 6, 0, '2010-04-15 22:34:36', NULL, 0),

INSERT INTO categories_description (categories_id, language_id, categories_name, categories_description) VALUES
(17, 1, 'Toys', ''),
(18, 1, 'Stationary', ''),