Import

Go to the System → Data → Import

You are able to import bulk data into your AbanteCart store using '.txt' or '.csv' spreadsheet-like files. Some of the fields (columns) are required for a successful import, yet nearly almost all fields are supported, allowing you to determine the level of detail you wish to import.
This is particularly useful when migrating and importing from a different eCommerce or Inventory platform.

Data upload is a significant and at the same time risky operation, you should consider a couple of things before starting the import process:

  • backup the database
  • product import success depends on the file, that undergoes data transfer. What fields are included and how information is organized really matters
  • new products won’t be added to the database until all the required fields are included in the file

Import Format Difference

In AbanteCart you can choose between native import format and free format.

This article describes import with the native AbanteCart format. If you are looking for a more simplified (but less controlled) way to import please try the easy-to-use import format with Import Wizard tool

Native Format

pros

control all values

control all languages

control all stores

can import orders, customers

cons

linking between objects by IDs - for example, you need to import categories first then find categories IDs and only after import products with categories ID's. Same with brands, stores, etc

a lot of columns to edit

if one column name incorrect it will be ignored

Free Format

pros

no IDs required - simply type names to add

fewer columns to edit - you can set multiple categories or image URLs in one

select columns meaning to be recognized as

preview first row of the imported file

you can import product almost from any data format

cons

import to only one language and store

not everything can be added (for example you can not add tags)

can not import orders, customers



Action Insert or Update

When using the native format, if you import data with table columns that have auto-increment indexes (e.g., product_id), the default action will be to update existing records. If you need to add new entries with auto-increment column values, you must explicitly specify the action as insert. To do this, add a new column labeled action to your CSV file and set its value to insert for each new entry.

in the same way, you can bulk remove products with action delete

Note: Ensure that the column name action is in lowercase and contains no spaces.

CSV editor tips

When editing CSV files, ensure your editor maintains data accuracy. For instance, Microsoft Excel may alter cell formats, such as converting dates to its internal format or changing price delimiters, which can lead to issues. Apple’s Numbers software opens CSV files correctly but, by default, only allows saving them with a comma delimiter (via File → Export To → CSV). OpenOffice is also a reliable tool; however, be cautious to select only a single delimiter when opening your CSV file, as OpenOffice supports combined delimiters, which should be avoided.



Example 1: Update products

In this example we will show how to easily update your existing products.

First export one or all products. Go to System → Data  Import/Export. In the Export Tab find Products, click to expand the table and select only product_descriptions table.

In the opened CSV file easy to update/edit this products fields:

products.model

products.quantity

products.price

products.weight

products.length

products.width

products.height

products.sort_order

product_descriptions[0].name

product_descriptions[0].description

Also, You can edit other fields. But You need to know your correct ids/values already existing in your data for this fields:

products.stock_status_id

products.manufacturer_id

products.shipping

products.tax_class_id

Then Import file. Go to System → Data  Import/Export. In the Import Tab select correct File to import and correct CSV/TXT delimiter. Click Import button.


After processing the message will be shown. Normally 0 errors should be displayed.



Example 2: Insert products

Before inserting a lot of new products just create a sample product in Admin → Catalog → Products with all fields you need.

Then export to CSV file. Make sure to select required tables like:

product_descriptions

products_to_categories

products_to_stores

or any other tables which one contain needed data for a configured sample product.

Then open exported CSV file in CSV editor like OpenOffice Calc, Microsoft Excel, etc.

Be sure to open a file with the correct CSV delimiter.

Copy row with sample product to make sure new product will be configured in the same way.

To insert new products using import tool you need to add a new column named action in the exported file. 

Make sure to:

leave empty 

products.product_id

type insert in the 

action column

and fill other columns like in exiting sample product.

Then Import file. Go to System → Data  Import/Export. In the Import Tab select correct File to import and correct CSV/TXT delimiter. Click Import button.

See CSV (TAB delimited) examples for insert :



Example 3: Product minimum insert

Very minimum example

Very minimum CSV file with columns allowing you to insert product with basic settings like name, weight, price, description, blurb, category id to assign, store id, tax class, quantity etc

products minimum CSV TAB delimited example abantecart_import_minimum.csv

In this example you can see some very important columns like products_to_stores[0].store_id

For most cases it is 0 (unless you have multiple stores).
products_to_categories[0].category_id is required to assign product to a storefront category.



Example 4: Insert products with Images

upload images by FTP to this path ../resources/image/somefolder/

permission for this folder to 777 (or 755)

change/add these columns in your CSV file

