定制 synolia/sylius-akeneo-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

synolia/sylius-akeneo-plugin

Composer 安装命令:

composer require synolia/sylius-akeneo-plugin

包简介

Akeneo connector for Sylius.

README 文档

README

License CI - Analysis CI - Sylius Version Total Downloads

Sylius Logo.

Sylius Akeneo Plugin

This plugin allow you to import data from Akeneo PIM.

Features

Requirements

Version
PHP ^8.2
Sylius ^2.0
Akeneo PIM >=v6.0

Installation

  1. Add the bundle and dependencies in your composer.json :

    composer require synolia/sylius-akeneo-plugin --no-scripts
  2. Enable the plugin in your config/bundles.php file by add

    Synolia\SyliusAkeneoPlugin\SynoliaSyliusAkeneoPlugin::class => ['all' => true],
  3. Import required config in your config/packages/_sylius.yaml file:

    imports:
        - { resource: "@SynoliaSyliusAkeneoPlugin/config/config.yaml" }
  4. Import routing in your config/routes.yaml file:

    synolia_akeneo:
        resource: "@SynoliaSyliusAkeneoPlugin/config/routes.yaml"
        prefix: '/%sylius_admin.path_name%'
  5. Add Asset trait to Product.php and ProductVariant.php entities and add TaxonAttributes trait to Taxon entity

    <?php
    
    declare(strict_types=1);
    
    namespace App\Entity\Product;
    
    use App\Entity\Product\ProductTranslation;
    use Doctrine\ORM\Mapping as ORM;
    use Sylius\Component\Core\Model\Product as BaseProduct;
    use Sylius\Component\Product\Model\ProductTranslationInterface;
    use Synolia\SyliusAkeneoPlugin\Entity\ProductAssetTrait;
    
    #[ORM\Entity]
    #[ORM\Table(name: 'sylius_product')]
    class Product extends BaseProduct
    {
        use ProductAssetTrait {
            __construct as private initializeAssetsCollection;
        }
    
        public function __construct()
        {
            parent::__construct();
            $this->initializeAssetsCollection();
        }
    
        protected function createTranslation(): ProductTranslationInterface
        {
            return new ProductTranslation();
        }
    }
    <?php
    
    declare(strict_types=1);
    
    namespace App\Entity\Product;
    
    use Doctrine\ORM\Mapping as ORM;
    use Sylius\Component\Core\Model\ProductVariant as BaseProductVariant;
    use Sylius\Component\Product\Model\ProductVariantTranslationInterface;
    use Synolia\SyliusAkeneoPlugin\Entity\ProductVariantAssetTrait;
    
    #[ORM\Entity]
    #[ORM\Table(name: 'sylius_product_variant')]
    class ProductVariant extends BaseProductVariant
    {
        use ProductVariantAssetTrait {
            ProductVariantAssetTrait::__construct as private initializeAssetsCollection;
        }
    
        public function __construct()
        {
            parent::__construct();
    
            $this->initializeAssetsCollection();
        }
    
        protected function createTranslation(): ProductVariantTranslationInterface
        {
            return new ProductVariantTranslation();
        }
    }
    <?php
    
    declare(strict_types=1);
    
    namespace App\Entity\Taxonomy;
    
    use Doctrine\ORM\Mapping as ORM;
    use Sylius\Component\Core\Model\Taxon as BaseTaxon;
    use Sylius\Component\Taxonomy\Model\TaxonTranslationInterface;
    use Synolia\SyliusAkeneoPlugin\Component\TaxonAttribute\Model\TaxonAttributeSubjectInterface;
    use Synolia\SyliusAkeneoPlugin\Entity\TaxonAttributesTrait;
    
    #[ORM\Entity]
    #[ORM\Table(name: 'sylius_taxon')]
    class Taxon extends BaseTaxon implements TaxonAttributeSubjectInterface
    {
        use TaxonAttributesTrait {
            __construct as private initializeTaxonAttributes;
        }
    
        public function __construct()
        {
            parent::__construct();
    
            $this->createTranslation();
            $this->initializeTaxonAttributes();
        }
    
        protected function createTranslation(): TaxonTranslationInterface
        {
            return new TaxonTranslation();
        }
    }
  6. Apply plugin migrations to your database:

    bin/console doctrine:migrations:migrate
  7. Clear cache

    bin/console cache:clear

Development

Akeneo Enterprise Edition

Reference Entity and Asset attribute types

License

This library is under the EUPL-1.2 license.

Credits

Developed by Synolia.

synolia/sylius-akeneo-plugin 适用场景与选型建议

synolia/sylius-akeneo-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 97.95k 次下载、GitHub Stars 达 24, 最近一次更新时间为 2020 年 10 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「sylius」 「connector」 「akeneo」 「sylius-plugin」 「symfony-ux」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 synolia/sylius-akeneo-plugin 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 97.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 35
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 24
  • Watchers: 11
  • Forks: 24
  • 开发语言: PHP

其他信息

  • 授权协议: EUPL-1.2
  • 更新时间: 2020-10-20