Advanced CSV Connector

Categories
Import/Export
Akeneo PIM compatibilty
Versions:
Price: Free
Version:
1.7.1

Description

Advanced CSV Connector is an extension of classic Akeneo CSV Connector. It allows to customize columns mapping with custom entity in your PIM project:

Mapping view

 

Lot of mapping parameters are available:

  • Transformation: Use LUA scripts created in your PIM project to update values dynamically
  • Only on creation: To set value only for product creation (avoid erasing contributions) 
  • Default value: To set a value when column is empty
  • Etc.

Installation

Download the Bundle

composer require "clickandmortar/advanced-csv-connector-bundle":"<version-wanted>.*"

Example for last version:

composer require "clickandmortar/advanced-csv-connector-bundle":"1.7.*"

Enable the Bundle

Enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php file of your project:


<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    protected function registerProjectBundles()
    {
        return [
            // ...
            new \Pim\Bundle\CustomEntityBundle\PimCustomEntityBundle(),
            new \ClickAndMortar\AdvancedCsvConnectorBundle\ClickAndMortarAdvancedCsvConnectorBundle(),
        ];
      }
    // ...
}
 

Update your app/config/routing.yml file to enable custom entities:


pim_customentity:
        prefix: /reference-data
        resource: "@PimCustomEntityBundle/Resources/config/routing.yml"
 

And finally clear cache and update database:


rm -rf var/cache/*
php bin/console --env=prod pim:installer:assets --symlink --clean
yarn run webpack
php bin/console doctrine:schema:update --force
 

Documentation

Import

To create a new import mapping, go to Référenciel / Mappings d'import and click on Create top right button. You can add as many mapping lines as you want by clicking on Ajouter une ligne.

Some explanations for table columns:

  • Attribut (mandatory): Attribute code in your Akeneo project (you can use suffixes like -fr_FR or -EUR for locales, channels, currencies, ...)
  • Nom de la colonne (mandatory): Column name in your file to import
  • Transformation: LUA script name to update value after mapping. Example: Uppercase, lowercase, ... (you can create a new LUA script under Référenciel / Scripts LUA)
  • Valeur par défaut: Default value for attribute if empty data in file
  • Identifiant (mandatory): Used to defined main identifier attribute of product
  • Uniquement à la création: Set attribute value only if product is new (checked with identifier attribute)
  • Effacer si null: Remove key from item mapping if value is null
  • Supprimer: Click on this cell to delete mapping line

Once mapping is saved, go to Imports part and create a new job with type Import des produits avancé (CSV). After job creation, go to edition mode and update Mapping parameter in global parameters tab.

Export

To create a new export mapping, go to Référenciel / Mappings d'export and click on Create top right button. You can add as many mapping lines as you want by clicking on Ajouter une ligne.

Some explanations for table columns:

  • Attribut (mandatory): Attribute code in your Akeneo project (you can use suffixes like -fr_FR or -EUR for locales, channels, currencies, ...)
  • Nom de la colonne (mandatory): Column name in your file to export
  • Valeur forcée: Force a value (erase given attribute value from Akeneo)
  • Transformation: LUA script name to update value after mapping. Example: Uppercase, lowercase, ... (you can create a new LUA script under Référenciel / Scripts LUA)
  • Utiliser le libellé: Boolean to get the label associated to the code given (for attribute options or custom entities)
  • Langue: Select a specific locale for the label to export (linked to Utiliser le libellé column)
  • Longueur max.: Integer use to shorten attribute value if necessary
  • Valeur par défaut: Default value for column if empty attribute value
  • Supprimer: Click on this cell to delete mapping line

Once mapping is saved, go to Exports part and create a new job with type Export des produits avancé (CSV). After job creation, go to edition mode and update Mapping parameter in global parameters tab.

List your extension on Akeneo Marketplace

Learn about the best practices to enrich Akeneo ecosystem.

Share your contributions with Akeneo Community any way you want.

Need help? Please read our
submission requirements and manual.