resource_map[0].resource_id              = leave empty

resource_map[0].object_name            = products

resource_library[0][0].type_id            = 1

resource_descriptions[0][0][0].language_id      = 1  (the id of installed language)

resource_descriptions[0][0][0].name             =    anyname (usually imagefile name)

resource_descriptions[0][0][0].title            =    leave empty or fill if you need title

resource_descriptions[0][0][0].description      =    leave empty or fill if you need description for the resource

resource_descriptions[0][0][0].resource_path    =    somefolder/product_image_1.jpg



in case You have 2 languages installed in your cart add the next columns

resource_descriptions[0][0][1].language_id      = 9  (the correct id of second installed language)

resource_descriptions[0][0][1].name             =    anyname (usually imagefile name)

resource_descriptions[0][0][1].title            =    leave empty or fill if you need it

resource_descriptions[0][0][1].description      =    leave empty or fill if you need it

resource_descriptions[0][0][1].resource_path    =    somefolder/product_image_1.jpg



------------------------------------------------------------------------------------

to add multiple images to one product please add more columns



resource_map[1].resource_id              = leave empty

resource_map[1].object_name           = products

resource_library[1][0].type_id            = 1

resource_descriptions[1][0][0].language_id   = 1 (the id of installed language)

resource_descriptions[1][0][0].name          = sometext (any resource name to second image)

resource_descriptions[1][0][0].title            =    leave empty or fill if you need it

resource_descriptions[1][0][0].description      =    leave empty or fill if you need it

resource_descriptions[1][0][0].resource_path = somefolder/product_image_2.jpg   (path to second image)



same for second language if you have it installed

resource_descriptions[1][0][1].language_id   = 9 (the correct id of second installed language)

resource_descriptions[1][0][1].name          = sometext (any resource name to second image)

resource_descriptions[1][0][1].title            =    leave empty or fill if you need it

resource_descriptions[1][0][1].description      =    leave empty or fill if you need it

resource_descriptions[1][0][1].resource_path = somefolder/product_image_2.jpg   (path to second image)





---------------------------------------------------------------------------------------

and to add one more image 

resource_map[2].resource_id                     = leave empty

resource_map[2].object_name            = products

resource_library[2][0].type_id            = 1

resource_descriptions[2][0][0].language_id   = 1 (the id of installed language)

resource_descriptions[2][0][0].name          = sometext (any resource name to 3rd image)

resource_descriptions[2][0][0].title            =    leave empty or fill if you need it

resource_descriptions[2][0][0].description      =    leave empty or fill if you need it

resource_descriptions[2][0][0].resource_path = somefolder/product_image_3.jpg   (path to second image)



resource_descriptions[2][0][1].language_id   = 9 (the id of second installed language)

resource_descriptions[2][0][1].name          = sometext (any resource name to 3rd image)

resource_descriptions[2][0][1].title            =    leave empty or fill if you need it

resource_descriptions[2][0][1].description      =    leave empty or fill if you need it

resource_descriptions[2][0][1].resource_path = somefolder/product_image_3.jpg   (path to second image)


insert_product_with_images.csv


Example 5: Import Resources by URL

For AbanteCart 1.2.6 and higher!

change/add this columns in your csv file

resource_map[0].type           = image

resource_map[0].source_url     = http://www.abantecart.com/images/devices.png

resource_map[0].source_path    = leave empty

resource_map[0].html_code      = <i class="fa fa-optin-monster">  (if you want to add html resource or leave empty)



------------------------------------------------------------------------------------

to add multiple images to one product please add more columns



resource_map[1].type          = image

resource_map[1].source_url    = http://www.abantecart.com/images/banners/admin_iphone.jpg

resource_map[2].type          = pdf

resource_map[2].source_url   = http://www.pdf995.com/samples/pdf.pdf

You can and more and more images for one product in a similar way


Example 6: Insert Product with Option and quantity pricing

You can and more product rows

product-insert-quantityprice.csv


Example 7: Update Product (add images to product)

You can and more product rows. The attached example is TAB delimited CSV file update_product_with_images.csv 

1. put your images to resources/image/folder_in_resource_directory
2. please use the attached TAB delimited CSV file as an example of how to update products (add resource image to products)
3. In the CSV file double-check you set a valid product id (first column) and the path to the image file (last column).
4. When import, make sure to select the correct delimiter!



More Examples

Download New Products Example (insert)

abantecart_import_test_new.csv

Download Update Products Example (update)

abantecart_import_test_existing.csv

AbanteCart, all rights reserved. 2024 ©