This section describes how to perform products import to osCommerce from .csv file - bulk update of products.
Pay attention to each Wizard's page when import products to osCommerce. Import is a rather complicated procedure and it may be destructive if performed incorrectly. Create database backup before importing products, especially if you do it for the first time.
To import products to osCommerce follow a few steps:
1. First of all prepare a .csv file for Import. Make sure that all the necessary fields and data you'd like to import are listed in the table.
Product ID - is an internal database field. It should be of numeric type only and must have unique values across the entire table. The value from .csv file will not be imported from the file or changed at your store as it should be assigned automatically by shopping cart itself (other database tables can have references to this field pointing to specific products). During the import, ID can be used for identifying products only. Check more about product identification below (step 6).
Model (SKU) - is a standard, alphanumeric string that uniquely identifies the product. It is assigned to the product by manufacturer according to the procedure and is used internationally. You should be able to receive the standard code for all your products from your supplier easily. Just contact your supplier with this request. This field should have unique values and may be used for identifying products during the import, see step 6 for more information about product identification.
In Stock - this field acquires "0" or "1" value only. It states the availability of the product. For example, value "1" means that product is available in stock. In case it has "0" value, then the product is not available for purchasing and will not be displayed at your Store. In case you skip this column, your products will be set as out of stock and will not be shown at frontend of your store. To set in stock status for all products, please indicate 1 value for first product in your .csv file and expand it for all products.
Price - the product price is the cost of the product before taxing or shipping. Do not include any rebates, coupons, or bulk discounts. Prices should consist of whole numbers with a maximum of two decimal places. Price fields are numeric; no text is permitted. Do not include “$” or any other symbols.
Category - specify the category your product belongs to. If the product should be imported into subcategory use pipe character "|" to separate parent and subcategory, for example: "Computers|Keyboards" - the product will be assigned to Keyboards category.
If you need to assign the same product to multiple categories, use double delimiter, in your .csv file. Here is the example: "Computers|Keyboards||Computers|Other". After that the product will be assigned both to Keyboards and to Other category while import.In our case Pipe is used as category delimiter. Category delimiter character should be specified on the 5-th step. It is used to separate category names and specify full category tree path for given category. Category path is very similar to directory path and is used to specify full file name in Windows, where every directory separated by backslash (\) character, like in the following example: C:\Program Files\MagneticOne\Store Manager for ...\
In case your supplier provides you with the file that has categories in a separate columns, you can merge them to get appropriate format using Expressions field or you can merge them using Excel manually. Please follow these steps to merge categories using Expression field (is recommended to use with Automated Product Import):
'|' - is
category delimiter (which has been chosen at the previous step)
In order to merge category columns in Excel, please, use the following formula:
Product image - allows you to import images for the product. You can choose where you would like to upload images from - your local computer or external web URLs. Please note that in order to import images you have to set-up a proper FTP connection. Please check these articles: how to upload images from local pc , how to upload images if you have external image URLs if you need help.
Attributes - Store Manager requires a specific formatting for product attributes. You are welcome to export a few products with attributes and you'll see the format. Also you can see an example below. Please note that you can use Excel to merge your attributes in case they are in separate columns. You're welcome to contact your administrator for help or ask Google for help.
Click here to see a sample of correctly configured .csv file. If you cannot download the file, see the attached one at the bottom of the page.
If your vendor provides you product list in Excel, you can convert your Excel files to the CSV format by means of the Microsoft Excel or OpenOffice application, using the Save As option. Then you can access the Save As dialogue box, which contains a list of alternative file formats. Among the file extensions offered, you can find Text CSV file format. By saving your file into CSV format, Microsoft Excel or OpenOffice will export the first active worksheet with the correct delimiters.
2. To start Products Import you need to click on button that starts the Import/Export Wizard. Select "Import" and click "Next >" to proceed.
3. Specify the .csv file path and name or use browse button to select one.
Also you can load Import Settings that were saved earlier for the .csv file with the same format (file that includes same columns in the same order).
4. Source file preview shows a part of .csv file selected to import. There are no options to set, but you should pay attention to the option fields delimiter and quote character, if any is used.
If you carefully check the very first line of the example, you'll notice that some words enclosed in quotes (") and are separated by comma (,) symbol. That are two important options you have to pay attention to - you will have to setup these settings on the next page. Usually it is enough to see first line, no need to investigate the entire file.
Also you can enable and set the row # you want to start import from.
5. Select fields delimiter and quote character. If you specify wrong values, import may not work.
Delimiter character - is the delimiter that is used to
separate values (columns) in the .csv file. Most popular delimiters are
comma (,), semicolon (;) and tab character ( ), however other symbols can
be used as well. On previous sample page we have noticed that comma
symbol was used as delimiter and values were quoted with " symbol.
Specify two first settings as shown above.
Category delimiter character- we've discussed it on the first step when
we prepared .csv file. As you know categories
are organized in a form of tree, where parent category can contain one
or more subcategories, and subcategory can contain one or more other
categories. Category delimiter character is used to separate
category names and specify full category tree path for given category.
Category path is very similar to directory path used to specify full
file name in Windows, where every directory separated by backslash (\)
character like in the following example: C:\Program Files\MagneticOne\Store Manager for osCommerce\.
Image Import Options
6. The next page allows you to Link columns from .csv file to appropriate database fields.
First row in .csv file contains field names, but not values - Obviously it should be checked if first row of .csv file contains data, otherwise uncheck this option.
Products Identification Method - It is the topmost option as
import will search
for a product using selected method of identification. The product will
be modified if found, if not - new product will be added. Lets say you
choose option Identify Products By Product ID . How it is performed:
[Auto Fill...] button - try to set correspondence automatically for all fields. Auto fill option will work only if .csv column name is the same as database field name ("translated").
[Clear] button - clear all "csv col" values at the left pane.
Click "Next" if you're done.
7. Base Formats and Separators are used to convert text values from .csv file to numerical and date values. You can just set default values using an appropriate button.
If red blinking arrow appears, it means that some errors occurred and you have to fix them.
Also you can enable and set the row # you want to start import from.
9. Import options page settings may affect Import results. Please read and check your selection carefully.
Save Import Configuration
All import settings can be stored under some configuration. You can load it next time you decide to import products from a file with similar formatting, column names etc.
Attention! Import process will start, when you press "Import" Button! Proceed only if all settings are made, otherwise press "Back" Button and check the settings once more!
10. On the last step of Import Products Wizard you will see whether any errors occur during import. Also you will see logs with details.
Most frequent import errors are date, time and number conversion
issues, caused by invalid format settings (specified at the previous pages)
or improperly assigned columns (i.e. if you assign column containing
text data to numeric database field).
Date/time conversion errors might be ignored, whereas other errors (like this one Could not find image: image_name.gif) have to be fixed.
If you need assistance with import configuration, we'll gladly help you
to setup everything correctly for additional fee. Please contact us at contact[at]oscommerce-manager[dot]com for details.