synolia / syliusakeneoplugin Goto Github PK
View Code? Open in Web Editor NEWThis Sylius plugin allows you to import data from Akeneo PIM
License: European Union Public License 1.2
This Sylius plugin allows you to import data from Akeneo PIM
License: European Union Public License 1.2
Is there a way to import the specific variant attributes described here in Sylius ?
Example :
the variant attributes by color: pictures, composition
the variant attributes by color/size: EAN, SKU
Describe the bug
Entities with repository declared like so : @ORM\Entity(repositoryClass="CategoryConfigurationRepository")
mess with the Doctrine PHPStan extension https://github.com/phpstan/phpstan-doctrine.
The classname should be complete in the repositoryClass
param.
To Reproduce
Steps to reproduce the behavior:
$respository = $entityManager->getRepository(CategoryConfiguration::class);
$data = $respository->findAll();
Expected behavior
No PHPStan error.
Error
Call` to method findAll() on an unknown class Synolia\SyliusAkeneoPlugin\Entity\CategoryConfigurationRepository.
It seems the Doctrine extension based the class resolving of the repositoy on the repositoryClass
param, and it is not a fully declared namespace so the detected namespace is not the right one.
Describe the bug
When the variationAxes of a family are modified in Akeneo, the plugin only adds new axes in akeneo_product_group
. Old axes are never purged from the variationAxes array.
To Reproduce
Steps to reproduce the behavior:
bin/console akeneo:import:families
akeneo_product_group
and set a fake variationAxes
value (ex : a:1:{i:0;s:10:"dummy_axis";}
bin/console akeneo:import:families
akeneo_product_group
: variationAxes
now has the correct axes and dummy_axis
remains.Expected behavior
When an attribute is no longer used as a variation axis, it should be purged from akeneo_product_group
when families are imported.
Unfortunately, the current version is not compatible with Sylius 1.9. When do you plan to make it compatible?
Hi,
We're having problems importing products which references to an akeneo_reference_entity
. In order to do this, firstly we need to import attributes in sylius_product_option
table and their values in sylius_product_option_value
with the akeneo:import:attributes
command.
The previous command retrieves attributes and when it does import them as options, this line unfortunatly ignores everything which is not pim_catalog_simpleselect
/ select
(SelectAttributeTypeMatcher
) or pim_catalog_multiselect
/ multiselect
(MultiSelectAttributeTypeMatcher
) :
https://github.com/synolia/SyliusAkeneoPlugin/blob/v2.1.0/src/Task/AttributeOption/RetrieveOptionsTask.php#L55
Therefore my resource with type akeneo_reference_entity
(ReferenceEntityAttributeTypeMatcher
) is skipped and values in sylius_product_option_value are not created.
Do you have any information why this is not imported ?
Best regards.
This is part of my https://*****.cloud.akeneo.com/api/rest/v1/attributes call :
// ...
{
"_links": {
"self": {
"href": "https:\/\/*****.cloud.akeneo.com\/api\/rest\/v1\/attributes\/gce_color_variant"
}
},
"code": "gce_color_variant",
"type": "akeneo_reference_entity",
"group": "axe_declinaison",
"unique": false,
"useable_as_grid_filter": false,
"allowed_extensions": [],
"metric_family": null,
"default_metric_unit": null,
"reference_data_name": "coloris_gce",
"available_locales": [],
"max_characters": null,
"validation_rule": null,
"validation_regexp": null,
"wysiwyg_enabled": null,
"number_min": null,
"number_max": null,
"decimals_allowed": null,
"negative_allowed": null,
"date_min": null,
"date_max": null,
"max_file_size": null,
"minimum_input_length": null,
"sort_order": 0,
"localizable": false,
"scopable": false,
"labels": {
"fr_FR": "Coloris"
},
"guidelines": {},
"auto_option_sorting": null,
"is_read_only": false,
"default_value": null,
"group_labels": {
"fr_FR": "Axe déclinaison"
}
},
// ...
And call to https://*****.cloud.akeneo.com/api/rest/v1/reference-entities/coloris_gce/records :
// ...
{
"_links": {
"self": {
"href": "https:\/\/*****.cloud.akeneo.com\/api\/rest\/v1\/reference-entities\/coloris_gce\/records\/t01_1002_bordeau"
}
},
"code": "t01_1002_bordeau",
"values": {
"label": [
{
"locale": "fr_FR",
"channel": null,
"data": "Bordeaux"
}
],
"image": [
{
// ...
}
],
"gce_supplier_name": [
{
"locale": null,
"channel": null,
"data": "John Doe"
}
],
"gce_supplier_internal_fabric_reference": [
{
"locale": null,
"channel": null,
"data": "Tissu bonnie"
}
],
"pim_main_color": [
{
"locale": null,
"channel": null,
"data": [
"rouge"
]
}
]
}
},
// ...
Describe the bug
Hello,
During product import, it looks like some steps are missing.
No product were imported but the temporary table contains the products I need from the akeneo API.
I don't know if something is missing, maybe you can help with some things to check ?
Expected behavior
Products are imported
Screenshots
$ bin/console akeneo:import:products -vvv
11:43:50 NOTICE [akeneo] akeneo:import:products
11:43:50 DEBUG [akeneo] Synolia\SyliusAkeneoPlugin\Task\Product\ProcessProductsTask
11:43:50 NOTICE [akeneo] Retrieve Product from Akeneo API
11:43:52 NOTICE [akeneo] End of : akeneo:import:products
Additional context
PHP 8
Sylius 1.11.7
Is it planned to make this bundle compatible with the latest version of Sylius, 1.13?
Is your feature request related to a problem? Please describe.
We are using languages as locales in Sylius (en, de, ...) instead of en_US, de_DE, ... as Akeneo requires.
Right now I did not find a possibility to configure a mapping between these. Unless I missed something?
Describe the solution you'd like
I need to somehow be allowed to map the locales between both systems. We discussed this class in Slack yesterday: https://github.com/synolia/SyliusAkeneoPlugin/blob/master/src/Provider/SyliusAkeneoLocaleCodeProvider.php but as far as I see it, it's impossible to override/circumvent as it's final and hardcoded into several other class constructors as a type hint. If it were implementing an Interface which is used as type hint everywhere, I could replace the class with my own logic via decorator.
Describe alternatives you've considered
Not sure that I found any so far.
Hello,
First of all, thank you for this plugin !
Is there any chance you could consider upgrading to (at least) v5.0.0 for the akeneo/api-php-client-ee SDK in order to have access to the "AssetManager" APIs ?
Thanks !
Describe the bug
Attributes configuration page in admin is not available due the missing table error
it seems it is caused by calling RetrieveAttributesTask
without prior SetupAttributeTask
(which creates temp table) in Synolia\SyliusAkeneoPlugin\Form\Type\AttributeCodeChoiceType
To Reproduce
Steps to reproduce the behavior:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.tmp_akeneo_attributes' doesn't exist
Expected behavior
I can configure attributes mapping
Additional context
I am concerned with race condition when someone clicks akeneo->attributes menu item in admin during attribute import. I think it may lead to unexpected behaviors (or processing incomplete data)
Describe the bug
Only root category is imported. Sub categories are not imported.
it seems that it is caused by re-assigning parent and root categories after saving taxon without parent in Synolia\SyliusAkeneoPlugin\Task\Category\CreateUpdateEntityTask
It is also reflected in logs:
11:35:09 INFO [akeneo] Category "motorsensen_freischneider" will be created
11:35:09 WARNING [akeneo] Root cannot be changed manually, change parent instead
To Reproduce
Steps to reproduce the behavior:
php bin/console akeneo:import:categories -vvv
Expected behavior
Sub-categories are imported correctly
Additional context
Sylius 10.0.4, PHP 8.0
Describe the bug
The connection to Akeneo may be interrupted during an import and the refresh token may no longer be valid, which produces a fatal error.
To Reproduce
I don't have a scenario to reproduce this issue, it's quite random.
Expected behavior
Catch error and auto login to akeneo.
Screenshots
17:25:37 NOTICE [akeneo] akeneo:import:attributes
17:25:38 DEBUG [akeneo] Synolia\SyliusAkeneoPlugin\Task\Attribute\RetrieveAttributesTask
17:25:38 NOTICE [akeneo] Retrieve Attribute from Akeneo API
In HttpExceptionHandler.php line 58:
[Akeneo\Pim\ApiClient\Exception\UnprocessableEntityHttpException (422)]
Refresh token is invalid or has expired
Exception trace:
at /app/vendor/akeneo/api-php-client/src/Client/HttpExceptionHandler.php:58
Akeneo\Pim\ApiClient\Client\HttpExceptionHandler->transformResponseToException() at /app/vendor/akeneo/api-php-client/src/Client/HttpClient.php:47
Akeneo\Pim\ApiClient\Client\HttpClient->sendRequest() at /app/vendor/akeneo/api-php-client/src/Api/AuthenticationApi.php:80
Akeneo\Pim\ApiClient\Api\AuthenticationApi->authenticate() at /app/vendor/akeneo/api-php-client/src/Api/AuthenticationApi.php:59
Akeneo\Pim\ApiClient\Api\AuthenticationApi->authenticateByRefreshToken() at /app/vendor/akeneo/api-php-client/src/Client/AuthenticatedHttpClient.php:68
Akeneo\Pim\ApiClient\Client\AuthenticatedHttpClient->sendRequest() at /app/vendor/akeneo/api-php-client/src/Client/ResourceClient.php:54
Akeneo\Pim\ApiClient\Client\ResourceClient->getResource() at /app/vendor/akeneo/api-php-client/src/Client/ResourceClient.php:85
Akeneo\Pim\ApiClient\Client\ResourceClient->getResources() at /app/vendor/akeneo/api-php-client/src/Api/AttributeApi.php:61
Akeneo\Pim\ApiClient\Api\AttributeApi->listPerPage() at /app/vendor/akeneo/api-php-client/src/Api/AttributeApi.php:71
Akeneo\Pim\ApiClient\Api\AttributeApi->all() at /app/vendor/synolia/sylius-akeneo-plugin/src/Task/Attribute/RetrieveAttributesTask.php:36
Synolia\SyliusAkeneoPlugin\Task\Attribute\RetrieveAttributesTask->__invoke() at /app/vendor/synolia/sylius-akeneo-plugin/src/Pipeline/Processor.php:31
Synolia\SyliusAkeneoPlugin\Pipeline\Processor->process() at /app/vendor/league/pipeline/src/Pipeline.php:34
League\Pipeline\Pipeline->process() at /app/vendor/synolia/sylius-akeneo-plugin/src/Command/ImportAttributesCommand.php:77
Synolia\SyliusAkeneoPlugin\Command\ImportAttributesCommand->execute() at /app/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:1023
Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/framework-bundle/Console/Application.php:97
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:271
Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/framework-bundle/Console/Application.php:83
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:147
Symfony\Component\Console\Application->run() at /app/bin/console:38
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.