Skip to content

Commit

Permalink
Update docs (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Dec 13, 2023
1 parent 665d8c9 commit 7d13066
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
17 changes: 13 additions & 4 deletions docs/architecture_and_customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 11 additions & 1 deletion docs/upgrade/upgrade-2.*.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ nav_order: 0
parent: Upgrade
---

# Upgrade from `v2.4.0` to `v2.5.0`

The v2.5.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.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
```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"
```
Expand Down
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,15 @@ 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
```

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

Expand Down

0 comments on commit 7d13066

Please sign in to comment.