(New!) Check the video guide for DJ-Classifieds Importer
DJ-Classifieds-Importer component provides an option to import any data to DJ-Classifieds. Do you have other classified solution and want to migrate to DJ-Classifieds? Nothing easiest, just export your data to XML and import with this component!
How to start?
1. Check if your XML file contains fields other than core fields from DJ-Classifieds.
In example XML we have 6 extra fields [size_m2, bathrooms,bedrooms,floor,garage,internet,basement].
Please create suitable fields in your DJ-Classifieds extra fields section:
Make sure all fields from XML are also visible in your DJ-Classifieds extra fields.
2. Next, you need to create a group for feeds in importer, in the example, we used 'Real Estate'.
3. Now you need to create XML and DJ-Classifieds fields connections
3.1 In importer field you need to specify
- Name - It's field custom name (not used during import, only for information purpose)
- Field's attribute - [optional] if the value of the field is stored in fields attribute then provide the attribute name
- Group - Group of fields to import
- Created Date and Created By - fields not used during import
- Field's source name - a name of the field in your XML item element
- Destination field's type - a type of DJ-Classifieds field
Example of standard fields configuration:
start date
title
garage [value]
garage size [attribute]
3.2 If you want to put few XML elements into one DJ-CLassifieds field you can create 2 importer fields that lead to the same DJ-Classifieds field. For example with DJ-Classifieds field 'contact' we can connect:
XML field 'contact'
and 'application_email'
3.3 If your fields are embedded like in below example:
<location> <country>US</country> <region>Michigan</region> <postal_code>48909</postal_code> </location>
Then in field "Field's source name" you need to put a path to this field separated by '|'.
So, in this case, it will be:
and for the second level of regions:
3.4 For elements like regions, categories, types. You can also set a type of synchronization. So, if an element with this name doesn't exist you can force importer to create this element.
3.5 For Images groups like:
<fotos> <foto>image1_url</foto> <foto>image2_url</foto> <foto>image3_url</foto> </fotos>
You need to set into "Field's source name" the group name of elements and into "Source sub name" name of single photo element. Example:
4. Now, when we have all fields and connections created you can set up a feed.
- Group - your feed group where all fields were
- Name - Your custom name of the feed
- Description - Your custom Description
- Url of synchronization - Link to your feed
- XML path to parent item - path to the parent group of items for import (you can separate elements by | )
- XML parent item - name of single item object
- Item external ID field - name if object id field, it helps for the updating process
- Action on the duplicated item - You can decide what importer should do with previously imported items (compare on id field)
- Ads' author - default adverts author
- Expiration date (days) - default expiration duration
- Synchronization protocol - type of import protocol, for HTTPS POST curl is used
Example configuration:
5. Remember to insert Google API keys in DJ-Classifieds configuration because DJ-CLassifieds Importer uses required libraries.
6. After feed creation and DJ-Classifieds configuration you can use "Import data" button on feeds list
Enjoy!