synolia / sylius-akeneo-plugin
Akeneo 连接器用于 Sylius。
v3.4.0
2023-10-17 08:31 UTC
Requires
- php: ^8.0
- ext-json: *
- akeneo/api-php-client: >=8.0 <12.0
- behat/transliterator: ^1.3
- bluepsyduck/symfony-process-manager: ^1.3
- doctrine/dbal: ^2.10 || ^3.0
- doctrine/doctrine-bundle: ^1.12 || ^2.0
- http-interop/http-factory-guzzle: ^1.0
- league/pipeline: ^1.0
- php-http/guzzle6-adapter: ^2.0
- psr/event-dispatcher: ^1.0
- sylius/sylius: ^1.10
- symfony/framework-bundle: ^5.4|^6.0
- symfony/lock: ^5.4|^6.0
- symfony/property-access: ^4.3|^5.4|^6.0
- symfony/property-info: ^5.4|^6.0
- symfony/serializer: ^5.4|^6.0
- symfony/service-contracts: ^1.1|^2.0|^3.0
- webmozart/assert: ^1.8
Requires (Dev)
- donatj/mock-webserver: 2.6.1
- friendsoftwig/twigcs: 6.0.0
- j13k/yaml-lint: 1.1.4
- php-parallel-lint/php-parallel-lint: 1.3.2
- phpmd/phpmd: 2.13.0
- phpro/grumphp: 1.15.0
- phpstan/extension-installer: 1.2.0
- phpstan/phpstan: 1.9.4
- phpstan/phpstan-doctrine: 1.3.27
- phpstan/phpstan-webmozart-assert: 1.2.2
- phpunit/phpunit: 9.5.27
- rector/rector: ^0.15.2
- sebastian/phpcpd: 6.0.3
- seld/jsonlint: 1.9.0
- sylius-labs/coding-standard: 4.3.0
- dev-master
- v3.4.0
- v3.3.0
- v3.2.0
- v3.1.0
- v3.0.0
- v2.3.0
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.0
- v2.0.0
- v1.1.0
- v1.0.0
- dev-feature/v4
- dev-dependabot/npm_and_yarn/assets/braces-3.0.3
- dev-feature/add-interfaces
- dev-feature/add-more-events
- dev-feature/add-cache-on-db-attribute-mapping
- dev-feature/product-models-fixes-and-taxon-fixes
- dev-feature/caching
- dev-feature/assets
- dev-feature/added-attribute-owner-checker
- dev-feature/add-php-82-symfony-62
- dev-feature/import-associations
- dev-fix/product-reference-entity-subattribute-collector
- dev-feature/clean-group-association
- dev-feature/add-env-api-configuration
- dev-feature/add-new-edition-support
- dev-feature/upgrade-php
- dev-fix/process-without-batch
- dev-feature/php7.4
- dev-feature/import-assets
- dev-feature/enable-product-configuration
- dev-feature/update-to-akeneo-client-v6
- dev-php-insights
This package is auto-updated.
Last update: 2024-09-12 09:44:01 UTC
README
Sylius Akeneo 插件
此插件允许您从 Akeneo PIM 导入数据。
特性
要求
安装
-
在您的 composer.json 文件中添加捆绑包和依赖项
composer require synolia/sylius-akeneo-plugin --no-scripts
-
通过在
config/bundles.php
文件中添加来启用插件Synolia\SyliusAkeneoPlugin\SynoliaSyliusAkeneoPlugin::class => ['all' => true],
-
在您的
config/packages/_sylius.yaml
文件中导入所需的配置imports: - { resource: "@SynoliaSyliusAkeneoPlugin/Resources/config/config.yaml" }
-
在您的
config/routes.yaml
文件中导入路由synolia_akeneo: resource: "@SynoliaSyliusAkeneoPlugin/Resources/config/routes.yaml" prefix: '/%sylius_admin.path_name%'
-
将 Asset 特性添加到 Product.php 和 ProductVariant.php 实体,并将 TaxonAttributes 特性添加到 Taxon 实体
<?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") */ #[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") */ #[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") */ #[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(); } }
-
将插件迁移应用到您的数据库
bin/console doctrine:migrations:migrate
-
清除缓存
bin/console cache:clear
开发
- 查看 如何贡献
- 查看 如何使用处理器自定义导入
- 查看 如何使用 fixtures
Akeneo 企业版
参考实体和资产属性类型
许可证
此库受 EUPL-1.2 许可证 保护。
鸣谢
由 Synolia 开发。