XML and CSV Import

Overview

The XML and CSV Import add-on lets you easily import products from any XML or CSV file to your CS-Cart store. Save yourself hours with this add-on and make inventory management hassle free.

With the XML Import add-on, your product data will be sent to your store keeping you ahead of your competitors with the newest products. You can be sure the product stock quantities are always up-to-date. The add-on allows you to automatically update product catalogs including changes to prices, inventory stock quantities, and new product additions.

An easy field mapping feature lets you easily overcome the divergent data formats of suppliers and synchronize only the appropriate data fields to your store.

Important

To import CSV files, please use Open Office or Libre Office Calculator. Microsoft Excel uses Windows-1251 character set while CS-Cart uses UTF-8 character set. There might be an error during the import if you are using MS Excel.

Download an example CSV file.

The add-on also enables you to import XML files with the YML (Yandex Market Language) format. Download an example YML file.

The XML and CSV Import add-on makes the complicated import tasks simple and fast.

Fields you can import

1. Product fields

  • Product code
  • Price
  • Currency
  • Category
  • External category id
  • External category parent_id
  • External category parent name
  • Secondary categories
  • List price
  • Status
  • Quantity
  • Weight
  • Min quantity
  • Max quantity
  • Quantity step
  • List qty count
  • Shipping freight
  • Date added
  • Downloadable
  • Language
  • Files
  • Ship downloadable
  • Inventory tracking
  • Out of stock actions
  • Free shipping
  • Zero price action
  • Detailed image
  • Additional images
  • Description
  • Short description
  • Meta keywords
  • Meta description
  • Search words
  • Page title
  • Promo text
  • Taxes
  • Product combinations
  • Combination quantity
  • Combination code
  • Available since

2. Product options

3. Product features

Features

  • Seamlessly import data in the XML, CSV, and YML formats.
  • Quickly upload and sync your product data including new products.
  • Keep up with pricing and inventory changes.
  • Enjoy the fields mapping and category mapping features.
  • Control the fields to be imported.
  • Import products automatically by a cron script.
  • Clone import profiles.
  • Allow/forbid administrators to manage import.

Compatibility

The add-on is compatible with CS-Cart and Multi-Vendor 4.3.8 and above.

Don’t know what archive to download to install the add-on? Read here.

Support

This add-on is developed and published by Simtech Development Ltd., a CS-Cart developer. You are guaranteed a quality add-on supported by the future versions. If you need help, please contact us via our help desk system.

Demo

Check out the XML and CSV Import add-on in our demo store.

Note

Every half an hour the demo store is reset to the default state.

Managing in the admin panel

Installing the add-on

Install the XML and CSV Import add-on on the add-ons list page (Add-ons → Manage add-ons). Click the + button in the top right corner, select an archive and click Upload & install. You can now find the installed add-on in the list of installed add-ons, just make sure it is set to Active.

Setting up the add-on

  • All vendors can import products—If enabled, vendors will be able to import products to the store.
  • Cron password—Enter a cron password that will be used to set up a cron script.
  • Notify administrator by e-mail when the import is completed—If enabled, the administrator will be notified of the completed import when it is made by cron.
  • Notify vendor by e-mail when the import is completed—If enabled, the vendors will be notified of the completed import when it is made by cron.
  • URL for product import—Use this link to run import by cron. For example, you can import the whole catalog every 24 hours and update prices and stock every 5 minutes. See How to set up a cron job in cPanel.

Use the following command:

php /path/to/cart/snikers.php --dispatch=run_import_xml.import --cron_password=MYPASS

where:

path/to/cart is the path to your website

cron_password is the access key to cron script that you should take from the Cron password field.

Importing data

The add-on creates a new XML and CSV import profile page, where you can see a list of all created profiles with the ability to delete, edit, add, and import profiles.

You can also see the import status:

  • Open—Means that an import profile has been created, but has not been imported yet.
  • Complete—Means that the import has been completed.
  • In progress—Means that the import is now running.
  • Redirect—Means that the first 1000 products have been imported. To complete import, run the import again.

To import products, follow these steps:

  1. Click the + button to add a new import profile.
  2. In the General tab, enter a name for the import profile and choose the type of the file you are going to import.

