clickandmortar/advanced-csv-connector-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

clickandmortar/advanced-csv-connector-bundle

Composer 安装命令:

composer require clickandmortar/advanced-csv-connector-bundle

包简介

Advanced CSV Connector for Akeneo

README 文档

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

Bundle version Akeneo version
v7.0.* v7.0.*
v6.0.* v6.0.*
v5.0.* v5.0.*
v1.8.* v4.0.*
v1.7.* v3.2.* (EE)
v1.6.* v3.1.* / v3.2.*
v1.5.* v3.1.* / v3.2.*
v1.4.* v2.3.*
v1.3.* v2.1.*

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 import
  • Transformation: LUA script name or PHP method 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 or PHP method 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.

clickandmortar/advanced-csv-connector-bundle 适用场景与选型建议

clickandmortar/advanced-csv-connector-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.59k 次下载、GitHub Stars 达 22, 最近一次更新时间为 2018 年 04 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 clickandmortar/advanced-csv-connector-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 clickandmortar/advanced-csv-connector-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 clickandmortar/advanced-csv-connector-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 4
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-11