Introduction

Smart Import Export is a user-friendly module that allows users to export and import channel data by CSV, XML and JSON formats without writing any queries. Smart Import Export module is a powerful tool to export and import the data of default field types as well as third party field types.

Compatibility

EE Compatible Version: EE3, EE4, EE5.

Some of the features of Smart Import Export are listed below:

  1. Easy to Install and use.
  2. Exports and Imports channel entries without writing queries. (channel wise)
  3. It supports MSM sites.
  4. It handles large entries while exporting and importing.
  5. It exports and imports the entries by CSV, XML and JSON formats.
  6. It allows filtering entries by their Status for Export.
  7. It exports and imports all the primary data such as Channel title, URL title, Entry date, Author, Status, and Categories, etc.
  8. It allows the user to choose the custom fields while exporting and importing.
  9. It allows user to Map data values to a channel’s fields while importing.
  10. It supports Relationship fields to export/import and facilitates users to choose the base of relationship entries to export. i.e., Title, URL title, Entry ID.
  11. It supports Grid and Fluid fields to export and import.
  12. It supports Relationship fields inside Grid and Fluid fields for export and import.
  13. It supports Grid fields inside the Fluid field. Supports each relationship field that is inside the GRID. (That GRID is inside Fluid).
  14. It supports Images export and import by its URLs.
  15. It supports all default field types for export.
  16. It supports below third party field types:
    1. Assets
    2. Wygwam
    3. Smart Members Field
    4. Tags

Note: We are not providing support for EE3.

Installation

Follow below steps to install Smart Import Export version:

EE3, EE4 and EE5:

  1. Download and Extract ZIP file of the module. (We recommend to use latest version.)
  2. Copy “SmartImportExport > system > user > addons > smart_import_export” folder to “Your Site > system > user > addons” Folder.
  3. Copy “SmartImportExport > themes > user > smart_import_export” folder to “Your Site > themes > user” Folder.
  4. Login to backend panel with Super admin credentials.
  5. Go to “Developer > Add-Ons” and Install Smart Import Export module.

Note: If you purchased the addon from Devot:ee then you can get the license key from the licenses tab in your profile.

Export General Settings

General Settings:

  1. Encode or Decode Exported content?:

    You can set this parameter to encode or decode exported content. Encode / Decode will be perform for encode into UTF-8 or decode from UTF-8.

  2. Convert all timestamp dates:

    You can pass valid date format to convert timestamp to valid date formats. You can refer this URL for all PHP date formats. (ex: Y-m-d H:i:s). Leave blank to keep exporting in timestamp format.

  3. Encode HTML tags:

    If enable this field, it will convert HTML tags to HTML entities (ex: <p> => &lt;p&gt)

  4. Download file anyway if there is no entries found to export?:

    If Enabled this field, It will download even a blank file. If Disabled, It will show standard EE error.

CSV Settings:

  1. Separator for single dimension array:

    If you have assets or channel images for example. All images will be separated by your separator. ex: (abc.png | def.png)

  2. Convert type for Multi dimension array:

    You can select convert type for Multi dimension array to fit in single column/line. We provide four options for this.

    • JSON
    • Serialize
    • JSON + Base64 Encode
    • Serialize + Base64 Encode

XML Settings:

  1. Root Tag name:

    You can provide the tag name for main root entity to wrap all data in it.

  2. Element Tag name:

    You can provide the tag name for individual set of given data.

Create new Export

To create a new export, go to backend Smart Import Export settings. Click on “Create new Export” link.

In the process of creating a new export, You need to select the channel you want to export.

After selecting the channel, Full settings stack will show.

Select which default and custom fields you want to export and fill general settings.

General Settings are described as below:

  1. Export Name:
     Name of your current export settings. This field is just a label of your export.
  2. Access export URL without Login ?: 
    In case if you want to export these settings outside of EE without any login, Mark this as “Yes.”
  3. Export Type: 
    Mark this Export as “Private” will not allow any other guest or site user to download this Export. You and only you will be allowed to download this export. In case, if you mark this Export as “Public”, anyone can access and be able to download this export.
  4. Export Procedure: 
    There are two ways to export channel data.

    1. Normal: 
      Click and download export on a single click. In this method, no AJAX will fire. If you have plenty of entries to export and your server memory_limit and max_input_vars is low in comparison to total entries to export in a single shot, it will give you memory_limit error or 500 internal server error. This process is recommended if you have a low number of entries to export.
    2. AJAX: 
      Loop base AJAX export. This method will calculate the total number of entries and divide ajax calls by batches you have entered in settings. Default batches are 50. So, suppose you have 10,000 entries to export, and you chose AJAX export with batches of 100 entries per ajax call. It will throw 100 calls of AJAX on your download button (one by one). After completing all the ajax calls, it will give you a URL to download the generated file. This method is highly recommended if you have plenty of entries to export in a single file. No matter if you have hundreds or thousands of entries, with this method, it’s too easy to generate an export file.
  5. At last, you have to select the format in which you want the exported data. We have 2 types of export formats. (CSV and XML).

Create new Import

To create a new import, go to backend Smart Import Export settings. Click on “Create new Import” link.

In the process of creating a new import, you need to select the file type (CSV/XML) for import. You need to select a channel to import the data into it.

