From f72d366cab5e64df5a55b20e4dd8a799e9f22142 Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Wed, 13 Dec 2023 19:50:35 +0100 Subject: [PATCH] Update docs (#192) --- docs/architecture_and_customization.md | 17 +++++++++++++---- docs/upgrade/upgrade-2.*.md | 12 +++++++++++- docs/usage.md | 4 ++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/architecture_and_customization.md b/docs/architecture_and_customization.md index 49673f8b..ca5a1925 100644 --- a/docs/architecture_and_customization.md +++ b/docs/architecture_and_customization.md @@ -180,12 +180,21 @@ importer** (`Webgriffe\SyliusAkeneoPlugin\ProductAssociations\Importer`). This i associations to the corresponding Sylius products associations. The association types must already exist on Sylius with the same code they have on Akeneo. +### Attribute importer + +Another provided importer is the **attribute importer** (`\Webgriffe\SyliusAkeneoPlugin\Attribute\Importer`). This +importer imports the Akeneo attribute translations into Sylius attribute and option translations. +The attributes and options must already exist on Sylius with the same code they have on Akeneo to be imported. + ### Attribute options importer -Another provided importer is the **attribute options -importer** (`\Webgriffe\SyliusAkeneoPlugin\AttributeOptions\Importer`). This importer imports the Akeneo simple select -and multi select attributes options into Sylius select attributes. The select attributes must already exist on Sylius -with the same code they have on Akeneo. +Another provided importer is the **attribute options importer** +(`\Webgriffe\SyliusAkeneoPlugin\AttributeOptions\Importer`). This importer imports the Akeneo simple select +and multi select attributes options into Sylius select attributes. It imports also all attribute options that are used +on Sylius as product options. If the attribute has metrical type the values will not be imported because they could be +any value, it will be created by the ProductOptionValueResolver during product variant import. +The select attributes and the product options must already exist on Sylius +with the same code they have on Akeneo to be imported. ## Customize which Akeneo products to import diff --git a/docs/upgrade/upgrade-2.*.md b/docs/upgrade/upgrade-2.*.md index 216a96a0..5cd803cd 100644 --- a/docs/upgrade/upgrade-2.*.md +++ b/docs/upgrade/upgrade-2.*.md @@ -5,6 +5,16 @@ nav_order: 0 parent: Upgrade --- +# Upgrade from `v2.5.0` to `v2.6.0` + +The v2.6.0 version introduces the Attribute importer. +If you want to import attribute and options translations from Akeneo you have to add the `--importer="Attribute"` option to the command that imports once a hour: + +```diff +- 0 * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --all --importer="AttributeOptions" ++ 0 * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --all --importer="Attribute" --importer="AttributeOptions" +``` + # Upgrade from `v2.4.0` to `v2.5.0` The v2.5.0 version now allow you to choose which product and product model to import through webhook entry point. @@ -15,7 +25,7 @@ Take a look at the [customization documentation](../architecture_and_customizati The v2.4.0 version introduces the Product Model importer. If you are using the webhook no changes are requested as it will be automatically enqueued on every update. If you are using the cronjob, you have to add the `--importer="ProductModel"` option to the command that imports every minute: -```git +```diff - * * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --since-file=/path/to/sylius/var/storage/akeneo-import-sincefile.txt --importer="Product" --importer="ProductAssociations" + * * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --since-file=/path/to/sylius/var/storage/akeneo-import-sincefile.txt --importer="Product" --importer="ProductModel" --importer="ProductAssociations" ``` diff --git a/docs/usage.md b/docs/usage.md index 07d5d2a7..27de6a89 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -459,7 +459,7 @@ It could be useful to add also this command to your scheduler to run automatical To make all importers and other plugin features work automatically the following is the suggested crontab: ``` -0 * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --all --importer="AttributeOptions" +0 * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --all --importer="Attribute" --importer="AttributeOptions" * * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --since-file=/path/to/sylius/var/storage/akeneo-import-sincefile.txt --importer="Product" --importer="ProductModel" --importer="ProductAssociations" 0 */6 * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:reconcile 0 0 * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:cleanup-item-import-results @@ -467,7 +467,7 @@ To make all importers and other plugin features work automatically the following This will: -* Import the update of all attribute options every hour +* Import the attribute/option translations and import all attribute/option values every hour * Import, every minute, all products and product models that have been modified since the last execution, along with their associations * Reconcile Akeneo deleted products every 6 hours