Child pages
  • Parámetros de Importación de archivos CSV

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tienes dos maneras de cargar los archivos a importar:

  • Using your browser: click the "Add file" button, find your file then validate. Do this as many times as necessary to list all your import files.
  • Using your FTP client: upload the files in the Utilizando su navegador: Haga clic en el botón "Subir archivo", encuentre su archivo y a continuación valíde su selección. Haga esto tantas veces como sea necesario para listar todos los archivos de importación.
  • Utilizando su cliente FTP: cargue el archivo en la carpeta /admin-dev/import folder of your PrestaShop installation. Reload the import page: the "Choose from history/FTP" button should now indicate a number. Click the button to display the list of available files (including the ones you previously uploaded using the browser), then click the "Use" button for the file you wish to import.

Once your files are all listed in the "Select your CSV file" section, you can proceed with the rest of the form:

  1. Select the type of data contained in your file, using the drop-down list named "What kind of Entity would you like to import?". Once you have selected the type of data, the list of the available fields appears on the right, which helps you refine your CSV file – at least for the order of the columns, which will soon prove handy.
  2. Select the language of the imported content. If the target language is not available, you must install it first, in the "Languages" page under the "Localization" menu.
  3. Select the file encoding. Simply indicate if the file uses ISO-8859-1 or not. If not, then it is assumed the files use UTF-8.
  4. Select the field separators. We suggest that you leave the default values ("field separator" with a semicolon ";", "multiple value separators" with a comma ","). But obviously, if your CSV file is built differently, you should change these values accordingly.
  5. If you want to remove all the products in your catalog before importing, select the appropriate option.
  6. Once all your choices have been made, click "Next step".
Note

All import files are uploaded directly in the admin folder's /import sub-folder. If the CSV File drop-down menu gets too crowded, you can delete old imports directly using your FTP client.

When clicking the "Next step" button, the page reloads with the data mapping tool. This interface helps you map you file's data columns with the ones required by PrestaShop.

Image Removed

Presented in this table are the rows from your CSV file, placed under arbitrary columns matched to PrestaShop's database needs. It is up to you to make sure that all the columns from your CSV file are matched with the correct column header, using each header's drop-down selector, so as to import your content correctly.

For instance, with our sample file:

  • First column. We marked it as "Enabled", PrestaShop presents "ID" as a header. Click on the header's drop-down menu, and select "Active (0/1)".
  • Second column. Marked "Name", header indicates "Active (0/1)". Let's change the header for "Name *".
  • Third column. You get the idea...

The screen cannot contain more than 6 columns, so click the ">" and "<" buttons to see the other columns, and make sure to match them all correctly.

In our example, we used the first row as for column names. Since we do not want these imported, enter "1" in the "Lines to skip" text-field.

Once you are done matching your columns, click the "Import .CSV data" button (bottom right-hand corner of the screen), and PrestaShop will start the importing process. When the process is done, you are sent to the main screen, which should either confirm that everything has indeed been imported, or give you a notice of all the encountered problems. In this second case, you should review your CVS file and make sure to correct everything.

Mapping configurations

The mapping process can be a tedious task if you cannot customize your CSV files columns order according to that used by the PrestaShop importer, and even more so if you have to do that repeatedly or frequently. That is why PrestaShop includes a small tool to save the current mapping order that you have set up using all the headers drop-down selectors.

Image Removed

The tool is a simple field at the top of the matching tool. You can do the three basic actions (only one if there is no mapping configuration saved yet):

  • Saving. Enter a descriptive name in the field, and click "Save". The interface updates to feature the saved configuration in its drop-down list.
  • Loading. Select a mapping configuration in the drop-down list, and click "Load".
  • Deleting. Select a mapping configuration in the drop-down list, and click "Delete de su instalación de Prestashop. Recargue la página de importación: el botón "Seleccione desde historial/FTP" debe ahora indicar un número. Haga clic en el botón para mostrar la lista de archivos disponibles (incluyendo los que previamente habrá cargado utilizando el navegador), a continuación haga clic en el botón "Utilizar" para importar el archivo deseado.

