-
Notifications
You must be signed in to change notification settings - Fork 2
Product CSV Import
Products CSV import tool example
LemonStand offers the ability to import new products via a CSV flat file as well as update products already in the system. Allowing users to import large batches of products in a quick and easy fashion. The product CSV import tool also supports the import of product images via a corresponding ZIP file and related column in your CSV file, as well a numerous other standard columns.
To better understand the products CSV import process, let's work through an example import that will include product images.
You will need to download our example CSV file as well as our example-images ZIP file. You can download these files here:
Example CSV File
example.csv
Example-images Archive
example-images.zip
To import a products CSV into LemonStand, first click on the Shop button in the sidebar and then click the Products link under the Shop menu.
You will now be on the Products page. Click on the upload button located to the right of the + button.
This will now bring you to the Products CSV import page.
The first section is the CSV File section, this is where we will point LemonStand to the CSV file we want to import. Click on the upload button and find our example.css file in the location you saved it to on your system. LemonStand will now upload the CSV file, preparing it for import. Once this is complete you will see a notification next to the upload button that says File example.css uploaded.
The next section on our Products CSV import page is the Update existing products section which contains a checkbox. Checking this box will cause the import to update any products in the system that match a record in the CSV file. This comparison is made based on the product sku.
The next section is the Create new categories section, which also contains a checkbox. Selecting this checkbox will cause the import tool to create a new category in the LemonStand system when it encounters one in the CSV file that currently does not exist. Let's check this box for our example.
In our example CSV file we have indicated that we want our first record, on line 2, to import the product as belonging to the Snowboards category, which will be a child of the Sporting goods category. This is done by setting our category in the CSV file as Sporting goods=>Snowboards. The => symbol indicates the child/parent relationship. In this case since the Snowboards category does not exist, it will be created on import.
The next section is the Images section.
The LemonStand Products CSV import tool allows for the import of associated product images. Let's have a look at example-images.zip file and our example.csv file to examine how this is taking place.
Our example.csv file contains 7 records, as well as the first line which contains our column headers. Let's look at our first record which is on line 2, as well as the column headers.
name, sku, base_price, images, categories, product_type, in_stock_amount
Green Snowboard, sku_green_snowboard, 159.99,"/snowboards/snowboard-1.png",Sporting goods=>Snowboards, Product, 10
As you can see from our column headers row, the 4th item is images, this means on line 2, after the 3rd comma we will indicate the location of the image we want to use for our product based on where it is in our example-images.zip file. In this case, the image we are referencing is not in the root of the zip archive, but rather in a folder in the archive named snowboards. So we simply indicate that the image to be used for this product is located at "/snowboards/snowboard-1.png".
Lets now click on the upload button in the images section and then locate our example-images.zip file. Once the upload is complete you will see a status message that says File example-images.zip uploaded.
We are now ready to run the import. Your Products CSV import page should look like the following:
Click the Import button at the top of the page. After the import process is complete you will see a section at the bottom of the page that will reflect the outcome of the import process. In our case, we should see that that import was successful and added 7 items.
If you navigate to the front-end of our store you will now see our newly imported products, images and categories.
##Expanded Details for Product CSV import tool:
The first line of the CSV file you are importing should always contain the column headings you will be using. The import process will fail if these column headings are not present.
Supported Columns
name
sku
description
short_description
manufacturer
categories
tax_class
url_name
base_price
cost
length
width
height
weight
enabled
track_inventory
allow_preorder
in_stock_amount
hide_out_of_stock
out_of_stock_threshold
allow_negative_stock
product_type
images
Columns with special considerations
product_type: if column is not supplied or is supplied but the value is empty, the default product type is used for new products and the product type of existing products is unchanged; if the supplied product type does not exist, it will not be updated (for existing products) or the product will not be created (for new products)
tax_class: same as product_type, if column is not supplied or is supplied but the value is empty, the default tax class is used for new products and the tax class of existing products is unchanged; if the supplied tax class does not exist, it will not be updated (for existing products) or the product will not be created (for new products)
manufacturer: use manufacturer name, if a manufacturer with the specified name (case insensitive) is not found, a new one is created and used
images: to use, a zip file containing the images should be uploaded during import, multiple images should be separated with a comma, the image files can include a folder name if the folder is included in the archive (eg. "/fruits/banana.jpg"). If column is empty, images are not updated. If value is set to dash (-), all existing images are removed. If value is an image or multiple, any existing product images are deleted and replaced with the listed images.
in_stock_amount: if column is missing or has no value, stock will not be updated; if a value is set and is different than the current stock amount (assumed 0 for new products), an inventory correction will be created for the difference between the current stock amount and new stock amount
Required Columns:
- sku for new and existing products.
- name, base_price for new products.
There are also optional boolean columns available as follows:
Boolean Columns:
enabled, enabled_backend, track_inventory, allow_preorder,
hide_out_of_stock, allow_negative_stock
For boolean columns, the following values will be considered as 'on': yes, y, enabled, active, 1, true