synolia/sylius-akeneo-plugin
Composer 安装命令:
composer require synolia/sylius-akeneo-plugin
包简介
Akeneo connector for Sylius.
README 文档
README
Sylius Akeneo Plugin
This plugin allow you to import data from Akeneo PIM.
Features
- Configure your Akeneo Account - Documentation
- Configure which data should be imported and how it will be imported. - Documentation
- Customize imports according to your business needs. - Documentation
- Launch imports through Cli or Back-Office - Documentation
Requirements
| Version | |
|---|---|
| PHP | ^8.2 |
| Sylius | ^2.0 |
| Akeneo PIM | >=v6.0 |
Installation
-
Add the bundle and dependencies in your composer.json :
composer require synolia/sylius-akeneo-plugin --no-scripts
-
Enable the plugin in your
config/bundles.phpfile by addSynolia\SyliusAkeneoPlugin\SynoliaSyliusAkeneoPlugin::class => ['all' => true],
-
Import required config in your
config/packages/_sylius.yamlfile:imports: - { resource: "@SynoliaSyliusAkeneoPlugin/config/config.yaml" }
-
Import routing in your
config/routes.yamlfile:synolia_akeneo: resource: "@SynoliaSyliusAkeneoPlugin/config/routes.yaml" prefix: '/%sylius_admin.path_name%'
-
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(); } }
-
Apply plugin migrations to your database:
bin/console doctrine:migrations:migrate
-
Clear cache
bin/console cache:clear
Development
Akeneo Enterprise Edition
Reference Entity and Asset attribute types
- Everything you need to know about Reference Entity in Sylius
- Everything you need to know about Asset in Sylius
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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 synolia/sylius-akeneo-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Akeneo Measure Bundle
Implementation of the Omnibus Directive for Sylius application.
Bulk export of sylius resources
Sylius plugin that integrates Addwish
Setono example plugin for Sylius.
Will translate fragments of text automatically
统计信息
- 总下载量: 97.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 24
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: EUPL-1.2
- 更新时间: 2020-10-20