Una vez que tenga todos los archivos listados en la sección "Sus archivos CSV", puede continuar rellenando los datos del formulario:

  1. Seleccione el tipo de datos contenidos en el archivo, utilizando la lista desplegable denominada "¿Qué tipo de entidad desea importar?". Una vez seleccionado el tipo de datos, la lista de los campos disponibles aparecerán a la derecha, lo que le ayudará a refinar aún más su archivo CSV – al menos en lo que respecta a la orden de las columnas, lo que le será de utilidad próximamente.
  2. Seleccione el idioma del contenido importado. Si el idioma de destino no está disponible, debe instalarlo primero, desde la página "Idiomas" en el menú "Localización".
  3. Seleccione la codificación del archivo. Simplemente indique si el archivo utiliza o no la codificación ISO-8859-1. Si no la utiliza, entonces se asume que los archivos utilizan la codificación UTF-8.
  4. Seleccione los separadores de campos. Le sugerimos que deje los valores por defecto ("separador de campo" con un punto y coma ";", "separador de múltiples valores" con una coma ","). Pero, obviamente, si su archivo CSV fue creado de manera diferente, debe cambiar estos valores en consecuencia.
  5. Si desea eliminar todos los productos de su catálogo antes de importar, seleccione la opción adecuada.
  6. Una vez haya realizado todas sus selecciones, haga clic en el botón "Próximo paso".
Note

Todos los archivos de importación son enviados directamente a la subcarpeta /import que se encuentra dentro de la carpeta de administración. Si el menú de archivos CSV contiene demasiadas entradas, puede eliminar las importaciones más antiguas utilizando su cliente FTP.

Al hacer clic en el botón "Próximo paso", la página será recargada mostrando la herramienta correspondiente. Esta interfaz le ayuda en el proceso de hacer coincidir las columnas utilizadas en el archivo importado, con los datos requeridos por PrestaShop.

Image Added

Los datos presentados en esta tabla son las columnas de su archivo CSV, colocados de manera arbitraria bajo las columnas que la base de datos de PrestaShop necesita. Deberá asegurarse de que todas las columnas de su archivo CSV, pertenecen realmente a la  columna que les corresponde, utilizando el menú desplegable de cada cabecera, para importar el contenido correctamente.

Por ejemplo, en nuestro archivo de ejemplo:

  • Primera columna. Marcada como "Activo", PrestaShop presenta "ID" como cabecera. Haga clic en el menú desplegable de la cabecera y seleccione "Activo (0/1)".
  • Segunda columna. Marcada como "Nombre", su cabecera indica "Activo (0/1)". Vamos a cambiar el encabezado por "Nombre *".
  • Tercera columna. Continúe el proceso, sucesivamente teniendo en cuenta el procedimiento seguido anteriormente.

La pantalla no puede mostrar todas las columnas de sus datos, por lo que deberá hacer clic en los botones ">>" y "<<" para moverse a través de todas las columnas, y hacer coincidir todos los datos correctamente.

En nuestro ejemplo, se utilizó la primera fila para los nombres de columnas. Dado que nosotros no queremos que estos nombres sean importados, introduzca "1" en el campo de texto "Líneas a saltar".

Una vez que los datos de su archivo estén establecidos en sus columnas correspondientes, haga clic en el botón "Importar datos CSV" (situado en la parte superior derecha de la pantalla), y PrestaShop iniciará el proceso de importación. Cuando el proceso se haya completado, será redirigido a la pantalla principal, que deberá confirmarle que todo ha sido importado correctamente, o bien mostrarle una notificación de los problemas que se han encontrado durante la importación. En este segundo caso, deberá revisar de nuevo su archivo CSV y asegúrese de corregir todos los errores que se le han notificado.

Configuraciones coincidentes

El proceso de configuración puede ser una tarea tediosa si tiene una y otra vez que seleccionar el orden de las columnas del archivo CSV para que coincidan con la utilizada por la herramienta de importación de PrestaShop. Es por eso que PrestaShop incluye una pequeña herramienta para guardar el orden actual de la configuración que haya establecido en las cabeceras utilizando las listas desplegables.

Image Added

Esta herramienta es un campo sencillo situado en la parte superior de esta página de importación de archivos. Puede realizar tres acciones básicas (solamente si no hay ninguna configuración de coincidencias guardada todavía):

  • Guardar. Introduzca un nombre descriptivo en el campo, y haga clic en "Guardar". La interfaz se actualiza mostrando las configuraciones almacenadas en la lista desplegable.
  • Cargar. Seleccione una configuración coincidente en la lista desplegable y haga clic en "Cargar".
  • Suprimir. Seleccione una configuración coincidente en la lista desplegable y haga clic en "Suprimir".