clickandmortar / advanced-csv-connector-bundle
Advanced CSV Connector for Akeneo
Installs: 3 227
Dependents: 0
Suggesters: 0
Security: 0
Stars: 22
Watchers: 5
Forks: 5
Open Issues: 4
Type:symfony-bundle
Requires
- akeneo-labs/custom-entity-bundle: 7.0.*
- akeneo/pim-community-dev: ^7.0.0
- dev-master
- 7.0.13
- 7.0.12
- 7.0.11
- 7.0.10
- 7.0.9
- 7.0.8
- 7.0.7
- 7.0.6
- 7.0.5
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.0.x-dev
- 6.0.15
- 6.0.14
- 6.0.13
- 6.0.12
- 6.0.11
- 6.0.10
- 6.0.9
- 6.0.8
- 6.0.7
- 6.0.6
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.0.x-dev
- 5.0.2
- 5.0.1
- 5.0.0
- 1.8.x-dev
- 1.8.27
- 1.8.26
- 1.8.25
- 1.8.24
- 1.8.23
- 1.8.22
- 1.8.21
- 1.8.20
- 1.8.19
- 1.8.18
- 1.8.17
- 1.8.16
- 1.8.15
- 1.8.14
- 1.8.13
- 1.8.12
- 1.8.11
- 1.8.10
- 1.8.9
- 1.8.8
- 1.8.7
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.7.x-dev
- 1.7.9
- 1.7.8
- 1.7.7
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.x-dev
- 1.6.11
- 1.6.10
- 1.6.9
- 1.6.8
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.x-dev
- 1.5.1
- 1.5.0
- 1.4.x-dev
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.x-dev
- 1.3.18
- 1.3.17
- 1.3.16
- 1.3.15
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-json-schema
This package is auto-updated.
Last update: 2024-10-29 11:04:44 UTC
README
Advanced CSV Connector is an extension of classic Akeneo CSV Connector. It allows to customize columns mapping on import or export.
Made with đź’™ by C&M
Versions
Optional
You can use php-lua
package to update your values dynamically during import or export.
For LUA scripts available functions and libraries have been limited for security reasons. You can use:
- string
- math
- ipairs
- load
- next
- pairs
- rawequal
- rawgetwget
- rawlen
- rawset
- select
- tonumber
- tostring
- type
This package is not a requirement. A classic PHP method can also be used.
Installation
Download the Bundle
Update your composer.json
file to use our fork of Custom entity bundle in repositories
node:
"repositories": [ ... { "type": "vcs", "url": "https://github.com/ClickAndMortar/CustomEntityBundle" } ... ],
And add our bundle:
$ composer require "clickandmortar/advanced-csv-connector-bundle":"<version-wanted>.*"
Example for last version:
$ composer require "clickandmortar/advanced-csv-connector-bundle":"7.0.*"
Enable the Bundle
Enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
<?php return [ // ... Pim\Bundle\CustomEntityBundle\PimCustomEntityBundle::class => ['all' => true], ClickAndMortar\AdvancedCsvConnectorBundle\ClickAndMortarAdvancedCsvConnectorBundle::class => ['all' => true] ];
Update your config/routes/routes.yml
file:
pim_customentity:
prefix: /reference-data
resource: "@PimCustomEntityBundle/Resources/config/routing.yml"
candm_advanced_csv_connector:
prefix: /candm-advanced-csv-connector
resource: "@ClickAndMortarAdvancedCsvConnectorBundle/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
Usage
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 importTransformation
: LUA script name or PHP method name to update value after mapping. Example: Uppercase, lowercase, ... (you can create a new LUA script underRéférenciel / Scripts LUA
).Valeur par défaut
: Default value for attribute if empty data in fileIdentifiant
(mandatory): Used to defined main identifier attribute of productUniquement à la création
: Set attribute value only if product is new (checked withidentifier
attribute)Effacer si null
: Remove key from item mapping if value is nullSupprimer
: 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 exportValeur forcée
: Force a value (erase given attribute value from Akeneo)Transformation
: LUA script name or PHP method name to update value after mapping. Example: Uppercase, lowercase, ... (you can create a new LUA script underRé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 toUtiliser le libellé
column)Longueur max.
: Integer use to shorten attribute value if necessaryValeur par défaut
: Default value for column if empty attribute valueSupprimer
: 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.