If you select CSV in file type then CSV related fields will be shown.

  1. File Name or URL of File: 
    You have to provide the file name with the system path which you want to import.
  2. Delimiter (Optional): 
    You can provide the delimiter eg. comma (,). This character is used to separate the fields of the file.
  3. Encloser (Optional): 
    You can provide the enclosure which is used to enclose each field of the file.
  4. Fields of first row as titles: 
    if this field is checked means the system considers the first row as title.

If you select XML in file type then XML related fields will be shown.

  1. File Name or URL of File:
     You have to provide the file name with system path which you want to import.
  2. XML Path:
     XPath is used to navigate through elements and attributes in an XML file. Generally, XML file is created with “root” and “elements” tags so XML path is considered as “/root/elements”.

Then, save the form by clicking on the “Save Action” button, then full settings stack will be shown.

Default Fields Section:

This section shows the all default fields of the channel.

You have to map default fields by selecting the appropriate options from the select box. For eg, for the “Title” field, you have to select the title option of the select box.

Group Fields Section:

This section shows all the group fields of the channel which are considered as custom fields.

You have to map the group fields using the appropriate options from the select box.

For eg. “about_image” is a grid field which contains the “Image”, “Caption” and “Alignment” fields. You have to map this grid field according to below information

  • “about_image ( grid )”” is mapped with “about_image” option.
  • “about_image ( grid ) >> Image ( file )” is mapped with “about_image->image” option. For file type fields, user can select the option of directory by “Upload Dir.” field where they want to upload the files during the import. For this thing, user have to select the “Yes” option in “Want to fetch?” field.
  • “about_image ( grid ) >> Caption ( text )” is mapped with “about_image->caption” option.
  • “about_image ( grid ) >> Alignment? ( select )” is mapped with “about_image->align” option.

Individual Fields Section:

This section shows all the Individual fields of the channel which are considered as custom fields.

You have to map the Individual fields using the appropriate options from the select box.

For eg. “simple asset field” (Field type: assets) is the third party field which is mapped by the “simple_assets_field”.

Check for duplicate entries:

  1. Use this field to check for the duplicate entries:
     This field is checked for duplicate value based on the selected option for the entries to import.
  2. Duplicate Action:
     This field is used to define the action when any entry already existed in the channel.

    1. Update:
      Duplicate entry is updated with the data of the export file during the import process.
    2. Delete:
      Duplicate entry is deleted first, then system insert with the new entry.
    3. Insert New Row:
      System considers the new entry event if the system finds the duplicate entry in system.

Categories Section:

This section shows import setting of all the categories of the selected channel.

  1. Category Default Value: 
    You can assign the default category value to every entry.
  2. Category Group: 
    You can assign the category group to the entries by mapping this field with the related column of the import file.
  3. Category Delimiter:
     You need to provide the Delimiter value for the categories values of the entries which is defined in the import file. Generally, it is the Comma(“,”).

Import Settings:

  1. Import Name:
     Name of your current import settings. This field is just a label of your import.
  2. Import Comment:
     Description about the current import setting.
  3. Batches: 
    Select how many entries you want to import at a time. (All entries will import in batches. Your import process will complete once all batches imported.)

Custom Sidebar

We provide one “customSidebar” function in the MCP file. You can add more menus in the sidebar of the addon using this function.

/* To get dynamic menu in the addon */    
   function customSidebar(){
       $sidebar = ee('CP/Sidebar')->make();
       $this->navSettings  = $sidebar->addHeader('Test Link', '');
   }

Run Export

You can now run export from front end templates. All you need to pass is single tag:

 {exp:smart_import_export:run}

This parameter has view modifier functions. We suggest you use it in a blank template only.

Parameters

  1. id
  2. token
  3. start_date
  4. end_date
  5. entry_id
  6. type

Following Parameters can be use Run tag:

id

This parameter will inform the tag to download the given export ID. This is an alternative parameter of token.
Example:

id="1"

token

This parameter will inform the tag to download given export Token. You can get a token of a given export by clicking on the popup URL on backend table settings. This is an alternative parameter of ID.
Example:

token="ae17e17a80c87776426efd6e164df3a8"

start_date

This parameter is created to override default “Start date” that is specified in export form. You can set a valid timestamp of export entry start date. This parameter will force you to download entries whose entry_date is greater then given timestamp.
Note: To use this parameter, You must need to set “Enable Date wise filter?” to “Yes” in export form.
Example:

start_date="1527061200"

end_date

This parameter is created to override default “End date” that is specified in export form. You can set a valid timestamp of the export entry end date. This parameter will force you to download entries whose entry_date is less then given timestamp.
Note: To use this parameter, you must set “Enable Date wise filter?” to “Yes” in export form
Example:

end_date="1527061200"

entry_id

You can specify which entries should export or which entries should not. This parameter will override all default entries export to limit only specific entries to export.
Example:

entry_id="20|55|48|800|700" entry_id="not 23|36"

type

You can specify if you want to download export on 1 click or AJAX. Passing this parameter will load its own view and you cannot use your view on it. (You can modify it if you want.)
Example:

type="ajax"

Example:

{exp:smart_import_export:run token="{segment_2}" type="ajax" entry_id="8|9|10" start_date="1527050000" end_date="1527061200"}

Changelog

V0.0.1

  • Initial Version

V2.0.0

  • Updated the license verification process and setup so please update the license in your addon.

Loading your cart...