synolia / sylius-akeneo-plugin
Akeneo connector for Sylius.
Installs: 78 460
Dependents: 0
Suggesters: 0
Security: 0
Stars: 23
Watchers: 13
Forks: 22
Open Issues: 10
Type:sylius-plugin
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-10-24 07:00:01 UTC
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
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.php
file by addSynolia\SyliusAkeneoPlugin\SynoliaSyliusAkeneoPlugin::class => ['all' => true],
-
Import required config in your
config/packages/_sylius.yaml
file:imports: - { resource: "@SynoliaSyliusAkeneoPlugin/Resources/config/config.yaml" }
-
Import routing in your
config/routes.yaml
file:synolia_akeneo: resource: "@SynoliaSyliusAkeneoPlugin/Resources/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") */ #[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(); } }
-
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.