Import configuration

Import configuration

Import configuration is an option that allows administrators to configure import procedures better when it comes to importing Products.
The new feature can be found in the back-end area under the page named "Import configuration":



Keep in mind that the options described here refer to importing Products only. Neither Categories nor Producers are affected.
There are two main benefits of using the Import configuration feature:
  1. You no longer have to adjust the column layout of each CSV file before importing it so that you can set up a list of dependencies between your own CSV format and DJ-Catalog2 product structure just once.
  2. The import process becomes more flexible and powerful as you can, for example, merge three columns into one or look up the attribute in the database and replace it with the returned value.
To create a dependency, you have to click the "New" button, and the "Import dependency" form will be displayed.



A dependency consists of the following attributes:
  • Name  it's a friendly name of your dependency.
  • Published  only published dependency will be used.
  • CSV column  the column's exact name inside the CSV file should be paired with the target attribute.
  • Target column  e.g. "name", "description", "images", "_custom_field_1". The exact name of target column inside #__djc2_items table. See the guidelines for more information and the article describing how to import data to custom attributes.
  • Database lookup*  enabled this option if you want to look up the source value (from CSV column) in the database and be replaced by returned value. See the example below:
  • Lookup table  name of the table, e.g. #__djc2_producers.
  • Lookup column  e.g. "name"
  • Lookup value  e.g. "id"
  • Comparison operator  the operator which should be used when comparing the source value against values inside "lookup column".
  • Optional "WHERE"  additional condition that should used in the SQL query, e.g. published=1
  • Merging  the merging will occur when more than one dependencies refer to the same target column. In such a case, you can replace the previous value with a new one or concatenate it BEFORE or AFTER. The perfect example is merging values from the "first name" and "last name" columns into one "name" column.
  • HTML wrap  you may surround the value with HTML tags such as <p>, <div>, <span>
*) Database lookup usage example. Dependency displayed below will take the string value (assuming its name of the producer) from the "manufacturer" column, insert it into SQL query, which looks for producer ID from #__djc2_producers table based on the "name" column, and finally replace the old value with returned ID.

In other words, the following SQL query will be performed:
  • SELECT `id` FROM `#__djc2_producers` WHERE `name` LIKE "?" LIMIT 1



      • Related Articles

      • Import categories and subcategories manually

        Following the article about importing locations to DJ-Classifieds, here'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 ...
      • Configuration / Options

        Let's take a look before at the DJ-Catalog2 component configuration. Click the Options button which is located on the top-right toolbar and you will see the popup window: General Settings Theme settings Theme – choose component's theme. To start ...
      • Mollie DJ-Catalog2 integration

        Integrate DJ-Catalog2 with a Mollie payment processing solution and receive payments from your customers. Mollie is a pioneer in the payment industry. The company is also one of the fastest-growing payment processors within Europe.  Mollie offers ...
      • Mollie DJ-Catalog2 integration

        Integrate DJ-Catalog2 with a Mollie payment processing solution and receive payments from your customers. Mollie is a pioneer in the payment industry. The company is also one of the fastest-growing payment processors within Europe.  Mollie offers ...
      • PayLane DJ-Catalog2 integration

        Integrate DJ-Catalog2 with a PayLane payment processing solution and receive payments from your customers. PayLane is the payment method for users from Poland. It provides payments with credit cards (Visa and Master Card), Paypal, and polish payments ...