Skip to content

Commit

Permalink
Update docs (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Dec 11, 2023
1 parent dbfe1f4 commit 9288eb7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/architecture_and_customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions docs/upgrade/upgrade-2.*.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 3 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,18 +460,18 @@ 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
```

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
Expand Down

0 comments on commit 9288eb7

Please sign in to comment.