From 0e1535953372fc9c71e4873eb7815158208d2ee2 Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Mon, 11 Dec 2023 12:14:29 +0100 Subject: [PATCH] Update docs (#102) --- docs/architecture_and_customization.md | 7 +++++++ docs/upgrade/upgrade-2.*.md | 10 ++++++++++ docs/usage.md | 6 +++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/architecture_and_customization.md b/docs/architecture_and_customization.md index 899e7593..57ad32ad 100644 --- a/docs/architecture_and_customization.md +++ b/docs/architecture_and_customization.md @@ -166,6 +166,13 @@ app.my_custom_value_handler: - { name: 'webgriffe_sylius_akeneo.product.value_handler', priority: 42 } ``` +### Product models importer + +Another provided importer is the **product models +importer** (`Webgriffe\SyliusAkeneoPlugin\ProductModel\Importer`). This importer imports the Akeneo product models +to the corresponding Sylius products and product variants. Basically, it dispatch an `ItemImport` message for each +product, on Akeneo, belonging to the product model. So it uses the same logic of the product importer described above. + ### Product associations importer Another provided importer is the **product associations diff --git a/docs/upgrade/upgrade-2.*.md b/docs/upgrade/upgrade-2.*.md index da0d8fbe..8a08cf50 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.3.0` to `v2.4.0` + +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 +- * * * * * /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" +``` + # Upgrade from `v2.2.0` to `v2.3.0` The v2.3.0 version introduces the support for webhooks. To enable check the new documentation [here](../webhook.html). diff --git a/docs/usage.md b/docs/usage.md index 90674785..07d5d2a7 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -460,7 +460,7 @@ To make all importers and other plugin features work automatically the following ``` 0 * * * * /path/to/sylius/bin/console -e prod -q webgriffe:akeneo:import --all --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="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" 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 ``` @@ -468,10 +468,10 @@ To make all importers and other plugin features work automatically the following This will: * Import the update of all attribute options every hour -* Import, every minute, all products that have been modified since the last execution, along with their associations +* 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 -> *NB*: The line that imports products and product associations every minute should be added only if you do not use the +> *NB*: The line that imports products, product models and product associations every minute should be added only if you do not use the > webhook feature (see next chapter). Otherwise, the products will be imported twice. Import and Reconcile commands uses a [lock mechanism](https://symfony.com/doc/current/console/lockable_trait.html) which