3.4 Import Product Data
To start import your data make sure you prepare 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.
Please note, the value from 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 which does not include any taxes, discounts or coupons. Price fields are numeric; no text is permitted - do not include “$” or any other symbols.
Stock - it 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.
Please note, before import implementation, in case you perform it at the first time, we strongly recommend to make the backup of your store database!
Go to Store -> Products section and find the Import Wizard tool:
1. The first step holds an area to specify the file which is used for importing. Check one of the following checkboxes:
Local import file - that means you should indicate the local path to a file from your computer (locally).
HTTP URL - 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 - in case your file with data to import is placed on the FTP server - specify your FTP details in the form below.
Make sure you have used the properly credentials. To check them - go to the Settings -> Preferences or press F12 key and choose the FTP section. Click on the 'Test Connection' button for verifying.
You should get a such message:
Otherwise, please contact your hosting company to clarify your main FTP access details.
In the lower area of the page, you can see the field which helps to use the previously saved import configurations if any.
To move to the next steps of import you can press one of the numbered boxes on the left or use the 'Next [Page Down]' at the bottom to get to the second step of the process.
2. Select fields delimiter and quote characters page contains some important settings to separate data.
Take into account the fields below:
Keep it checked if your file to import contains the field names in the first row (see an illustration above). In other cases, it should be unchecked.
3. Field link is the most important step of the whole import process and requires to assign the columns from a file to the appropriate fields in your store database.
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.
Use the top toolbar to facilitate the linking process.
On the Linking step do not forget also to assign the images related to your export data - choose the 'Featured Image' position from the database fields list and link with the appropriate field from your source file.
In this case, your media files will be imported with the other data from a file.
You can import attributes assigned to the products as well, which can be transferred from the columns of a file . But, in case, the attributes were created in the lower grid on Products page and used for variations generating -
these positions will not be displayed in the Attributes section of Store Manager:
and therefore in the assignment step of import current field values will be missed and cannot be imported!
To be able to link all attributes to the corresponding fields of your store database , create the additional column by pressing the 'plus' sign in the top toolbar.
In opens the form, where you should specify the necessary attribute value and click on the 'OK' button.
The additional field will be added to the columns listing in the left pane and will be mapped automatically to the appropriate field from a file with all data values in it.
Press 'minus' to remove selected variation attribute from a list (available for only taxonomy type!).
Add Custom SQL - it gives an opportunity to create and use during importing the extended expression formula for your data. Please note, you should have some SQL skills to generate the properly query.
Check this chapter about the current option's functionality and application .
Use ‘Help’ button at the top for more details on expression special SQL syntax with provided examples.
To delete the previously created SQL commands use the option for removal.
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 which will be used for your rule;
- clarify the equation sign between the two parts of the rule.
In case, using 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 the formula for data generating open the Expression Editor and by helping with toolbar options create the necessary formula. With the simple expression, you can increase/decrease the products price after import,
combine some values positions in the appropriate 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 hit the 'Execute...' option. 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 importing contains the main import methods list:
The ‘Show advanced options’ button on the right displays the base date/time formats and value’s separators.
The lower part of the options area includes the following fields:
- multiple values separator - leave the 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 as is.
- the two next 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 which are already existing on the FTP with the same names - allows choose an action to add such illustrations to your products data:
1) use existing image - keep the previously assigned images after importing without uploading the ones from a file to import;
2) upload and replace - replace the existing illustrations on the images from a file with the same names, pre-loading them on the server;
3) upload image and generate new name - upload illustrations on the FTP with the new post names generation.
For example, the product has the 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 the 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 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 in the Advanced Options step the appropriate identifier for existing variations from the proposed list : Parent column, ID or SKU;
Specify the condition by which the wizard will consider the column with the variations - the Post Type column or any Variation Attribute column.
Attention! The import process will start, when you press "Import" button!
If all settings are made correct then continue the procedure. If you see any errors or warnings on 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 on the appropriate button below.
You can also remove the selected configuration or clear all configuration list by helping with one-mouse-clicking on the corresponding option from the drop-down menu.
‘Finish’ button allows to exit from a Wizard and check the data after import at your store Front-end.
Check the following article page concerning import products, import products with variations and their image gallery quickly and safely :