youwe/pimcore-bulkpump 问题修复 & 功能扩展

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

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

youwe/pimcore-bulkpump

Composer 安装命令:

composer require youwe/pimcore-bulkpump

包简介

Youwe Pimcore Importer

README 文档

README

Version: Pimcore 4.x

Developed by: Roelf

Reference / latest developments: Roelf

Usage and examples

Click on "Product importer" on the left side. Documentation is available in the "doc" folder of this plugin.

Installation

Plugin can be installed through composer. If you have a different public web directory you have to set that in the 'config:document-root-path', otherwise you can ignore that section. Add json to your composer.json:

{
    "config": {
        "document-root-path": "htdocs"
    },
    "require": {
        "youwe/pimcore-bulkpump": "^0.4.0"
    },
}

Also, add these to your .gitignore:

/htdocs/plugins/PimcoreBulkpump

Plugin development

To create a new version, check out the master branch somewhere and go:

git tag 0.1.0
git push origin --tags

Documentation / list of functionalities

Pick a custom class to import CSV columns to.

o_key column mapping will be used to create the Pimcore key and to update existing objects.

If an object has an import[FieldName] function, this function will be used instead of the set[FieldName] function.

import function has 2 parameters: ($value, $all_values_for_all_fields)

###Custom filters Custom filters can be added to the project here:

/htdocs/website/models/BulkPumpFilter

Custom filters must have the same format as the native filters here:

/htdocs/plugins/BulkPump/models/BulkPump/ImportFilter/Native

###Custom import classes A completely custom import class can be used, overriding most standard functionalities:

/htdocs/website/lib/Website/BulkPump/CustomImport.php

Example of a CustomImport class:

<?php
/**
 * CustomImport example
 */

namespace Website\BulkPump;
use PimcoreBulkpump\CustomImportInterface;

class CustomExample implements CustomImportInterface
{
    //Create a general property to save multiple row handeling
    public $importObject = true;
    
    public function __construct($config)
    {

    }

    /**
     *  Process every row
     */
    public function import(&$object, array $row)
    {
        &object->setValue($row['value']);
        
        //Set data in dataStore
        $this->importObject->setDataStoreAttribute('tempID', 1234);
        
        //Receive data => result in 1234
        $id = $this->importObject->getDataStoreAttribute('tempID');
        
    }
}

You must select in the GUI of the plugin, in the profile section de Import type to Custom. Then there appears a addition section called Settings for import type Custom and here you can set the custom class as followed:

\Website\Bulkpump\ImportBrands

And save the profile.

Run from commandline (CLI)

You can import CSV files by running from commandline, you can configure the profile from the interface. You could change the content of the file in the profile by changing in the following path:

/htdocs/website/var/tmp/bulk-pump

Then you can call the profile with the following command:

php pimcore/cli/console.php bulkpump:import --profileId=<profile id>

You have to change <profile id> in the profile id you want to run. You can find the id in the GUI of the plugin. Or by running the following command:

php pimcore/cli/console.php bulkpump:list

Security

User must have this permission to use the plugin:

  • plugin_bulkpump_user

Future permissions:

  • plugin_bulkpump_admin
  • plugin_bulkpump_import
  • etc..

youwe/pimcore-bulkpump 适用场景与选型建议

youwe/pimcore-bulkpump 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.2k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 09 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 youwe/pimcore-bulkpump 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 3.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 10
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-09-08