Note

If you want to import a file of another type, contact us for help.

Important

To import CSV files, please use Open Office or Libre Office Calculator. Microsoft Excel uses Windows-1251 character set while CS-Cart uses UTF-8 character set. There might be an error during the import if you are using MS Excel.

  1. Click Create.
  2. Switch to the Options tab and configure the following settings:

Select file—Choose location of the XML or CSV file with the import data and select this file.

Language—Select one of the enabled languages in the store.

Category delimiter—Select the delimiter of the category path which is used in the file.

Feature variants delimiter—Select a feature variants delimiter that is used in the file.

Images directory—Directory where images are located. This will be used if an image file is specified without a path. Specify the path to the directory where images are located. This is used if the image file is specified without a path in the file. Alternatively, you can specify the URL to the images directory. (It will be automatically used if the value contains http or https.

Files directory—Specify the path to the directory where product files (for downloadable products) are located. This is used if the File field data is specified without a path in the file.

Reset inventory—Quantity of all products in the store will be reset.

Price decimal separator—Type a decimal separator for product prices that is used in the file.

Option delimiter—Type a separator for option delimiter that is used in the file.

Price margin/discount—Specify a discount or margin in percentage or a fixed amount.

  1. Click Save.
  2. If you are importing a YML file or an XML file with containers, you will see the Containers tab. Otherwise, skip this step.

In the Containers tab, define the following settings:

  • Container of categories—Select the container that consists of product categories in the file to be imported. The drop-down list will have all containers from your file.

Have a look at this example. As you can see, the <categories> container consists of product categories.

  • Container of products—Select the container that consists of products in the file to be imported. The drop-down list will have all containers from your file.

Example:

The <offers> container contains products in this file.

Tip

Usually the containers are the following:

Categories—Product categories

Offers—Products

Offer—Specific product

  1. Click Save again to make further settings appear.
  2. In the Fields mapping tab, arrange a list of fields included in the data feed. Each field has the following attributes:

Field name—Name of the field.

Field type—Meaning of the data in the field.

Create—Tick the checkboxes next to the fields you want to import for new products.

Update—Tick the checkboxes next to the fields you want to update for existing products.

For YML and XML files with containers, also do the product fields mapping.

  1. In the Category mapping tab, you can match product categories from the import file with product categories in your store. Link categories manually if they were not linked automatically.

You can also quickly link and create multiple categories using the bulk editing feature.

  1. The Cron tab contains the command that you can run to make import start automatically according to a schedule. You can select one of the preset periods, or define your own.

In order to know how to set up cron, navigate to this section: How to set up a cron job in cPanel.

  1. Save the changes and click the Import button to run import.

The import process may take some time. You will see the result once it’s complete.

Cloning import profiles

The ability to clone import profiles will save you time on setting up profiles with similar settings.

To clone an import profile:

  1. Go to Add-ons > XML and CSV import.
  2. Select the profile you want to clone and hover the mouse pointer over it. Click the gear button and select Clone.
  1. The profile will be cloned and you will be redirected to the editing import profile page where you can adjust the import profile the way you need.

Note

The import profile is cloned with the Disabled status.

  1. Click Save.

Allowing/forbidding administrators to manage import

To allow/forbid administrators/managers to manage import, follow these steps:

  1. Go to Customers > User groups.
  2. Select an existing group or create a new one.
  1. Switch to the Privileges tab and find the Manage catalog privilege.

If you enable this privilege, administrators of this user group will have access to import functionality, i.e. they will be able to view, edit and start import.

If you disable this privilege, administrators of this user group will NOT have access to import functionality, i.e. they will NOT be able to view, edit or start import.

How to set up a cron job in cPanel

Cron Jobs are used for scheduling tasks to run on the server.

To create a cron job, complete the following steps:

  1. Select Cron Jobs in cPanel.
  1. Fill in the form to create a cron job. Specify when the cron job should be executed. In the Command field, enter the command that will execute the cron script. You can find it in the add-on settings. Do not forget to specify the path to your store.

The cron in the image below will run every day at 11:00PM.

Note

If you have any difficulties with cron setup, please contact your server administrator or contact us for help.

For more details, refer to cPanel Documentation.