Smart Import Export
Overview
Description
Smart Import Export is an ExpressionEngine extension developed by ZealousWeb Technologies. It provides user-friendly modules that allow you to seamlessly import and export channel data in multiple formats, including JSON, XML, and CSV. With its intuitive interface, managing data transfers becomes quick, efficient, and hassle-free.
Plugin's purpose and benefits
- PHP 8.2 Compatibility: Fully optimized for the latest PHP version.
- Effortless Setup : Easy to install, configure, and start using right away.
- Channel-Wise Import & Export : Move channel entries without writing queries.
- MSM Support : Works seamlessly with multiple site managers (MSM) setups.
- Handles Large Data : Capable of importing and exporting large entry sets smoothly.
- Multiple Formats : Supports XML, CSV, and JSON import/export.
- Filter by Status : Export entries based on their status.
- Primary Data Coverage : Includes channel title, URL title, entry date, author, status, categories, and more.
- Custom Field Support : Choose specific fields to include while importing/exporting.
- Field Mapping : Map imported values directly to channel fields for accuracy.
- Relationships Handling : Export/import relationships with options to base them on Title, URL title, or Entry ID.
- Grid & Fluid Fields Support : Export/import complex field structures, including nested relationships.
- Media Handling : Export/import images using their URLs.
- Default & Third-Party Field Support : Works with all default field types plus popular third-party ones like:
- Assets
- Wygwam
- Smart Members Field
- Tags
Get Started
Quick setup instructions
How To Use & Features
Export General Settings
- Encode or Decode Exported Content
Choose whether to encode or decode exported content.
- Encode → Converts content into UTF-8.
- Decode → Converts content from UTF-8 back to a readable format.
- Convert All Timestamp Dates
Provide a valid PHP date format (e.g., Y-m-d H:i:s) to convert timestamps into human-readable dates.
- Leave blank to keep timestamps in their original format.
- Reference: PHP Date Formats.
- Encode HTML Tags
Enable this option to convert HTML tags into HTML entities.
- Download File if No Entries Found
- Enabled → Downloads an empty export file even when no entries exist.
- Disabled → Shows the default "No entries found" error message.
CSV Settings
- Separator for Single-Dimension Array
Define the separator used when exporting arrays such as assets or channel images.
- Example: abc.png | def.png
- Default separator is |, but you can customize it as needed.
- Convert Type for Multi-Dimensional Array
Choose how multi-dimensional arrays should be converted to fit into a single column/line in the CSV export. Available options:
- JSON → Exports array in JSON format.
- Serialize → Exports array in PHP serialized format.
- JSON + Base64 Encode → Encodes JSON output in Base64.
- Serialize + Base64 Encode → Encodes serialized output in Base64.
XML Settings
- Root Tag Name
Define the tag name for the main root element that wraps all exported data.
- Element Tag Name
Define the tag name for each individual data set within the root element.
Create New Export
To create a new export:
- Navigate to the Smart Import Export settings in the backend.
- Click on the “Create New Export” link.
- Configure the export settings (General, CSV, XML) as needed.
- Save and run the export.
During the export creation process, you will be prompted to select the channel you want to export data from.
- Only data from the chosen channel will be included in the export file.
- Ensure you pick the correct channel before proceeding to configure other settings (General, CSV, XML, etc.).
After selecting the channel, the full settings stack will be displayed.
- You can now configure General Settings, CSV Settings, and XML Settings based on your export requirements.
- Each setting group controls how the exported data will be formatted and structured.
- Review all options carefully to ensure the output matches your needs before running the export.
Select Fields and Fill General Settings
Once the settings stack is displayed:
Select Fields to Export
- Choose which default fields (provided by the system) and custom fields (created by you) should be included in the export file
- You can select multiple fields depending on your requirements.
Fill General Settings
- Configure the options under General Settings (e.g., encoding, timestamp format, HTML tag encoding, file download behavior).
- These settings determine the overall structure and formatting of your exported file.
General Settings
- Export Name
A label for your export configuration. This name is only for identification purposes.
- Access Export URL Without Login?
- Yes → Allows the export file to be accessed outside of ExpressionEngine without requiring login.
- No → Export file is restricted to logged-in users only.
- Export Type
- Private → Only you can download this export file. Guests and other site users are not allowed.
- Public → Export file can be accessed and downloaded by anyone with the URL.
- Export Procedure
Two methods are available to handle the export process:
- Export Format
Select the format for the exported data:
- CSV
- XML
Create New Import
To create a new import:
- Navigate to the Smart Import Export settings in the backend.
- Click on the “Create New Import” link.
- Upload or select the file you want to import.
- Configure the import settings as required (General, Field Mapping, etc.).
- Save and run the import.
Select File Type and Channel
When creating a new import:
- Select File Type
- Select Channel
CSV Import Settings
If you select CSV as the file type, the following settings will appear:
- File Name or URL of File
- Enter the system path or URL of the CSV file you want to import.
- The system will read and process data from this file.
- Delimiter (Optional)
- Define the character used to separate fields in the CSV file.
- Example: (comma) or | (pipe).
- If left blank, the default delimiter will be used.
- Encloser (Optional)
- Define the character used to enclose each field in the CSV file.
- Example: " (double quotes).
- Helps preserve special characters or commas inside field values.
- Fields of First Row as Titles
- Enable this option if the first row of the CSV file contains field names (titles).
- If unchecked, the first row will be treated as data instead of titles.
XML Import Settings
If you select XML as the file type, the following settings will appear:
- File Name or URL of File
- Enter the system path or URL of the XML file you want to import.
- The system will read and process data from this file.
- XML Path
- Define the XPath used to navigate through elements and attributes in the XML file.
- Typically, XML files are structured with a root element and nested elements.
- Example: /root/elements
Save Action and Configure Settings
After selecting the file type (CSV or XML) and filling in the required fields:
- Click on the “Save Action” button.
- Once saved, the full settings stack will be displayed.
- Here, you can configure General Settings, Field Mapping, and other import options
- These settings control how the imported data will be processed and mapped into your selected channel.
Default Fields Section
This section displays all the default fields of the selected channel.
- You must map each default field by choosing the appropriate option from the dropdown (select box).
- Example: For the “Title” field in the channel, select the Title option from the dropdown list.
- Proper mapping ensures that imported data is correctly assigned to the corresponding default fields in the channel.
Group Fields Section
This section displays all the group fields of the selected channel, which are considered custom fields.
- You must map each group field using the appropriate option from the dropdown (select box).
- Group fields may include Grid fields, where multiple sub-fields are nested within a single field.
Example: Mapping a Grid Field (about_image)
The about_image grid contains three sub-fields: Image, Caption, and Alignment. Here’s how to map them correctly:
- Grid Field Mapping
- about_image (grid) → about_image
- Sub-field: Image (file)
- about_image (grid) >> Image (file) → about_image->image
- For file-type fields, select the desired upload directory using the Upload Dir. option.
- To fetch files during import, set the Want to fetch? field to Yes.
- Sub-field: Caption (text)
- about_image (grid) >> Caption (text) → about_image->caption
- Sub-field: Alignment (select)
- about_image (grid) >> Alignment (select) → about_image->align
Individual Fields Section
This section displays all the individual fields of the selected channel, which are considered custom fields (non-grid fields).
- You must map each individual field by selecting the appropriate option from the dropdown (select box).
- This ensures that data from the import file is properly assigned to the channel’s custom fields.
Example: Mapping an Individual Field
- Field Name: simple asset field
- Field Type: Assets (third-party field type)
- Mapping: simple_assets_field
Image - 15
Check for Duplicate Entries
This section controls how the system handles duplicate records during the import process.
- Check for Duplicate Entries
- Enable this option to compare incoming data against existing channel entries.
- The system will identify duplicates based on the selected field (e.g., Title, Entry ID, or another unique field).
- Duplicate Action
Define what should happen when a duplicate entry is detected
- Update → Updates the existing entry with data from the import file.
- Delete → Deletes the existing entry and inserts a new one with the import data.
- Insert New Row → Ignores the duplicate check and creates a new entry, even if the same record already exists.
- Delete Existing Entries
- If set to Yes, the system will delete any entries in the selected channel that are not processed (neither updated nor created) during the import.
- Useful for keeping the channel fully in sync with the import file.
Image - 16
Categories Section
The Categories Section manages how categories are assigned, created, and structured during the import process. These settings ensure that imported data is properly mapped to your category hierarchy.
- Category Default Value
- Description: Assigns a default category value to all entries during import.
- Usage: Useful when the import file does not contain category information.
- Category Group
- Description: Maps imported entries to a specific category group.
- Usage: Match this field with the related column in the import file.
- Category Delimiter
- Description: Defines the delimiter used to separate multiple categories within the import file.
- Default: Comma (,)
- Example: Books, Electronics, Toys
- Parent–Child Category Delimiter
- Description: Specifies the delimiter used to represent hierarchical relationships between parent and child categories.
- Example
- Import Value: - Flower / Artificial Flower, Flower / Original Flower
- Explanationr
- Flower = Parent category
- Artificial Flower and Original Flower = Child categories
- Here, the delimiter / defines the parent–child relationship.
- Create Category if It Does Not Exist
- Description: Automatically creates categories that are not already present in the system.
- Options:
- Enabled – New categories will be created
- Disabled – Import will skip unknown categories.
- Force Exact Categories
- Description: Ensures categories are matched at the exact level in the hierarchy.
- Example
- Category structure: Flower / Original Flower
- If you pass only Original Flower:
- With Force Exact Disabled → It will be matched automatically under Flower.
- With Force Exact Enabled → The import will only search for Original Flower as a top-level category. To correctly map it, you must pass the full path:
- Flower / Original Flower
Image - 17
Import Settings
The Import Settings section lets you configure general preferences for each import process. These settings help you label, document, and control how entries are imported
- Import Name
- Description: A label for your import settings.
- Usage: Helps you identify and manage different import configurations.
- Import Comment
- Description: A description or note about the import settings.
- Usage: Useful for adding context, purpose, or reminders about the import process.
- Batches
- Description: Defines how many entries are processed in each import batch.
- Usage:
- Large imports are divided into smaller batches for better performance and reliability.
- The import process continues until all batches are completed.
Custom Sidebar
The Custom Sidebar feature allows you to extend the add-on’s sidebar by adding your own menu items. This is done using the customSidebar function provided in the MCP (Module Control Panel) file.
/* To get dynamic menu in the addon */ function customSidebar(){ $sidebar = ee('CP/Sidebar')->make(); $this->navSettings = $sidebar->addHeader('Test Li }
Import Cron
You can execute the specific import using the cron. The cron URL of the specific import can be obtained from the “Import List” page. You have to click on the “Link” icon button for the specific import.
Image - 18
One popup box shows the import URL and you can also copy it using the “Copy to clipboard” button.
Image - 19
Example of the cron URL: https://www.example.com/?ACT=72&token=TOKEN
Here, The value of the ACT is the action ID and it is different for your setup because it is dynamically created at the time of installing the add-on. TOKEN is the unique identifier of the import.
This cron method is suitable for single import via a single URL.
If you want to execute multiple imports using a single URL then you can achieve this thing using the import template tag.
For this thing, you have to create one template file. For example, you can create the template group “home” and template file “import” and then add below template tags inside it.
{exp:smart_import_export:run_import token=”TOKEN_1″} {exp:smart_import_export:run_import token=”TOKEN_2″}
Here, the value of the token can be get from the “Import List” page.
Image - 20 Image - 21 To run these imports, you have to visit this “https://www.example.com/home/import” URL.
Get Support
FAQs
Which filetype generated by this add-on
This add-on generates only CSV and JSON file types in export.
Which filetype supports for import by this add-on
This add-on generates only CSV, XML, and JSON file types in import.
Is this add-on working with CRON job
Yes, it supports.
Change log
Version 3.2.14
- Fixed an issue in the Smart Import/Export add-on where imported entries were not appearing in search results.
version 3.2.13
- Parsed {file:xxx:url} tag.
- Fixed a few PHP deprecated messages.
version 3.2.12
- Fixed the PHP 8 deprecation warning.
version 3.2.11
- Fixed the PHP 8 deprecation warning.
version 3.2.10
- Compatibility of PHP Version 8.2.
version 3.2.9
- fixed UTF-8 encoding issue in XML import.
version 3.2.7
- Solved issue of Author select box and add one more option to Deselect it while updating entries.
Version 3.2.6
- Fix structure import issue
- Fix export list count issue
Version 3.2.5
- Fixed MariaDB column length issue
Version 3.2.4
- Fixed subscription module in latest copy
Version 3.2.3
- Fixed date filter issue.
Version 3.2.2
- Fixed Fluid field and JSON import issues.
Version 3.2.1
- Asset import with XML issue solved when xml tag have more than one URL.
- Removed “se–” and add “item” tag during export to set the array of the column.
Version 3.2.0
- JSON import functionality changes and new setting parameter added in JSON import.
Version 3.1.13
- Bug fixing.
version 3.1.12
- Added new option in CSV import while there is no encloser in the data
- Solved a bug while user select a field other than title URL title field for the duplicate check in Third party XML datatype import
version 3.1.11
- Added file_grid field type support
- Solved some bugs for third party add-ons
- solved some issues for the category import
version 3.1.10
- Solved issue for the CSV Delimiter and Encloser issue
version 3.1.9
- Support added for Smart SEO, SEEO, SEO Lite, Transcribe, Structure, Maps, Polls, Wygwam, low variables, Low events
version 3.1.8
- Allowed special character in channel entry Title field while importing channel entries
version 3.1.7
- Solved unselect dropdown option during edit import configuration
version 3.1.6
- Introduce new data-type as “Third party xml” to import XML feed from other sources and set it into the entry.
- Now user can set author to the imported entries from the system’s super admin role/group.
- Import batch limit increased to 200 (added 50, 75, 100, 150, 200)
version 3.1.5
- Solved the issue of non-encoded characters in the export by providing the setting of “Disable ob_start and ob_clean functions for export” in “Export General Settings.”
- Solved MSM import issue while import process performed via import URL.
version 3.1.4
- Provided the option to create the category if it does not exist during the import.
- Provided option to define the parent-child category delimiter to specify the relationship in the import setting.
version 3.1.3
- Solved issue of not saving JSON format in the export setting page.
- File related setting field is added for the fluid field on the import mapping page.
- Solved issue of the category not imported for the JSON file.
version 3.1.2
- Solved warning during to update an add-on.
- Increase the width of the dropdown in the import screen to display more information.
- Solved warning during the “Upload Dir.” not selected but assets field is selected.
version 3.1.1
- Solved the mapping and data fetching issue in the fluid field for the XML file.
version 3.1.0
- Solved the CP warnings in the import page.
- An added feature of providing three options for importing the grid fields.
1. Delete all existing rows and add new
2. Keep existing rows and append new
3. Update the rows if the specific column matches
version 3.0.9
- Solved issue of not working relationship field in group field and XML type of file.
version 3.0.8
- Added the feature of the cron for the import. Get more detail from here
version 3.0.7
- Provide the ability to mapping the column for the CSV file when the CSV file does not include the title row.
- Provide the option to delete existing entries of the selected channel which are not included in the import
- Automatic generates url_titls from the title when doesn’t provide any value to url_title.
- If url_title is provided as a raw string, Smart Import Export converts it ExpressionEngine friendly url_title.
- Solved the issue when sometimes selected the option not rendering when user going to edit the import configuration.
- When a user doesn’t provide any appropriate status value then channel default status will be provided.
- Predefined status_id (integer value) and status(status name) both are acceptable in the status field.
version 3.0.2
- Solved issue of category data from the XML file for import.
version 3.0.1
- Added the mapping of the status and author for import.
version 2.0.0
- Updated the license verification process and setup so please update the license in your addon.
version 0.0.1
- Initial Version