Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Attribute groups regression issue
  • Loading branch information
dxops committed Jan 14, 2020
1 parent 765d948 commit c57b9e5
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 10 deletions.
1 change: 1 addition & 0 deletions Form/Type/AkeneoSettingsType.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => 'oro.akeneo.integration.settings.merge_image.label',
'multiple' => false,
'placeholder' => false,
'choices_as_values' => true,
'choices' => [
'Yes' => true,
'No' => false,
Expand Down
11 changes: 10 additions & 1 deletion ImportExport/Strategy/AttributeFamilyImportStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function beforeProcessEntity($entity)
$this->setSystemAttributes($entity);
$this->setOwner($entity);

/** @var AttributeFamily $existingEntity */
$existingEntity = $this->findExistingEntity($entity);
if (!$existingEntity) {
return parent::beforeProcessEntity($entity);
Expand All @@ -92,7 +93,15 @@ public function beforeProcessEntity($entity)

$fields = $this->fieldHelper->getRelations(AttributeGroup::class);
foreach ($entity->getAttributeGroups() as $attributeGroup) {
$existingAttributeGroup = $this->findExistingEntity($attributeGroup);
$existingAttributeGroup = null;
foreach ($existingEntity->getAttributeGroups() as $possibleAttributeGroup) {
if ($possibleAttributeGroup->getCode() === $attributeGroup->getCode()) {
$existingAttributeGroup = $possibleAttributeGroup;
}
}
if (!$existingAttributeGroup) {
continue;
}

foreach ($fields as $field) {
if ($this->isLocalizedFallbackValue($field)) {
Expand Down
46 changes: 41 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ With this extension, you will be able to sync the following data from Akeneo to
* Configurable products, simple products & all product data from supported attributes
* Categories and category trees

## Compatibility

| Connector | OroCommerce | Akeneo | Build |
|------------|-------------|------------|-------|
| v1.6 | v1.6 | v2.3, v3.2 | [![Build Status](https://travis-ci.org/oroinc/OroAkeneoBundle.svg?branch=1.6)](https://travis-ci.org/oroinc/OroAkeneoBundle) |
| v3.1 | v3.1 | v2.3, v3.2 | [![Build Status](https://travis-ci.org/oroinc/OroAkeneoBundle.svg?branch=3.1)](https://travis-ci.org/oroinc/OroAkeneoBundle) |

## Dataset

Connector supports and tested on the next dataset:

* Locales: 4
* Currencies: 2
* Catalogs:
* * Levels: 4, children: 1000
* * Levels: 4, children: 1000
* Attribute Groups: 15 per Attribute Family
* Attributes: 400, 5% localizable, 2% scopable, 1% localizable and scopable, 100% usable in grid
* Attribute Families: 50, up to 100 Attributes per Attribute Family
* Products: 50000, including images

## Installation

1. Add composer package
Expand All @@ -22,9 +43,9 @@ With this extension, you will be able to sync the following data from Akeneo to
composer require "oro/commerce-akeneo:1.6.*"
```

2. Follow [Installation Guide](https://oroinc.com/b2b-ecommerce/doc/1.6/install-upgrade)
2. Follow [Setup Guide](https://doc.oroinc.com/backend/setup/upgrade-to-new-version)

3. Configure [Message Queue](https://oroinc.com/b2b-ecommerce/doc/1.6/admin-guide/op-structure/mq)
3. Configure [Message Queue](https://doc.oroinc.com/backend/mq/consumer/#options)

** Recommended time limit option values is 30 seconds `--time-limit=+30seconds`

Expand Down Expand Up @@ -62,6 +83,20 @@ Create a new integration to start synchronizing data from Akeneo to OroCommerce.
* Product Filter - The filter that enables you to embed the necessary code that would sync only the products you desire. As this filter is passed via API request, it must be filled in JSON format. More details on the format and filter options available for the products can be found in the [Filters section](https://api.akeneo.com/documentation/filter.html) of the Akeneo PIM documentation.

**Note:** Your input is validated on the go. If you get a validation warning, ensure to correct the code or any issues reported.

* Attribute Filter - The filter that enables you to limit the list of imported attributes. Values must be attribute code, separated with a semi-colon.

**Example:** `sku;descr;price;custom`

**Note:** if not defined before to save the integration, all attributes will be imported.

* Image Attribute Filter - The filter that enables you to limit the list of imported image attributes. Values must be attribute code, separated with a semi-colon.

**Example:** `image;picture`

**Note:** The filter extends Attribute Filter, no need to list attribute codes twice.

* Merge Images From Simple Products To Configurable Product: Copy images from Simple products to their Configurable parent products.

* Connectors - The connectors that enable you to sync either the category or products or both by selecting/deselecting the relevant connector. The attribute family connector is mandatory and cannot be disabled.
* Default Owner - The Owner determines the list of users who can manage the integration and the data synchronized with it. All entities imported within the integration will be assigned to the selected user. By default, the field is prepopulated with the user creating the integration.
Expand All @@ -81,15 +116,16 @@ To start the synchronization manually, click "Schedule Sync" on the top right. W

Click the "Check job progress" link to see the synchronization status.

**Note:** Every time you synchronize **new** product attributes from Akeneo, the "Update Schema" button appears on the top right of the Akeneo integration page and the Product Attributes page ("Products > Product Attributes"). Refresh the integration update page and click the "Update Schema" button to apply the changes and enable the product attributes. Otherwise, the attributes will be unavailable. Keep in mind that updating schema sets the Oro instance to the maintenance mode, so it is recommended to check if no critical processes are running before clicking the button.
**Note:** Every time you synchronize **new** product attributes from Akeneo, the `Update Schema` button appears on the top right of the Akeneo integration page and the Product Attributes page (`Products > Product Attributes`). Refresh the integration update page and click the `Update Schema` button to apply the changes and enable the product attributes. Otherwise, the attributes will be unavailable. Keep in mind that updating schema sets the Oro instance to the maintenance mode, so it is recommended to check if no critical processes are running before clicking the button.

Once the schema update is complete, you can schedule another sync. To schedule full sync now, press the "Schedule Sync" button one more time.
**Note:** Click `Update Cache` button at `System > Localization > Translations` get translation applied. This action required for older versions of OroCommerce.

Once the schema update is complete, you can schedule another sync. To schedule full sync now, press the "Schedule Sync" button one more time.
## Limitations

Because of the differences between Akeneo and OroCommerce, you should take into account a few limitations.

* When you create new attributes on the Akeneo side, they won't be saved to the product information in OroCommerce until the schema has been updated manually by pressing the "Update Schema" button on the integration page.
* When you create new attributes on the Akeneo side, they won't be saved to the product information in OroCommerce until the schema has been updated manually by pressing the `Update Schema` button on the integration page.
* When you add a select or multi-select attribute in Akeneo, the options won't be synchronized until the schema has been updated.
* Akeneo date field type can have a different value for every locale. The same behavior is not possible in OroCommerce. For this reason, it is imported as a localized fallback value.
* Akeneo multi-select fields can have different values per locale. In OroCommerce, all the values from the various locales are combined.
Expand Down
4 changes: 2 additions & 2 deletions Resources/translations/messages.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ oro:
label: 'Attribute Filter'
tooltip: 'This field enables you to apply filters to sync only the attributes you want. Values must be attribute code, separated with a semi-colon. IMPORTANT: if not defined before to save the integration, all attributes will be imported.'
akeneo_attribute_image_list:
label: 'Image Attributes Filter'
label: 'Image Attribute Filter'
tooltip: 'List of Akeneo image attributes to use as product images. Values must be attribute code, separated with a semi-colon.'
price_list:
label: 'Pricelist'
label: 'Price List'
merge_image:
label: 'Merge images from simple products to configurable product'
tooltip: 'Add all images from the children to the configurable product'
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
]
},
"require": {
"php": "7.1.*",
"php": "7.1.*|7.2.*",
"ext-json": "*",
"oro/commerce-enterprise": "1.6.*",
"oro/commerce-enterprise": "1.6.* <=1.6.38",
"akeneo/api-php-client-ee": "3.0.*",
"php-http/guzzle6-adapter": "1.1.*",
"php-http/message": "1.7.*"
Expand Down

0 comments on commit c57b9e5

Please sign in to comment.