How do I import large amount of categories?

MT Importer currently only allows you to mass import listings. You can't import or create categories using this tool. However, if you are comfortable with MySQL, you can import categories through MySQL or phpMyAdmin. Here's a sample SQL query you can use to import one category:

INSERT INTO `jos_mt_cats` (`cat_name`, `alias`, `cat_desc`, `cat_parent`, `cat_published`, `cat_approved`) VALUES ('Category Name', 'category-alias', 'Description', 0, 1, 1);

Here are the details of the query:

Once you have done the 'INSERT's, login to your site's back-end and run this URL:

http://www.example.com/administrator/index2.php?option=com_mtree&task=rebuild_tree

Replace 'www.example.com' with your site's domain and path. This URL will build the 'lft' and 'rgt' column's value which is needed for use in Mosets Tree.

Was this article helpful?