Blog Soft Gorillas

11 October 2021
4 min read

Sylius — Product import

Sylius Products

Explanation of product import

Product import is carried out by completing the CSV file, which will allow us to add all of the products to the store at once.

Steps:

  1. The first step is to create a file with the appropriate structure needed for import. Examples of tools to do this are: Google Sheets or Excel.
  2. The next step is to find out the meaning and complete the columns in the previously created file.
  3. When your file has been filled in correctly, you can proceed to importing the file directly from the admin panel

1 — Create file with correct strucutre

Create a sheet or text file in your favorite program. Then add basic columns to your file. Your column structure should look like this:

Sylius CSV in Google Sheets

2 — Complete the columns in the file correctly

Take a look at the description of individual columns and complete the file according to your needs

  • Code — Unique product identifier, a specific code pattern should be agreed upon with the company representative.
  • Locale — This information identifies the language of the specific product. Accepted values are: pl_EN and en_US for Polish and English respectively. Product with locale value as pl_EN should have content in Polish language.

Note: If you add products in more than one language, you should add know product twice with the same Code but with a different locale attribute! Optionally, you can create separate files for specific languages, but the Code must repeat itself for the same products.

  • Name — Name of the product displayed on the store for the user. If the product has different names depending on the language, remember about the locale value.
  • Description — Description of the product, you can include a description containing HTML tags that enable e.g. text alignment, bolding, font enhancement, paragraph separation, etc. For this purpose you can use a WYSIWYG editor. (Exemplary online editor: https://html-online.com/editor/). If the product has different descriptions depending on the language, remember about the locale value.

The point is, there are several kinds of “-”. One is the one that is on the keyboard, but when you create documents, for example in MS Word, sometimes he likes to replace this dash with “his” one. It looks almost identical, but is slightly longer. As a result, some systems (including our database) have a problem with saving them.

  • Short_description — Short description of the product, the length of the text should be agreed upon with the company representative. In this case HTML tags are not accepted. /). If the product has different descriptions depending on the language, remember about the locale value.
  • Meta_description — Product description to be indexed by search engines, e.g. Google. Enter a product description WITHOUT HTML tags. If the product has different descriptions depending on the language, remember about the locale value.
  • Meta_keywords — Key words for a given product, used to index the product by search engines such as Google. If the product has different descriptions depending on the language, remember about the locale value.
  • Main_taxon — The main category of the product. The value of this field should be agreed upon with the company representative.
  • Taxons — Product categories listed after the comma. The value of this field should be agreed upon with the company representative.
  • Channels — Sales channel to which the given product is to be added to. The value of this field should be left blank or agreed upon with the company representative.
  • Enabled– A switch that allows you to enable and disable the product in the store. The accepted values are 1 — enabled and 0 — disabled. Set the value to 0 if the inserted product is not complete, but will eventually be in the store.
  • Price — The price of the product. The value of this field should be left blank or agreed upon with the company representative.

3 — Save the file and import it in the Admin panel

Make sure your file downloaded to your computer has the CSV extension.

If you do not have an interface for importing the product in your store, you should make sure that the plugin responsible for this action has been installed: https://github.com/FriendsOfSylius/SyliusImportExportPlugin

If everything is ok, you should see a panel like this:

Sylius | Import interface

Now you can select the file from your computer and click the import button. If there are any errors you will be informed about this in a message at the top of the screen.

Congratulations!

Subscribe

* indicates required

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.