News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Bulk import/create hundreds of categories from a .csv file

Started by Lorange, 02.04.2024 18:26:20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lorange

Hallo!

I have hundreds of categories and subcategories that I need to create in my new project, each with a title and description. Is there a way to import and create them automatically, for example with a csv file?

I already have the csv file ready with all the categories. Each category has the following elements;

1) Category name (title)
2) Category description
3) Category Alias
4) Parent categoriy Alias (used to identifiy the parent category)

Thank you for your help.
  •  

ColinM

Hi
Which versions of jD, Joomla and PHP are you using?  Will they be the same on the new site?

The basic way is to use the jD Check Download Area.  Being very cautious I would
I would suggest using FTP to copy over the contents of the old site jdownloads directory to the new site jdownloads file. Actually just copy over a section of the Folders and their Downloads to avoid timeouts, then use the Check Download Area - "Search Only for new directories". Next use the "Search only for new Files" Do not attempt to do all in one hit, just be patient

 Make backups first just in case!!
See Monitoring Options

Colin
Colin M
  •  

Lorange

Hi,

I'm using the latest versions of Joomla and jD, PHPO 8.2. It's actually a brand new project. I have no files to migrate. I just need a way to automatically create the categories with their respective description. I have more than 300 categories, each with its own description. It would be very time consuming to create them manually in jD. The solution you suggested (jD Check Download Area > "Search Only for new directories") would create the categories but not their descriptions.

I have a .csv file ready that look like this:

#### CATEGORY NAME ######## CATEGORY ALIAS ########### CATEGORY DESCRIPTION ########### PARENT CATEGORY ####
Example Name 1example-name-1Example description of the category 1
Example Name 2example-name-2Example description of the category 2
Example Name 3example-name-3Example description of the category 3example-name-1
Example Name 4example-name-4Example description of the category 4
Example Name 5example-name-5Example description of the category 5example-name-2
Example Name 6example-name-6Example description of the category 6
Example Name 7example-name-7Example description of the category 7
Example Name 8example-name-8Example description of the category 8example-name-1

In the example above, the category 8 would be a child of Category 1. I just need theses categories (more than 300) to be created in jD (in the database).

Is there a way to achieve that?
  •  

ColinM

Lorange
Had not appreciated it was a totally new site.
The way to add the category info you have is to import to the data using the import facilities of your Mysql database. 
Select the Category table and then use the Input

It accepts several forms and I have added examples using CSV and Open Office formats.  Note that the first line gives the entry names in the table.  Most importantly there must be an entry for evey item, which may be blank.
There is no way of a mass entry with details like description unlee all such items are identical.

Obviously try with a simple example.

Colin
Colin M
  •