3.4. Import Product Data
Note: Before import, in case you perform it for the first time, we strongly recommend to make a backup of your store database!
The [Import Data] option on the Product page serves for transferring product details from a separate file or Google Sheets to your store.
Import Data From a File
To import your data make sure you prepared the correct file with all required fields in it.
Here's a list of data that import file may include, along with a detailed description of those fields:
"Product ID". This is an internal database field, it should be of numeric type only and must have unique values across the entire table.
Note: the value from the selected 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).
"Price" (Regular Price). It is the base cost of the products that does not include any taxes, discounts or coupons. Price fields are numeric; no text is permitted - do not include “$” or any other symbols.
"Stock". This is the amount of your products at your store. If you set "0" quantity or leave the current field blank, the products will be displayed at the front-end as "Out of Stock".
"Name" - the official name (title) of your products at your store.
In case your file is readable and accessible, you may start importing.
Press the [Import Data] button on the upper menu of the Products pane.
1. The first step holds an area to specify the file that is used for importing. Check one of the following checkboxes:
"Local file". This means you should indicate the local path to a file from your computer (locally).
"HTTP URL to file". If your file is located on the webserver and you have the necessary access to the web directory, specify the URL external path in the appropriate field.
"FTP URL to file". In case your file with data to import is placed on the FTP server, specify your FTP details in the form. Use the browse button to find the file on a server.
It is also recommended to select the "Use passive mode" check-box to get the data from the FTP server while importing.
In the lower area of the page, there is the button that helps to use previously saved import configurations if any. You can also delete previosly saved configuration or clear the list of configurations with the relevant options fro m the drop-down list.
2. The "Select fields delimiter and quote characters" page contains some important settings to separate data.
It is recommended to keep the "First row in..." check-box selected if your file to import contains the field names in the first row. In other cases, it should be unselected.
3. "Field Link" is the most important step where you should link the columns from a file to the relevant fields in your store database.
"Identification Fields" - use the triangle button t open the drop-down list with all possible identifiers, check the neccessary ones in order to identify how WooCommerce import will search for a product. The product will be modified if found, if not - a new product will be added.
Also use the frop-down list in every field to find the necessary source field.
Or select the field on the left and double-clicks on the corresponding columns on the right to make it assigned to the selected position.
To autofill selected columns, use the relevant button on the top toolbar. If you need to clear values of the selected fields, press the relevant button.
[Auto Link All] works only when the file columns names are the same as the store daatbase fields.
[Unlink All] clears all "csv col" values in the left pane.
To be able to link attributes to the corresponding fields of your store database, create an additional column by pressing the button with plus on the top toolbar.
This opens the form, where you should specify the necessary attribute value and click the [OK] button.
The additional field will be added to the columns listing in the left pane and will be mapped automatically to the relevant field from a file with all data values in it.
Press the button with minus to remove selected variation attribute from the list (available only for a taxonomy type!)
[Add Custom SQL] gives an opportunity to create and use the extended expression formula for your data during importing. Note: you should have some SQL skills to generate a proper query.
Check this chapter about the current option's functionality and application.
Use the [Help] button at the top for more details on expression special SQL syntax with provided examples.
On the right pane, you can see an area for "Skip Rules" creation
Fill the form which appears:
Specify the rule’s type value - from resource file, from store database or from the expression.
Indicate the value that will be used for your rule.
Clarify the equation sign between two parts of the rule.
When you use the expression formula, you should specify the value to which this expression will be used. You can take if from the store database or from a file’s data.
To make a formula for data generating, open the Expression Editor and create the necessary formula. With the simple expression, you can increase/decrease products price after import, combine some values positions in the relevant fields of store database, send items in "Out of Stock" mode automatically provided that their quantity become "0" after importing and more.
For example, if you want to merge the columns with the Description and Product Name (Title) use the CONCAT function and press the [Insert...] button on the toolbar to select the necessary fields value.
Your expression should be as follows:
To check the correctness of this formula press [Execute...]. You will get the result in a lower pane of the editor form.
Press [OK] to go back to the linking step and proceed with the import process.
If the main actions on this step are done, you can go to the final page of import - "Options".
4. The "Options" step of import contains the main import methods list:
"Add and Modify" - select to add new items if it's not in your database and modify the existing ones.
"Add Only" - only add new products and do not modify existing.
"Modify Only" - conly update the existing products and do not add new ones.
"Just Add" - allows adding the product from a file as a new one without searching or validating existing data. This option can lead to a duplicate records in your database.
There are also two buttons: [Preview import data] and [Show advanced options]
The [Show advanced options] button on the right displays the base date/time formats and value’s separators. You can recover default settings with the [Set Default] button.
The lower part of the options area includes the following fields:
"Multiple values separator". Leave default or set your own separator, which is used to demarcate the values between each other in the file to import
"Multiple records separator" serves for separation records in the import file. Leave it by default.
Next two fields allow restricting the volume of importing.
Indicate direction where your media files are placed in (in case the file contains products with images):
Image names that already exist on FTP with the same names allows to choose an action to add these illustrations to your products data:
"Use existing image" - keep previously assigned images after importing without uploading the ones from a file to import.
"Upload and replace" - replace existing illustrations from a file with the same names, preloading them on a server.
"Upload image and generate new name" - upload illustrations on FTP with the new post names generation.
For example, a product has an image named "cheescake-1". After importing, when the certain variant is checked, you will get the same image but the name will be regenerated to "cheescake-1-1" etc.
Please take a note, for SKU field you can use numbers and letters, randomly created in your opinion and the ID - it is only numerical designation, which is automatically generated by the program during data creation and cannot contain any letters.
Choose SKU or ID position in parent column depending on one you have in your source file.
If the attribute positions are present in the file to import, do not forget to select one of the following actions before starting:
Provided that your store has products with variations choose the relevant identifier for existing variations in the "Advanced Options" step from the proposed list: Parent column, ID or SKU.
Specify the condition by which the wizard will consider a column with variations - the Post Type column or any Variation Attribute column.
Attention! The import process will start, after you press the [Import] button!
If all settings are made correctly, continue the procedure. If you see any errors or warnings on the "Import Preview" step, return to the previous step and try to change settings.
The last window of WooCommerce Import Wizard displays results and errors, if any emerged in the course of the import process.
To use these configuration settings in the future, save them directly to the wizard or to a separate file by clicking the corresponding button below.
< - To use these configuration settings in future, save them directly to the wizard or to a separate file with the [Save configuration] button.
You can also remove selected configuration or clear all configuration list with one-mouse-click on the corresponding option from the drop-down menu.
The [Finish] button allows to exit the Wizard and check the data after import at your store front-end.
To import data from the Google spreadsheet, select the relevant checkbox and the Cloud storage account. You can also add, change or delete the account using the corresponding buttons on the right side of the account selector.
Next, find the Cloud file with the help of the browse [...] button or type the file name manually. This will open Drive Explorer where you should find the necessary file:
Select the file and press [OK] to process. Then press [Next] to go to the next step.
Preview Sheet Data on the next step and press [Next] to continue.
Then you should link database fields to source fields.
Press [Next] to proceed.
On the last step, select the import method:
"Add and Modify"
"Add Only (Only add new orders and do not modify existing)"
"Modify Only (Only update existing products and do not add new)"
"Just Add (Do not search for existing orders)"
You can also [Preview import data] and go to the advanced options by pressing the [Show advanced options] button.
After you've made your choice, press the [Import] button to start importing.
After the import has finished, you will see the results.
Press [Finish] to close the wizard.