Import categories and subcategories manually

Import categories and subcategories manually

Following the article about importing locations to DJ-Classifiedshere's a tutorial on importing categories and subcategories the same way.

To do it, you’ll need to be able to access your database via phpMyAdmin.

Preparing the import file

Create the import file based on the sample file

Creating one easy .csv allows you to import all your categories and subcategories to DJ-Classifieds.

Firstly prepare the .csv file with all the categories and subcategories you want to add (You’ll find the exemplary .csv file below the table of database structure).

To prepare the file, you first need to have the list of your categories and subcategories in any format and then create the .csv file that reflects the database structure of categories in DJ-Classifieds. 

The database structure of the categories in DJ-Classifieds looks like in the table below:

DB column
what is it?
data format
id
category ID
number
name
category name
text
alias
category URL alias
text
parent_id
parent category id
number
price
price for the advert submitted to the category
number
price_special
unused
please leave it blank
description
description of the category
text (HTML)
icon_url
unused (category image is in #__djcf_images table)
please leave it blank
ordering
category ordering
number
published
published or not
0 - unpublished, 1 - published
auto publish
set if the ad should be automatically published
0 - global setting, 1- yes, 2 - no
metakey
meta keywords
text
metadesc
meta description
text
access
access to submission of adverts restricted for specific Joomla groups
0 - no restriction 1 - restricted (restrictions can be set in "#__djcf_categories_groups" [id, cat_id, group_id])
points
price in points
number
ads_disabled
setting if adverts can be submitted or not to this category
type 0 to allow submission, set 1 to restrict submission to this category
theme
theme for category
text (theme's name)
access_view
Viewing Access Level restriction for viewing this category
number (ID of the Viewing Access Level)
access_item_view
Viewing Access Level restriction for viewing adverts from this category
number (ID of the Viewing Access Level)
restriction_18
adults restriction
0 not restricted, 1 restricted
rev_group_id
DJ-Reviews group id used in this category
number
schema_type
the setting for AMP - if using AMP type "product."
text
meta robots
meta robots
text
meta title
meta title
text

Download sample .csv file: Sample DJ-Classifieds categories

First, open your CPanel account and open phpMyAdmin

03-phpmyadmin

When in phpMyAdmin

  1. open your database
  2. and find the DJ-Classifieds categories table and open it (the name of the table will be [yourdbprefix]_djcf_categories )

import-categories

Next ( when in categories table ), click „Import” in the top bar. Import categories phpmyadmin

Now you’re ready to import the .csv file.

Import categories to DJ-Classifieds

  1. browse for the .csv file here
  2. make sure to skip the first row (insert „1”)
  3. insert „;” (semicolon) in Columns separated with:
  4. Click „Go”
Imported categories/subcategories are now visible in your DJ-Classifieds installation

There's a slight difference in columns order. Below you can find a video tutorial on how to reorganize columns in phpMyAdmin if needed.  



      • Related Articles

      • How to hide or display categories over the adverts

        You can easily hide or show the categories over the adverts in blog or table views.  Go to Options > Views (tab) > scroll to Categories in Blog/Table view and change the  Subcategories in table/blog view setting to No.    When set to Yes, the ...
      • How to hide category description

        You can enable and disable description for the categories by „Category desc in subcategories." This is how it looks when enabled: and when disabled:
      • How to sort categories in backend

        In the backend, you can sort categories by:   ID Name Ordering Price Published
      • Redirection of non existing adverts or categories (list or 404)

        You can decide if you want to redirect users who tried to enter non-existing URLs to 404 Error page or, as previously, to the homepage if there’s a list of adverts. To change it go to Options>SEO Settings and change parameter ‘Wrong advert redirect’. ...
      • Categories

        The first step is to create a category. Click the New Category button from the control panel, and you will be directed to the page: New Name – enter the name of the category. Alias – enter an alternate name of the category or leave it blank Parent – ...