Applicable to : Merlin Backoffice ™PrestaPricing (tuto and screen shots made with PrestaPricing)

Prerequisites: this tutorial assumes that you already know how to use PrestaPricing to import products and declinations. The basics of importing and importing the import window are not detailled. If necessary, please start by viewing our PrestaShop import video tutorials

This technique is very little known, yet it is possible to create new attributes, new manufacturers, suppliers or characteristics from an Excel file in the Prestashop database, without creating new products or new versions.

Here is an excel file containing what we want to import, three columns with attributes, including a group that does not yet exist, a column with manufacturers and a last one with suppliers:

Excel file to import into the PrestaShop database with PrestaPricing

At first, here is what the base contains, some colors but not fushia or magenta, a single size, no "Material" attribute etc ... This view comes from the "Attributes" tab of PrestaPricing:

Note : all screen captures below have been made with PrestaPricing, but the same features are also available within the csv or xls importation addon of Merlin Backoffice.

Attribute Table and Attribute Group in PrestaPricing

To do your excel file import, proceed as for a traditional import:

Go to Import / Export / Scrpts and click on the button "Import and update of products ...."

How to import an excel file with PrestaPricing?
The import window opens:

Step 1, select the XLS or CSV file

  1. As for a traditional import, click New Source
  2. Click on the button to go to the Excel file or 3. directly type the file name

Excel File Import Window in PrestaPricing

The program then asks you if you want to import products (with or without categories) or declinations. The answer does not matter to this method, because we will not create either. We will stop at step 3 of the process.

Step 2, the mapping

  1. Click the "Create New Template from File" button.

In the example described here, it can be seen that the Size has auto-mapped to the extent that the "Size" attribute already exists in the database (with the same spelling, in the upper case). We just have to click on the small square to include it in the import and to check that in the line "Data type", we have the option "Values: create if does not exist". Otherwise, the new values will not be created.

Auto mapping in PrestaPricing

For the color attribute, it is necessary to make a manual mapping because "color" contained in the Excel file does not have a capital C as in the base and has therefore not been recognized. Hence the importance of giving your attribute columns (also true for the characteristics) the names of the attribute groups identically to those of the database.

So for a manual mapping:

  1. Choose the Id or Attribute Name
  2. Chose the "Color" attribute already existing in the database
  3. In the "Data type" line, you have the option "Values: create if it does not exist"
  4. Select the check box for the last row so that the column is taken into account when importing.

Manual mapping in PrestaPricing

For "new" attribute group, which does not yet exist, choose "New to create (name = column title)." The program will then start by creating a new group, which will be named "MA- It is the title of the column, then it will create dasn this grupe, the new values "gold", "silver", "steel"

In the same way, the Manufactuer column is mapped:

  1. Choose the Id or name of the manufacturer
  2. Create the name if it does not exist, and click the checkbox to include the column in the processing.

Manual mapping in PrestaPricing

And finally the column Supp:

Manual mapping in PrestaPricing

Step 3 Importing

  1. Click Rewind / Unwind of step 3
  2. Make sure you are in "Full" interface to have the otpion to create the values of attributes, manufacturers, or suppliers.
  3. Most importantly: you must choose the option "All at once, for all lines, during this step of reading and displaying the content". It is this option that will make that our data will be created as soon as you click on the button "Show content"
  4. Click the "Show content to view results" button. The program reads the data and imports it at the same time, it is very fast. Here the work is finished; It IS INUTLE TO EXECUTE STEPS 4 and 5 of the import window.

Import window of an Excel file in PrestaPricingImport window of an Excel file in PrestaPricing

The result is displayed:

  1. The new brands have been created and appear in green
  2. It is the same for new manufacturers
  3. The colors Magenta and Fushia have been created and appear also in green
  4. The newly created sizes are also displayed in green.
  5. In black are the sizes that already existed. The program does not create duplicates (provided you respect the spelling, capital letters, acents, spaces etc).

Import window of an Excel file in PrestaPricing

The new "Material" attribute group was created (displayed in green) with the new gold, silver, steel attribute values.

How do I create new attributes in PrestaPricing when importing?

Let's go back to the main window to see the contents of the database. (Do you know that there is a button at the top right of each window, allowing you to switch from one to the other?).

  1. The Material attribute has been created
  2. With the new attribute values: gold silver steel
  3. New sizes added
  4. As well as the new colors (you just have to assign a color code to them, see our previous tutorial)

How to create new attributes in PrestaPricing when importing excel files

Although this tutorial does not show it, the same technique can be used to mass import from a xls or CSV file a list of product features without creating any product. Just select "Id or feature name", instead of "Id or attribute name".

Next week, for a new trick bein simpler, showing how to keep the same products in the new categories created by duplication.

Category's other articles Import into PrestaShop database

This article was useful ? Share it !