From 78335a1326a2ea229a586e0f3d3590c63dcb849a Mon Sep 17 00:00:00 2001 From: Dmitry Lymarenko <dmitry.lymarenko@spryker.com> Date: Thu, 13 Apr 2023 15:31:45 +0200 Subject: [PATCH 01/14] CC-25250 Added Service Points IG --- _data/sidebars/scos_dev_sidebar.yml | 4 + .../install-the-service-points-feature.md | 337 ++++++++++++++++++ .../install-the-service-points-feature.md | 8 + 3 files changed, 349 insertions(+) create mode 100644 _includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md create mode 100644 docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index 82c6d665761..1c60a922c64 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -2385,6 +2385,10 @@ entries: url: /docs/scos/dev/feature-integration-guides/install-the-push-notification-feature.html include_versions: - "202304.0" + - title: Service Points + url: /docs/scos/dev/feature-integration-guides/install-the-service-points-feature.html + include_versions: + - "202304.0" - title: Queue Data Import url: /docs/scos/dev/feature-integration-guides/queue-data-import-feature-integration.html include_versions: diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md new file mode 100644 index 00000000000..02872078050 --- /dev/null +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -0,0 +1,337 @@ +This document describes how to integrate the Service Points feature into a Spryker project. + +## Install feature core + +Follow the steps below to install the Service Points feature. +To start feature integration, integrate the required features: + +### Prerequisites + +To start feature integration, overview and install the necessary features: + +| NAME | VERSION | INTEGRATION GUIDE | +|--------------|------------------|--------------------------------------------------------------------------------------------------------------------------------------| +| Spryker Core | {{page.version}} | [Spryker Core feature integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/spryker-core-feature-integration.html) | | + +### 1) Install the required modules using Composer + +```bash +composer require spryker-feature/service-points: "{{page.version}}" --update-with-dependencies +``` + +{% info_block warningBox "Verification" %} + +Make sure that the following modules have been installed: + +| MODULE | EXPECTED DIRECTORY | +|-------------------------|-------------------------------------------| +| ServicePoint | vendor/spryker/service-point | +| ServicePointDataImport | vendor/spryker/service-point-data-import | +| ServicePointsBackendApi | vendor/spryker/service-points-backend-api | + +{% endinfo_block %} + +## 2) Set up database schema and transfer objects + +Apply database changes and generate transfer changes: + +```bash +console transfer:generate +console propel:install +console transfer:entity:generate +console frontend:zed:build +``` + +{% info_block warningBox "Verification" %} + +Make sure that the following changes have been applied in the database: + +| DATABASE ENTITY | TYPE | EVENT | +|-------------------------|-------|---------| +| spy_service_point | table | created | +| spy_service_point_store | table | created | + +{% endinfo_block %} + +{% info_block warningBox "Verification" %} + +Make sure that propel entities have been generated successfully by checking their existence. Also, make generated entity classes extending respective Spryker core classes. + +| CLASS NAMESPACE | EXTENDS | +|-------------------------------------------------------------|--------------------------------------------------------------------------------| +| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | + +{% endinfo_block %} + +{% info_block warningBox "Verification" %} + +Make sure that the following changes have been applied in transfer objects: + +| TRANSFER | TYPE | EVENT | PATH | +|--------------------------------|-------|---------|--------------------------------------------------------------| +| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | +| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | +| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | +| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | +| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | +| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | +| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | +| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | +| Store | class | created | Generated/Shared/Transfer/Store | +| Error | class | created | Generated/Shared/Transfer/Error | +| Sort | class | created | Generated/Shared/Transfer/Sort | +| Pagination | class | created | Generated/Shared/Transfer/Pagination | +| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | +| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | +| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | + +{% endinfo_block %} + +### 3) Set up configuration + +1. To make the `service-points` resource protected, adjust the protected paths configuration: + +**src/Pyz/Shared/GlueBackendApiApplicationAuthorizationConnector/GlueBackendApiApplicationAuthorizationConnectorConfig.php** + +```php +<?php + +namespace Pyz\Shared\GlueBackendApiApplicationAuthorizationConnector; + +use Spryker\Shared\GlueBackendApiApplicationAuthorizationConnector\GlueBackendApiApplicationAuthorizationConnectorConfig as SprykerGlueBackendApiApplicationAuthorizationConnectorConfig; + +class GlueBackendApiApplicationAuthorizationConnectorConfig extends SprykerGlueBackendApiApplicationAuthorizationConnectorConfig +{ + /** + * @return array<string, mixed> + */ + public function getProtectedPaths(): array + { + return [ + // ... + '/\/service-points(?:\/[^\/]+)?\/?$/' => [ + 'isRegularExpression' => true, + ], + ]; + } +} +``` + +### 4) Import service points + +1. Prepare your data according to your requirements using our demo data: + +**data/import/common/common/service_point.csv** + +```csv +key,name,is_active +sp1,Spryker Main Store,1 +sp2,Spryker Berlin Store,1 +``` + +| COLUMN | REQUIRED? | DATA TYPE | DATA EXAMPLE | DATA EXPLANATION | +|-----------|-----------|-----------|--------------------|-----------------------------------------| +| key | mandatory | string | sp1 | Unique key of the service point. | +| name | mandatory | string | Spryker Main Store | Name of the service point. | +| is_active | mandatory | bool | 0 | Defines if the service point is active. | + +**data/import/common/{{store}}/service_point_store.csv** + +```csv +service_point_key,store_name +sp1,DE +sp2,DE +``` + +| COLUMN | REQUIRED? | DATA TYPE | DATA EXAMPLE | DATA EXPLANATION | +|-------------------|-----------|-----------|--------------|-----------------------------------------| +| service_point_key | mandatory | string | sp1 | Unique key of the service point. | +| store_name | mandatory | string | DE | Name of the store to make relation for. | + +2. Enable data imports at your configuration file, e.g.: + +**data/import/local/full_EU.yml** + +```yml + - data_entity: service-point + source: data/import/common/common/service_point.csv + - data_entity: service-point-store + source: data/import/common/{{store}}/service_point_store.csv +``` + +3. Register the following data import plugins: + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------|---------------------------------------------------------------|---------------|---------------------------------------------------------------------| +| ServicePointDataImportPlugin | Imports service points data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | +| ServicePointStoreDataImportPlugin | Imports service point store relations data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | + +**src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\DataImport; + +use Spryker\Zed\DataImport\DataImportDependencyProvider as SprykerDataImportDependencyProvider; +use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointDataImportPlugin; +use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointDataImportPlugin; + +class DataImportDependencyProvider extends SprykerDataImportDependencyProvider +{ + /** + * @return array<\Spryker\Zed\DataImport\Dependency\Plugin\DataImportPluginInterface> + */ + protected function getDataImporterPlugins(): array + { + return [ + new ServicePointDataImportPlugin(), + new ServicePointStoreDataImportPlugin(), + ]; + } +} +``` + +4. Enable the behaviors by registering the console commands: + +**src/Pyz/Zed/Console/ConsoleDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Console; + +use Spryker\Zed\Kernel\Container; +use Spryker\Zed\Console\ConsoleDependencyProvider as SprykerConsoleDependencyProvider; +use Spryker\Zed\DataImport\Communication\Console\DataImportConsole; +use Spryker\Zed\ServicePointDataImport\ServicePointDataImportConfig; + +class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider +{ + /** + * @param \Spryker\Zed\Kernel\Container $container + * + * @return array<\Symfony\Component\Console\Command\Command> + */ + protected function getConsoleCommands(Container $container): array + { + $commands = [ + // ... + new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT), + new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT_STORE), + ]; + + return $commands; + } +} +``` + +5. Import data: + +```bash +console data:import service-point +console data:import service-point-store +``` + +{% info_block warningBox “Verification” %} + +Make sure that entities were imported to `spy_service_point` and `spy_service_point_store` database tables respectively. + +{% endinfo_block %} + +### 5) Add translations + +1. Append glossary according to your configuration: + +```csv +service_point.validation.service_point_key_exists,A service point with the same key already exists.,en_US +service_point.validation.service_point_key_exists,Es existiert bereits eine Servicestelle mit dem gleichen Schlüssel.,de_DE +service_point.validation.service_point_key_is_not_unique,A service point with the same key already exists in request.,en_US +service_point.validation.service_point_key_is_not_unique,Es existiert bereits eine Servicestelle mit dem gleichen Schlüssel in einer Abfrage.,de_DE +service_point.validation.service_point_key_wrong_length,A service point key must have length from %min% to %max% characters.,en_US +service_point.validation.service_point_key_wrong_length,Ein Servicestellen-Schlüssel muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_point_name_wrong_length,A service point name must have length from %min% to %max% characters.,en_US +service_point.validation.service_point_name_wrong_length,Ein Servicestellen-Name muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.store_does_not_exist,Store with name '%name%' does not exist.,en_US +service_point.validation.store_does_not_exist,Store mit dem Namen '%name%' existiert nicht.,de_DE +service_point.validation.service_point_entity_not_found,Service point entity was not found.,en_US +service_point.validation.service_point_entity_not_found,Servicestelle wurde nicht gefunden.,de_DE +service_point.validation.wrong_request_body,Wrong request body.,en_US +service_point.validation.wrong_request_body,Falscher Anforderungstext.,de_DE +``` + +2. Import data: + +```bash +console data:import glossary +``` + +### 6) Set up behavior + +4. To enable the Backend API, register the plugin: + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|------------------------------------|------------------------------------------|---------------|------------------------------------------------------------------------------------------------------| +| ServicePointsBackendResourcePlugin | Registers the `service-points` resource. | | \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector | + +**src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php** + +```php +<?php + +namespace Pyz\Glue\GlueBackendApiApplication; + +use Spryker\Glue\GlueBackendApiApplication\GlueBackendApiApplicationDependencyProvider as SprykerGlueBackendApiApplicationDependencyProvider; +use \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector\ServicePointsBackendResourcePlugin; + +class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiApplicationDependencyProvider +{ + /** + * @return array<\Spryker\Glue\GlueApplicationExtension\Dependency\Plugin\ResourceInterface> + */ + protected function getResourcePlugins(): array + { + return [ + new ServicePointsBackendResourcePlugin(), + ]; + } +} + +``` + +{% info_block warningBox "Verification" %} + +1. Make sure that you can send the following requests: + + * `POST https://glue-backend.mysprykershop.com/service-points` + ```json + { + "data": { + "type": "service-points", + "attributes": { + "name": "Some Service Point", + "key": "ssp", + "isActive": "true", + "stores": ["DE", "AT"] + } + } + } + ``` + * `PATCH https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}` + ```json + { + "data": { + "type": "service-points", + "attributes": { + "name": "Another Name" + } + } + } + ``` + * `GET https://glue-backend.mysprykershop.com/service-points/` + * `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}` + +{% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md new file mode 100644 index 00000000000..dd61b0f55a9 --- /dev/null +++ b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md @@ -0,0 +1,8 @@ +--- +title: Install the Service Points feature +description: Learn how to integrate the Service Points feature into your project +last_updated: Apr 14, 2023 +template: feature-integration-guide-template +--- + +{% include pbc/all/install-features/{{page.version}}/install-the-service-points-feature.md %} <!-- To edit, see /_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md --> From 6db5ae28f152744d801a7087428fc81f964a5854 Mon Sep 17 00:00:00 2001 From: Dmitry Lymarenko <dmitry.lymarenko@spryker.com> Date: Thu, 13 Apr 2023 17:16:19 +0200 Subject: [PATCH 02/14] CC-25250 Small fix --- .../202304.0/install-the-service-points-feature.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index 02872078050..72f8334df44 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -271,7 +271,7 @@ console data:import glossary ### 6) Set up behavior -4. To enable the Backend API, register the plugin: +1. To enable the Backend API, register the plugin: | PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | |------------------------------------|------------------------------------------|---------------|------------------------------------------------------------------------------------------------------| From 5d1a33779f85ce8e7a9e94f9f894d9cb89d8ea69 Mon Sep 17 00:00:00 2001 From: Artem <artem.siminenko@gmail.com> Date: Tue, 2 May 2023 12:05:35 +0200 Subject: [PATCH 03/14] CC-26009 add IG for service point addresses --- .../install-the-service-points-feature.md | 216 ++++++++++++++---- .../install-the-service-points-feature.md | 2 +- 2 files changed, 178 insertions(+), 40 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index 72f8334df44..db0f11254fc 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -46,10 +46,12 @@ console frontend:zed:build Make sure that the following changes have been applied in the database: -| DATABASE ENTITY | TYPE | EVENT | -|-------------------------|-------|---------| -| spy_service_point | table | created | -| spy_service_point_store | table | created | +| DATABASE ENTITY | TYPE | EVENT | +|---------------------------|--------|---------| +| spy_service_point | table | created | +| spy_service_point_store | table | created | +| spy_service_point_address | table | created | +| spy_region.uuid | column | created | {% endinfo_block %} @@ -57,12 +59,14 @@ Make sure that the following changes have been applied in the database: Make sure that propel entities have been generated successfully by checking their existence. Also, make generated entity classes extending respective Spryker core classes. -| CLASS NAMESPACE | EXTENDS | -|-------------------------------------------------------------|--------------------------------------------------------------------------------| -| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | +| CLASS NAMESPACE | EXTENDS | +|---------------------------------------------------------------|----------------------------------------------------------------------------------| +| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | {% endinfo_block %} @@ -70,29 +74,42 @@ Make sure that propel entities have been generated successfully by checking thei Make sure that the following changes have been applied in transfer objects: -| TRANSFER | TYPE | EVENT | PATH | -|--------------------------------|-------|---------|--------------------------------------------------------------| -| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | -| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | -| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | -| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | -| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | -| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | -| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | -| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | -| Store | class | created | Generated/Shared/Transfer/Store | -| Error | class | created | Generated/Shared/Transfer/Error | -| Sort | class | created | Generated/Shared/Transfer/Sort | -| Pagination | class | created | Generated/Shared/Transfer/Pagination | -| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | -| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | -| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | +| TRANSFER | TYPE | EVENT | PATH | +|---------------------------------------|-------|---------|------------------------------------------------------------------| +| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | +| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | +| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | +| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | +| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | +| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | +| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | +| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | +| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | +| Store | class | created | Generated/Shared/Transfer/Store | +| Error | class | created | Generated/Shared/Transfer/Error | +| Sort | class | created | Generated/Shared/Transfer/Sort | +| Pagination | class | created | Generated/Shared/Transfer/Pagination | +| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | +| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | +| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | +| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | +| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | +| Country | class | created | Generated/Shared/Transfer/Country | +| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | +| Region | class | created | Generated/Shared/Transfer/Region | +| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | +| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | +| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | +| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | +| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | +| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | +| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | {% endinfo_block %} ### 3) Set up configuration -1. To make the `service-points` resource protected, adjust the protected paths configuration: +1. To make the `service-points` and `service-point-addresses` resources protected, adjust the protected paths configuration: **src/Pyz/Shared/GlueBackendApiApplicationAuthorizationConnector/GlueBackendApiApplicationAuthorizationConnectorConfig.php** @@ -112,7 +129,7 @@ class GlueBackendApiApplicationAuthorizationConnectorConfig extends SprykerGlueB { return [ // ... - '/\/service-points(?:\/[^\/]+)?\/?$/' => [ + '/\/service-points.*/' => [ 'isRegularExpression' => true, ], ]; @@ -151,6 +168,25 @@ sp2,DE | service_point_key | mandatory | string | sp1 | Unique key of the service point. | | store_name | mandatory | string | DE | Name of the store to make relation for. | +**data/import/common/common/service_point_address.csv** + +```csv +service_point_key,region_iso2_code,country_iso2_code,address1,address2,address3,city,zip_code +sp1,,DE,Caroline-Michaelis-Straße,8,,Berlin,10115 +sp2,,DE,Julie-Wolfthorn-Straße,1,,Berlin,10115 +``` + +| COLUMN | REQUIRED? | DATA TYPE | DATA EXAMPLE | DATA EXPLANATION | +|-------------------|-----------|-----------|---------------------------|----------------------------------| +| service_point_key | mandatory | string | sp1 | Unique key of the service point. | +| region_iso2_code | optional | string | DE-BE | Region ISO2 code | +| country_iso2_code | mandatory | string | DE | Country ISO2 code | +| address1 | mandatory | string | Caroline-Michaelis-Straße | First line of address | +| address2 | mandatory | string | 8a | Second line of address | +| address3 | optional | string | 12/1 | Third line of address | +| city | mandatory | string | Berlin | City | +| zip_code | mandatory | string | 10115 | Zip code | + 2. Enable data imports at your configuration file, e.g.: **data/import/local/full_EU.yml** @@ -160,14 +196,17 @@ sp2,DE source: data/import/common/common/service_point.csv - data_entity: service-point-store source: data/import/common/{{store}}/service_point_store.csv + - data_entity: service-point-address + source: data/import/common/common/service_point_address.csv ``` 3. Register the following data import plugins: -| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | -|-----------------------------------|---------------------------------------------------------------|---------------|---------------------------------------------------------------------| -| ServicePointDataImportPlugin | Imports service points data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | -| ServicePointStoreDataImportPlugin | Imports service point store relations data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-------------------------------------|---------------------------------------------------------------|---------------|---------------------------------------------------------------------| +| ServicePointDataImportPlugin | Imports service points data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | +| ServicePointStoreDataImportPlugin | Imports service point store relations data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | +| ServicePointAddressDataImportPlugin | Imports service point addresses into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | **src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** @@ -178,7 +217,8 @@ namespace Pyz\Zed\DataImport; use Spryker\Zed\DataImport\DataImportDependencyProvider as SprykerDataImportDependencyProvider; use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointDataImportPlugin; -use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointDataImportPlugin; +use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointStoreDataImportPlugin; +use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointAddressDataImportPlugin; class DataImportDependencyProvider extends SprykerDataImportDependencyProvider { @@ -190,6 +230,7 @@ class DataImportDependencyProvider extends SprykerDataImportDependencyProvider return [ new ServicePointDataImportPlugin(), new ServicePointStoreDataImportPlugin(), + new ServicePointAddressDataImportPlugin(), ]; } } @@ -222,6 +263,7 @@ class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider // ... new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT), new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT_STORE), + new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT_ADDRESS), ]; return $commands; @@ -234,11 +276,12 @@ class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider ```bash console data:import service-point console data:import service-point-store +console data:import service-point-address ``` {% info_block warningBox “Verification” %} -Make sure that entities were imported to `spy_service_point` and `spy_service_point_store` database tables respectively. +Make sure that entities were imported to `spy_service_point`, `spy_service_point_store` and `spy_service_point_address` database tables respectively. {% endinfo_block %} @@ -261,6 +304,26 @@ service_point.validation.service_point_entity_not_found,Service point entity was service_point.validation.service_point_entity_not_found,Servicestelle wurde nicht gefunden.,de_DE service_point.validation.wrong_request_body,Wrong request body.,en_US service_point.validation.wrong_request_body,Falscher Anforderungstext.,de_DE +service_point.validation.country_entity_not_found,Country with iso2 code '%iso2Code%' does not exist.,en_US +service_point.validation.country_entity_not_found,Das Land mit dem iso2-Code '%iso2Code%' existiert nicht.,de_DE +service_point.validation.region_entity_not_found,Region with uuid '%uuid%' does not exist for country with iso2 code '%countryIso2Code%'.,en_US +service_point.validation.region_entity_not_found,Region mit uuid '%uuid%' existiert nicht für Land mit iso2-Code '%countryIso2Code%',de_DE +service_point.validation.service_point_address_address1_wrong_length,Service Point Address Input address1 must have a length of %min% to %max% characters.,en_US +service_point.validation.service_point_address_address1_wrong_length,Service Point Adresse Input address1 muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_point_address_address2_wrong_length,Service Point Address Input address2 must have a length of %min% to %max% characters.,en_US +service_point.validation.service_point_address_address2_wrong_length,Service Point Adresse Input address2 muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_point_address_address3_wrong_length,Service Point Address Input address3 must have a length of %min% to %max% characters.,en_US +service_point.validation.service_point_address_address3_wrong_length,Service Point Adresse Input address3 muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_point_address_city_wrong_length,A service point address city must have length from %min% to %max% characters.,en_US +service_point.validation.service_point_address_city_wrong_length,Eine Service Point Adresse Stadt muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_point_address_entity_not_found,Service point address entity was not found.,en_US +service_point.validation.service_point_address_entity_not_found,Die Entität Service Point Adresse wurde nicht gefunden.,de_DE +service_point.validation.service_point_address_zip_code_wrong_length,A service point address zip code must have length from %min% to %max% characters.,en_US +service_point.validation.service_point_address_zip_code_wrong_length,Die Postleitzahl einer Service Point Adresse muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_point_address_already_exists,A service point address for the service point already exists.,en_US +service_point.validation.service_point_address_already_exists,Es existiert bereits eine Service Point Adresse für den Service Point.,de_DE +service_point.validation.service_point_uuid_is_not_unique,A service point with the same uuid already exists in request.,en_US +service_point.validation.service_point_uuid_is_not_unique,Ein Service Point mit der gleichen uuid existiert bereits in der Anfrage.,de_DE ``` 2. Import data: @@ -271,11 +334,12 @@ console data:import glossary ### 6) Set up behavior -1. To enable the Backend API, register the plugin: +1. To enable the Backend API, register the plugins: -| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | -|------------------------------------|------------------------------------------|---------------|------------------------------------------------------------------------------------------------------| -| ServicePointsBackendResourcePlugin | Registers the `service-points` resource. | | \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector | +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|--------------------------------------------|---------------------------------------------------|---------------|------------------------------------------------------------------------------------------------------| +| ServicePointsBackendResourcePlugin | Registers the `service-points` resource. | | \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector | +| ServicePointAddressesBackendResourcePlugin | Registers the `service-point-addresses` resource. | | \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector | **src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php** @@ -286,6 +350,7 @@ namespace Pyz\Glue\GlueBackendApiApplication; use Spryker\Glue\GlueBackendApiApplication\GlueBackendApiApplicationDependencyProvider as SprykerGlueBackendApiApplicationDependencyProvider; use \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector\ServicePointsBackendResourcePlugin; +use \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector\ServicePointAddressesBackendResourcePlugin; class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiApplicationDependencyProvider { @@ -296,12 +361,52 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA { return [ new ServicePointsBackendResourcePlugin(), + new ServicePointAddressesBackendResourcePlugin(), ]; } } ``` +2. To enable the Backend API relationships, register the plugin: + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|------------------------------------------------------------------------|---------------------------------------------------------------------------|---------------|------------------------------------------------------------------------------------------------------| +| ServicePointAddressesByServicePointsBackendResourceRelationshipPlugin | Adds `service-point-addresses` relationship to `service-points` resource. | | \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector | + +**src/Pyz/Glue/GlueBackendApiApplicationGlueJsonApiConventionConnector/GlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider.php** + +```php +<?php + +namespace Pyz\Glue\GlueBackendApiApplication; + +use Spryker\Glue\GlueBackendApiApplicationGlueJsonApiConventionConnector\GlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider as SprykerGlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider; +use Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector\ServicePointAddressesByServicePointsBackendResourceRelationshipPlugin; +use Spryker\Glue\ServicePointsBackendApi\ServicePointsBackendApiConfig; + +class GlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider extends SprykerGlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider{ + /** + * @param \Spryker\Glue\GlueJsonApiConventionExtension\Dependency\Plugin\ResourceRelationshipCollectionInterface $resourceRelationshipCollection + * + * @return \Spryker\Glue\GlueJsonApiConventionExtension\Dependency\Plugin\ResourceRelationshipCollectionInterface + */ + protected function getResourceRelationshipPlugins( + ResourceRelationshipCollectionInterface $resourceRelationshipCollection, + ): ResourceRelationshipCollectionInterface { + ... + + $resourceRelationshipCollection->addRelationship( + ServicePointsBackendApiConfig::RESOURCE_SERVICE_POINTS, + new ServicePointAddressesByServicePointsBackendResourceRelationshipPlugin(), + ); + + ... + } +} + +``` + {% info_block warningBox "Verification" %} 1. Make sure that you can send the following requests: @@ -333,5 +438,38 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA ``` * `GET https://glue-backend.mysprykershop.com/service-points/` * `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}` + * `POST https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` + ```json + { + "data": { + "type": "service-point-address", + "attributes": { + "address1": "address1", + "address2": "address2", + "address3": "address3", + "city": "city", + "zipCode": "10115", + "countryIso2Code": "DE" + } + } + } + ``` + * `PATCH https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses/{{service-point-address-uuid}}` + ```json + { + "data": { + "type": "service-point-address", + "attributes": { + "address1": "another address1", + "address2": "another address2", + "address3": "another address3", + "city": "another city", + "zipCode": "20115", + "countryIso2Code": "AT" + } + } + } + ``` + * `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` {% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md index dd61b0f55a9..f157e4a3d34 100644 --- a/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md +++ b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md @@ -1,7 +1,7 @@ --- title: Install the Service Points feature description: Learn how to integrate the Service Points feature into your project -last_updated: Apr 14, 2023 +last_updated: May 02, 2023 template: feature-integration-guide-template --- From 05da82e3be25f459e769f7b572fab761f95e594e Mon Sep 17 00:00:00 2001 From: Dmitriy Aseev <dmiseev@gmail.com> Date: Tue, 2 May 2023 15:51:52 +0300 Subject: [PATCH 04/14] =?UTF-8?q?=D0=A1=D0=A1-26419:=20Adjusted=20Service?= =?UTF-8?q?=20Point=20IG=20with=20Search=20part.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../install-the-service-points-feature.md | 420 ++++++++++++++++-- 1 file changed, 382 insertions(+), 38 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index db0f11254fc..ed2a0b6fdfb 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -28,11 +28,47 @@ Make sure that the following modules have been installed: | ServicePoint | vendor/spryker/service-point | | ServicePointDataImport | vendor/spryker/service-point-data-import | | ServicePointsBackendApi | vendor/spryker/service-points-backend-api | +| ServicePointSearch | vendor/spryker/service-point-search | {% endinfo_block %} ## 2) Set up database schema and transfer objects +Adjust the schema definition so entity changes will trigger events. + +| AFFECTED ENTITY | TRIGGERED EVENTS | +|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------| +| spy_service_point | Entity.spy_service_point.create<br>Entity.spy_service_point.update<br>Entity.spy_service_point.delete | +| spy_service_point_address | Entity.spy_service_point_address.create<br>Entity.spy_service_point_address.update<br>Entity.spy_service_point_address.delete | +| spy_service_point_store | Entity.spy_service_point_store.create<br>Entity.spy_service_point_store.update<br>Entity.spy_service_point_store.delete | + +**src/Pyz/Zed/ServicePoint/Persistence/Propel/Schema/spy_service_point.schema.xml** + +```xml +<?xml version="1.0"?> +<database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="zed" xsi:noNamespaceSchemaLocation="http://static.spryker.com/schema-01.xsd" namespace="Orm\Zed\ServicePoint\Persistence" package="src.Orm.Zed.ServicePoint.Persistence"> + + <table name="spy_service_point"> + <behavior name="event"> + <parameter name="spy_service_point_all" column="*"/> + </behavior> + </table> + + <table name="spy_service_point_address"> + <behavior name="event"> + <parameter name="spy_service_point_address_all" column="*"/> + </behavior> + </table> + + <table name="spy_service_point_store"> + <behavior name="event"> + <parameter name="spy_service_point_store_all" column="*"/> + </behavior> + </table> + +</database> +``` + Apply database changes and generate transfer changes: ```bash @@ -51,6 +87,7 @@ Make sure that the following changes have been applied in the database: | spy_service_point | table | created | | spy_service_point_store | table | created | | spy_service_point_address | table | created | +| spy_service_point_search | table | created | | spy_region.uuid | column | created | {% endinfo_block %} @@ -59,14 +96,16 @@ Make sure that the following changes have been applied in the database: Make sure that propel entities have been generated successfully by checking their existence. Also, make generated entity classes extending respective Spryker core classes. -| CLASS NAMESPACE | EXTENDS | -|---------------------------------------------------------------|----------------------------------------------------------------------------------| -| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | +| CLASS NAMESPACE | EXTENDS | +|--------------------------------------------------------------------|---------------------------------------------------------------------------------------| +| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | +| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearch | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearch | +| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearchQuery | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearchQuery | {% endinfo_block %} @@ -74,36 +113,39 @@ Make sure that propel entities have been generated successfully by checking thei Make sure that the following changes have been applied in transfer objects: -| TRANSFER | TYPE | EVENT | PATH | -|---------------------------------------|-------|---------|------------------------------------------------------------------| -| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | -| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | -| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | -| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | -| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | -| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | -| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | -| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | -| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | -| Store | class | created | Generated/Shared/Transfer/Store | -| Error | class | created | Generated/Shared/Transfer/Error | -| Sort | class | created | Generated/Shared/Transfer/Sort | -| Pagination | class | created | Generated/Shared/Transfer/Pagination | -| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | -| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | -| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | -| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | -| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | -| Country | class | created | Generated/Shared/Transfer/Country | -| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | -| Region | class | created | Generated/Shared/Transfer/Region | -| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | -| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | -| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | -| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | -| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | -| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | -| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | +| TRANSFER | TYPE | EVENT | PATH | +|----------------------------------------|-------|---------|------------------------------------------------------------------| +| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | +| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | +| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | +| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | +| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | +| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | +| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | +| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | +| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | +| Store | class | created | Generated/Shared/Transfer/Store | +| Error | class | created | Generated/Shared/Transfer/Error | +| Sort | class | created | Generated/Shared/Transfer/Sort | +| Pagination | class | created | Generated/Shared/Transfer/Pagination | +| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | +| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | +| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | +| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | +| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | +| Country | class | created | Generated/Shared/Transfer/Country | +| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | +| Region | class | created | Generated/Shared/Transfer/Region | +| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | +| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | +| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | +| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | +| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | +| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | +| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | +| ServicePointSearchCollection | class | created | Generated/Shared/Transfer/ServicePointSearchCollection | +| ServicePointSearch | class | created | Generated/Shared/Transfer/ServicePointSearch | +| ServicePointSearchRequest | class | created | Generated/Shared/Transfer/ServicePointSearchRequest | {% endinfo_block %} @@ -332,6 +374,308 @@ service_point.validation.service_point_uuid_is_not_unique,Ein Service Point mit console data:import glossary ``` +### 5) Configure export to Elasticsearch + +Adjust Elasicsearch config at SearchElasticsearchConfig: + +**src/Pyz/Shared/SearchElasticsearch/SearchElasticsearchConfig.php** + +```php +<?php + +namespace Pyz\Shared\SearchElasticsearch; + +use Spryker\Shared\SearchElasticsearch\SearchElasticsearchConfig as SprykerSearchElasticsearchConfig; + +class SearchElasticsearchConfig extends SprykerSearchElasticsearchConfig +{ + protected const SUPPORTED_SOURCE_IDENTIFIERS = [ + 'service_point', + ]; +} +``` + +To set up a new source for Service Points, execute the following command: + +```bash +console search:setup:source-map +``` + + +Adjust `RabbitMq` module configuration in `src/Pyz/Client/RabbitMq/RabbitMqConfig.php`: + +**src/Pyz/Client/RabbitMq/RabbitMqConfig.php** + +```php +<?php + +namespace Pyz\Client\RabbitMq; + +use Spryker\Client\RabbitMq\RabbitMqConfig as SprykerRabbitMqConfig; +use Spryker\Shared\ServicePointSearch\ServicePointSearchConfig; + +class RabbitMqConfig extends SprykerRabbitMqConfig +{ + /** + * @return array<mixed> + */ + protected function getQueueConfiguration(): array + { + return [ + ServicePointSearchConfig::QUEUE_NAME_SYNC_SEARCH_SERVICE_POINT, + ]; + } +} +``` + +Register new queue message processor: + +**src/Pyz/Zed/Queue/QueueDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Queue; + +use Spryker\Shared\ServicePointSearch\ServicePointSearchConfig; +use Spryker\Zed\Kernel\Container; +use Spryker\Zed\Queue\QueueDependencyProvider as SprykerDependencyProvider; +use Spryker\Zed\Synchronization\Communication\Plugin\Queue\SynchronizationSearchQueueMessageProcessorPlugin; + +class QueueDependencyProvider extends SprykerDependencyProvider +{ + /** + * @param \Spryker\Zed\Kernel\Container $container + * + * @return array<\Spryker\Zed\Queue\Dependency\Plugin\QueueMessageProcessorPluginInterface> + */ + protected function getProcessorMessagePlugins(Container $container): array + { + return [ + ServicePointSearchConfig::QUEUE_NAME_SYNC_SEARCH_SERVICE_POINT => new SynchronizationSearchQueueMessageProcessorPlugin(), + ]; + } +} +``` + +Configure synchronization pool + +**src/Pyz/Zed/ServicePointSearch/ServicePointSearchConfig.php** + +```php +<?php + +namespace Pyz\Zed\ServicePointSearch; + +use Pyz\Zed\Synchronization\SynchronizationConfig; +use Spryker\Zed\ServicePointSearch\ServicePointSearchConfig as SprykerServicePointSearchConfig; + +class ServicePointSearchConfig extends SprykerServicePointSearchConfig +{ + /** + * @return string|null + */ + public function getServicePointSearchSynchronizationPoolName(): ?string + { + return SynchronizationConfig::DEFAULT_SYNCHRONIZATION_POOL_NAME; + } +} +``` + +#### Set up re-generate and re-sync features + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------------------------|------------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------------------| +| ServicePointSynchronizationDataBulkRepositoryPlugin | Allows synchronizing the service point search table content into Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Synchronization | +| ServicePointPublisherTriggerPlugin | Allows to populate service point search table with data and trigger further export to Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher | + +**src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Synchronization; + +use Spryker\Zed\ServicePointSearch\Communication\Plugin\Synchronization\ServicePointSynchronizationDataBulkRepositoryPlugin; +use Spryker\Zed\Synchronization\SynchronizationDependencyProvider as SprykerSynchronizationDependencyProvider; + +class SynchronizationDependencyProvider extends SprykerSynchronizationDependencyProvider +{ + /** + * @return array<\Spryker\Zed\SynchronizationExtension\Dependency\Plugin\SynchronizationDataPluginInterface> + */ + protected function getSynchronizationDataPlugins(): array + { + return [ + new ServicePointSynchronizationDataBulkRepositoryPlugin(), + ]; + } +} +``` + +**src/Pyz/Zed/Publisher/PublisherDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Publisher; + +use Spryker\Zed\Publisher\PublisherDependencyProvider as SprykerPublisherDependencyProvider; +use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointPublisherTriggerPlugin; + +class PublisherDependencyProvider extends SprykerPublisherDependencyProvider +{ + /** + * @return array<\Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherTriggerPluginInterface> + */ + protected function getPublisherTriggerPlugins(): array + { + return [ + new ServicePointPublisherTriggerPlugin(), + ]; + } +} +``` + +#### Register publisher plugins + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------|-----------------------------------------------------|---------------|----------------------------------------------------------------------------| +| ServicePointWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | +| ServicePointDeletePublisherPlugin | Listens for events and unpublishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | + +**src/Pyz/Zed/Publisher/PublisherDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Publisher; + +use Spryker\Zed\Publisher\PublisherDependencyProvider as SprykerPublisherDependencyProvider; +use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint\ServicePointDeletePublisherPlugin; +use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint\ServicePointWritePublisherPlugin; + +class PublisherDependencyProvider extends SprykerPublisherDependencyProvider +{ + /** + * @return array<\Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherPluginInterface> + */ + protected function getPublisherPlugins(): array + { + return [ + new ServicePointWritePublisherPlugin(), + new ServicePointDeletePublisherPlugin(), + ]; + } +} +``` + +#### Register query expander and result formatter plugins + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|------------------------------------------------|-----------------------------------------------|---------------|------------------------------------------------------------------------| +| ServicePointSearchResultFormatterPlugin | Maps raw Elasticsearch results to a transfer. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\ResultFormatter | +| SortedServicePointSearchQueryExpanderPlugin | Adds sorting to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | +| PaginatedServicePointSearchQueryExpanderPlugin | Adds pagination to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | +| StoreServicePointSearchQueryExpanderPlugin | Adds filtering by locale to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | + +**src/Pyz/Client/ServicePointSearch/ServicePointSearchDependencyProvider.php** + +```php +<?php + +namespace Pyz\Client\ServicePointSearch; + +use Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query\PaginatedServicePointSearchQueryExpanderPlugin; +use Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query\SortedServicePointSearchQueryExpanderPlugin; +use Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query\StoreServicePointSearchQueryExpanderPlugin; +use Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\ResultFormatter\ServicePointSearchResultFormatterPlugin; +use Spryker\Client\ServicePointSearch\ServicePointSearchDependencyProvider as SprykerServicePointSearchDependencyProvider; + +class ServicePointSearchDependencyProvider extends SprykerServicePointSearchDependencyProvider +{ + /** + * @return list<\Spryker\Client\SearchExtension\Dependency\Plugin\ResultFormatterPluginInterface> + */ + protected function getServicePointSearchResultFormatterPlugins(): array + { + return [ + new ServicePointSearchResultFormatterPlugin(), + ]; + } + + /** + * @return list<\Spryker\Client\SearchExtension\Dependency\Plugin\QueryExpanderPluginInterface> + */ + protected function getServicePointSearchQueryExpanderPlugins(): array + { + return [ + new StoreServicePointSearchQueryExpanderPlugin(), + new SortedServicePointSearchQueryExpanderPlugin(), + new PaginatedServicePointSearchQueryExpanderPlugin(), + ]; + } +} +``` + +{% info_block warningBox "Verification" %} + +1. Fill the `spy_service_point` table with some data and run `console publish:trigger-events -r service_point` command. + Make sure that the `spy_service_point_search` table is filled with respective data per store. Check Elasticsearch documents, make sure you are able to see data in the following format: + +```yaml +{ + "store":"DE", + "type":"service_point", + "search-result-data":{ + "idServicePoint":123, + "uuid":"40320bdf-c2af-4dd8-8d09-4550ece4287d", + "name":"Service Point Name #1", + "key":"service-point-name-1", + "address":{ + "idServicePointAddress":44, + "uuid":"2f02b327-0165-46ea-88df-0190d9a1c242", + "address1":"Seeburger Str.", + "address2":"270", + "address3":"Block B", + "city":"Berlin", + "zipCode":"10115", + "country":{ + "iso2Code":"DE", + "name":"Germany" + }, + "region":{ + "name":"Saxony" + } + } + }, + "full-text-boosted":[ + "Service Point Name #1" + ], + "full-text":[ + "Service Point Name #1", + "Seeburger Str. 270 Block B", + "Berlin", + "10115", + "Germany", + "Saxony" + ], + "suggestion-terms":[ + "Service Point Name #1" + ], + "completion-terms":[ + "Service Point Name #1" + ], + "string-sort":{ + "city":"Berlin" + } +} +``` + +2. Change some record at the `spy_service_point_search` table and run `console sync:data service_point`. Make sure that your changes were synced to the respective Elasticsearch document. + +{% endinfo_block %} + ### 6) Set up behavior 1. To enable the Backend API, register the plugins: From f9c476486eea3d7d63262de240c555435fb76db9 Mon Sep 17 00:00:00 2001 From: Dmitriy Aseev <dmiseev@gmail.com> Date: Thu, 4 May 2023 17:14:11 +0300 Subject: [PATCH 05/14] =?UTF-8?q?=D0=A1=D0=A1-26419:=20Added=20new=20publi?= =?UTF-8?q?sher=20plugins.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../202304.0/install-the-service-points-feature.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index ed2a0b6fdfb..bc49f456ab1 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -539,10 +539,12 @@ class PublisherDependencyProvider extends SprykerPublisherDependencyProvider #### Register publisher plugins -| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | -|-----------------------------------|-----------------------------------------------------|---------------|----------------------------------------------------------------------------| -| ServicePointWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | -| ServicePointDeletePublisherPlugin | Listens for events and unpublishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------------|-----------------------------------------------------|---------------|-----------------------------------------------------------------------------------| +| ServicePointWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | +| ServicePointDeletePublisherPlugin | Listens for events and unpublishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | +| ServicePointAddressWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointAddress | +| ServicePointStoreWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointStore | **src/Pyz/Zed/Publisher/PublisherDependencyProvider.php** @@ -554,6 +556,8 @@ namespace Pyz\Zed\Publisher; use Spryker\Zed\Publisher\PublisherDependencyProvider as SprykerPublisherDependencyProvider; use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint\ServicePointDeletePublisherPlugin; use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint\ServicePointWritePublisherPlugin; +use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointAddress\ServicePointAddressWritePublisherPlugin; +use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointStore\ServicePointStoreWritePublisherPlugin; class PublisherDependencyProvider extends SprykerPublisherDependencyProvider { @@ -565,6 +569,8 @@ class PublisherDependencyProvider extends SprykerPublisherDependencyProvider return [ new ServicePointWritePublisherPlugin(), new ServicePointDeletePublisherPlugin(), + new ServicePointAddressWritePublisherPlugin(), + new ServicePointStoreWritePublisherPlugin(), ]; } } From bf37c12b9a1ae1945e3fe1f84981503836b03f59 Mon Sep 17 00:00:00 2001 From: Michael Knappe <michael.knappe@spryker.com> Date: Tue, 9 May 2023 11:50:59 +0200 Subject: [PATCH 06/14] CC-25214: IG Service as a part of a Service Point concept --- .../install-the-service-points-feature.md | 165 ++++++++++++++---- .../install-the-service-points-feature.md | 2 +- 2 files changed, 132 insertions(+), 35 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index db0f11254fc..b3bd9406b62 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -49,8 +49,10 @@ Make sure that the following changes have been applied in the database: | DATABASE ENTITY | TYPE | EVENT | |---------------------------|--------|---------| | spy_service_point | table | created | -| spy_service_point_store | table | created | | spy_service_point_address | table | created | +| spy_service_point_service | table | created | +| spy_service_point_store | table | created | +| spy_service_type | table | created | | spy_region.uuid | column | created | {% endinfo_block %} @@ -62,11 +64,16 @@ Make sure that propel entities have been generated successfully by checking thei | CLASS NAMESPACE | EXTENDS | |---------------------------------------------------------------|----------------------------------------------------------------------------------| | \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | | \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointService | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointService | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointServiceQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointServiceQuery | | \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | | \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | | \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServiceType | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceType | +| \Orm\Zed\ServicePoint\Persistence\SpyServiceTypeQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceTypeQuery | {% endinfo_block %} @@ -74,36 +81,48 @@ Make sure that propel entities have been generated successfully by checking thei Make sure that the following changes have been applied in transfer objects: -| TRANSFER | TYPE | EVENT | PATH | -|---------------------------------------|-------|---------|------------------------------------------------------------------| -| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | -| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | -| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | -| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | -| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | -| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | -| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | -| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | -| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | -| Store | class | created | Generated/Shared/Transfer/Store | -| Error | class | created | Generated/Shared/Transfer/Error | -| Sort | class | created | Generated/Shared/Transfer/Sort | -| Pagination | class | created | Generated/Shared/Transfer/Pagination | -| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | -| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | -| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | -| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | -| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | -| Country | class | created | Generated/Shared/Transfer/Country | -| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | -| Region | class | created | Generated/Shared/Transfer/Region | -| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | -| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | -| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | -| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | -| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | -| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | -| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | +| TRANSFER | TYPE | EVENT | PATH | +|-----------------------------------------------|-------|---------|-------------------------------------------------------------------------| +| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | +| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | +| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | +| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | +| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | +| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | +| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | +| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | +| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | +| Store | class | created | Generated/Shared/Transfer/Store | +| Error | class | created | Generated/Shared/Transfer/Error | +| Sort | class | created | Generated/Shared/Transfer/Sort | +| Pagination | class | created | Generated/Shared/Transfer/Pagination | +| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | +| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | +| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | +| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | +| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | +| Country | class | created | Generated/Shared/Transfer/Country | +| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | +| Region | class | created | Generated/Shared/Transfer/Region | +| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | +| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | +| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | +| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | +| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | +| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | +| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | +| ServicePointServiceCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionRequestTransfer | +| ServicePointServiceCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionResponseTransfer | +| ServicePointServiceCollectionTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionTransfer | +| ServicePointServiceConditionsTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceConditionsTransfer | +| ServicePointServiceCriteriaTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCriteriaTransfer | +| ServicePointServiceTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceTransfer | +| ServiceTypeCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionRequestTransfer | +| ServiceTypeCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionResponseTransfer | +| ServiceTypeCollectionTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionTransfer | +| ServiceTypeConditionsTransfer | class | created | Generated/Shared/Transfer/ServiceTypeConditionsTransfer | +| ServiceTypeCriteriaTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCriteriaTransfer | +| ServiceTypeTransfer | class | created | Generated/Shared/Transfer/ServiceTypeTransfer | {% endinfo_block %} @@ -187,6 +206,34 @@ sp2,,DE,Julie-Wolfthorn-Straße,1,,Berlin,10115 | city | mandatory | string | Berlin | City | | zip_code | mandatory | string | 10115 | Zip code | + +**data/import/common/common/service_type.csv** + +```csv +name,key +Pickup,pickup +``` + +| COLUMN | REQUIRED? | DATA TYPE | DATA EXAMPLE | DATA EXPLANATION | +|--------|-----------|-----------|--------------|-----------------------------------| +| name | mandatory | string | Pickup | Unique key of the service type. | +| key | mandatory | string | pickup | Unique name of the service type. | + +**data/import/common/common/service_point_service.csv** + +```csv +key,service_point_key,service_type_key,is_active +sps1,sp1,pickup,1 +sps2,sp2,pickup,1 +``` + +| COLUMN | REQUIRED? | DATA TYPE | DATA EXAMPLE | DATA EXPLANATION | +|-------------------|-----------|-----------|-------------------|-------------------------------------------------| +| key | mandatory | string | sps1 | Unique key of the service point service. | +| service_point_key | mandatory | string | sp1 | Unique key of the service point. | +| service_type_key | mandatory | string | pickup | Unique key of the service type. | +| is_active | mandatory | bool | 0 | Defines if the service point service is active. | + 2. Enable data imports at your configuration file, e.g.: **data/import/local/full_EU.yml** @@ -198,6 +245,10 @@ sp2,,DE,Julie-Wolfthorn-Straße,1,,Berlin,10115 source: data/import/common/{{store}}/service_point_store.csv - data_entity: service-point-address source: data/import/common/common/service_point_address.csv + - data_entity: service-type + source: data/import/common/common/service_type.csv + - data_entity: service-point-service + source: data/import/common/common/service_point_service.csv ``` 3. Register the following data import plugins: @@ -207,6 +258,8 @@ sp2,,DE,Julie-Wolfthorn-Straße,1,,Berlin,10115 | ServicePointDataImportPlugin | Imports service points data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | | ServicePointStoreDataImportPlugin | Imports service point store relations data into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | | ServicePointAddressDataImportPlugin | Imports service point addresses into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | +| ServiceTypeDataImportPlugin | Imports service types into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | +| ServicePointServiceDataImportPlugin | Imports service point services into the database. | None | \Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport | **src/Pyz/Zed/DataImport/DataImportDependencyProvider.php** @@ -231,6 +284,8 @@ class DataImportDependencyProvider extends SprykerDataImportDependencyProvider new ServicePointDataImportPlugin(), new ServicePointStoreDataImportPlugin(), new ServicePointAddressDataImportPlugin(), + new ServiceTypeDataImportPlugin(), + new ServicePointServiceDataImportPlugin(), ]; } } @@ -264,6 +319,8 @@ class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT), new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT_STORE), new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT_ADDRESS), + new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_TYPE), + new DataImportConsole(DataImportConsole::DEFAULT_NAME . static::COMMAND_SEPARATOR . ServicePointDataImportConfig::IMPORT_TYPE_SERVICE_POINT_SERVICE), ]; return $commands; @@ -275,13 +332,21 @@ class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider ```bash console data:import service-point -console data:import service-point-store console data:import service-point-address +console data:import:service-point-service +console data:import service-point-store +console data:import:service-type ``` {% info_block warningBox “Verification” %} -Make sure that entities were imported to `spy_service_point`, `spy_service_point_store` and `spy_service_point_address` database tables respectively. +Make sure that entities were imported to the following database tables respectively: + + - `spy_service_point` + - `spy_service_point_store` + - `spy_service_point_address` + - `spy_service_type` + - `spy_service_point_service` {% endinfo_block %} @@ -324,6 +389,38 @@ service_point.validation.service_point_address_already_exists,A service point ad service_point.validation.service_point_address_already_exists,Es existiert bereits eine Service Point Adresse für den Service Point.,de_DE service_point.validation.service_point_uuid_is_not_unique,A service point with the same uuid already exists in request.,en_US service_point.validation.service_point_uuid_is_not_unique,Ein Service Point mit der gleichen uuid existiert bereits in der Anfrage.,de_DE +service_point.validation.service_type_key_exists,A service type with the same key already exists.,en_US +service_point.validation.service_type_key_exists,Ein Service-Typ mit demselben Schlüssel existiert bereits.,de_DE +service_point.validation.service_type_key_wrong_length,A service type key must have length from %min% to %max% characters.,en_US +service_point.validation.service_type_key_wrong_length,Ein Service-Typ-Schlüssel muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_type_key_is_not_unique,A service type with the same key already exists in request.,en_US +service_point.validation.service_type_key_is_not_unique,Ein Service-Typ mit demselben Schlüssel existiert bereits in der Anfrage.,de_DE +service_point.validation.service_type_name_exists,A service type with the same name already exists.,en_US +service_point.validation.service_type_name_exists,Ein Service-Typ mit demselben Namen existiert bereits.,de_DE +service_point.validation.service_type_name_wrong_length,A service type name must have length from %min% to %max% characters.,en_US +service_point.validation.service_type_name_wrong_length,Ein Service-Typ-Name muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_type_name_is_not_unique,A service type with the same name already exists in request.,en_US +service_point.validation.service_type_name_is_not_unique,Ein Service-Typ mit demselben Namen existiert bereits in der Anfrage.,de_DE +service_point.validation.service_type_entity_not_found,The service type entity was not found.,en_US +service_point.validation.service_type_entity_not_found,Die Service-Typ-Entität wurde nicht gefunden.,de_DE +service_point.validation.service_poinst_service_key_exists,A service point service with the same key already exists.,en_US +service_point.validation.service_poinst_service_key_exists,Ein Servicepunkt-Service mit demselben Schlüssel existiert bereits.,de_DE +service_point.validation.service_point_service_key_wrong_length,A service point service key must have length from %min% to %max% characters.,en_US +service_point.validation.service_point_service_key_wrong_length,Ein Servicepunkt-Service-Schlüssel muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +service_point.validation.service_point_service_key_is_not_unique,A service point service with the same key already exists in request.,en_US +service_point.validation.service_point_service_key_is_not_unique,Ein Servicepunkt-Service mit demselben Schlüssel existiert bereits in der Anfrage.,de_DE +service_point.validation.service_point_service_type_relation_already_exists,A service point service with defined relation of service point and service type already exists.,en_US +service_point.validation.service_point_service_type_relation_already_exists,Ein Servicepunkt-Service mit einer definierten Beziehung von Servicepunkt und Service-Typ existiert bereits.,de_DE +service_point.validation.service_point_service_type_relation_is_not_unique,A service point service with defined relation of service pint and service type already exists in request.,en_US +service_point.validation.service_point_service_type_relation_is_not_unique,Ein Servicepunkt-Service mit definierter Beziehung von Servicepunkt und Service-Typ existiert bereits in der Anfrage.,de_DE +service_point.validation.service_point_service_entity_not_found,The service point service entity was not found.,en_US +service_point.validation.service_point_service_entity_not_found,Die Servicepunkt-Service-Entität wurde nicht gefunden.,de_DE +service_point.validation.service_point_service_key_immutability,The service point service key is immutable.,en_US +service_point.validation.service_point_service_key_immutability,Der Servicepunkt-Service-Schlüssel ist unveränderlich.,de_DE +service_point.validation.service_type_key_immutability,The service type key is immutable.,en_US +service_point.validation.service_type_key_immutability,Der Service-Typ-Schlüssel ist unveränderlich.,de_DE +service_point.validation.service_point_service_key_exists,A service point service with the same key already exists.,en_US +service_point.validation.service_point_service_key_exists,Ein Servicepunkt-Service mit demselben Schlüssel existiert bereits.,de_DE ``` 2. Import data: diff --git a/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md index f157e4a3d34..45536080b38 100644 --- a/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md +++ b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md @@ -1,7 +1,7 @@ --- title: Install the Service Points feature description: Learn how to integrate the Service Points feature into your project -last_updated: May 02, 2023 +last_updated: May 09, 2023 template: feature-integration-guide-template --- From fdc0e2e93dee52a76e86604c8b8d457c416b763c Mon Sep 17 00:00:00 2001 From: Vadym Sachenko <vadym.sachenko@spryker.com> Date: Wed, 10 May 2023 09:46:09 +0300 Subject: [PATCH 07/14] service points feature review --- .../install-the-service-points-feature.md | 163 +++++++++--------- .../install-the-service-points-feature.md | 2 +- 2 files changed, 83 insertions(+), 82 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index bc49f456ab1..f0dcf2e0074 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -1,3 +1,6 @@ + + + This document describes how to integrate the Service Points feature into a Spryker project. ## Install feature core @@ -7,7 +10,7 @@ To start feature integration, integrate the required features: ### Prerequisites -To start feature integration, overview and install the necessary features: +To start feature integration, integrate the required features: | NAME | VERSION | INTEGRATION GUIDE | |--------------|------------------|--------------------------------------------------------------------------------------------------------------------------------------| @@ -34,7 +37,7 @@ Make sure that the following modules have been installed: ## 2) Set up database schema and transfer objects -Adjust the schema definition so entity changes will trigger events. +1. Adjust the schema definition so entity changes trigger events. | AFFECTED ENTITY | TRIGGERED EVENTS | |-------------------------------|-------------------------------------------------------------------------------------------------------------------------------| @@ -69,7 +72,7 @@ Adjust the schema definition so entity changes will trigger events. </database> ``` -Apply database changes and generate transfer changes: +2. Apply database changes and generate transfer changes: ```bash console transfer:generate @@ -90,10 +93,6 @@ Make sure that the following changes have been applied in the database: | spy_service_point_search | table | created | | spy_region.uuid | column | created | -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - Make sure that propel entities have been generated successfully by checking their existence. Also, make generated entity classes extending respective Spryker core classes. | CLASS NAMESPACE | EXTENDS | @@ -107,10 +106,6 @@ Make sure that propel entities have been generated successfully by checking thei | \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearch | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearch | | \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearchQuery | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearchQuery | -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - Make sure that the following changes have been applied in transfer objects: | TRANSFER | TYPE | EVENT | PATH | @@ -151,7 +146,7 @@ Make sure that the following changes have been applied in transfer objects: ### 3) Set up configuration -1. To make the `service-points` and `service-point-addresses` resources protected, adjust the protected paths configuration: +To make the `service-points` and `service-point-addresses` resources protected, adjust the protected paths configuration: **src/Pyz/Shared/GlueBackendApiApplicationAuthorizationConnector/GlueBackendApiApplicationAuthorizationConnectorConfig.php** @@ -229,7 +224,7 @@ sp2,,DE,Julie-Wolfthorn-Straße,1,,Berlin,10115 | city | mandatory | string | Berlin | City | | zip_code | mandatory | string | 10115 | Zip code | -2. Enable data imports at your configuration file, e.g.: +2. Enable data imports at your configuration file—for example: **data/import/local/full_EU.yml** @@ -376,7 +371,7 @@ console data:import glossary ### 5) Configure export to Elasticsearch -Adjust Elasicsearch config at SearchElasticsearchConfig: +1. In `SearchElasticsearchConfig`, adjust Elasicsearch config: **src/Pyz/Shared/SearchElasticsearch/SearchElasticsearchConfig.php** @@ -395,14 +390,14 @@ class SearchElasticsearchConfig extends SprykerSearchElasticsearchConfig } ``` -To set up a new source for Service Points, execute the following command: +2. Set up a new source for Service Points: ```bash console search:setup:source-map ``` -Adjust `RabbitMq` module configuration in `src/Pyz/Client/RabbitMq/RabbitMqConfig.php`: +3. In `src/Pyz/Client/RabbitMq/RabbitMqConfig.php`, adjust the `RabbitMq` module's configuration: **src/Pyz/Client/RabbitMq/RabbitMqConfig.php** @@ -428,7 +423,7 @@ class RabbitMqConfig extends SprykerRabbitMqConfig } ``` -Register new queue message processor: +4. Register the new queue message processor: **src/Pyz/Zed/Queue/QueueDependencyProvider.php** @@ -458,7 +453,7 @@ class QueueDependencyProvider extends SprykerDependencyProvider } ``` -Configure synchronization pool +5. Configure the synchronization pool: **src/Pyz/Zed/ServicePointSearch/ServicePointSearchConfig.php** @@ -482,12 +477,12 @@ class ServicePointSearchConfig extends SprykerServicePointSearchConfig } ``` -#### Set up re-generate and re-sync features +#### Set up regenerate and resync features | PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | |-----------------------------------------------------|------------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------------------| | ServicePointSynchronizationDataBulkRepositoryPlugin | Allows synchronizing the service point search table content into Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Synchronization | -| ServicePointPublisherTriggerPlugin | Allows to populate service point search table with data and trigger further export to Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher | +| ServicePointPublisherTriggerPlugin | Allows populating service point search table with data and triggering further export to Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher | **src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** @@ -626,8 +621,9 @@ class ServicePointSearchDependencyProvider extends SprykerServicePointSearchDepe {% info_block warningBox "Verification" %} -1. Fill the `spy_service_point` table with some data and run `console publish:trigger-events -r service_point` command. - Make sure that the `spy_service_point_search` table is filled with respective data per store. Check Elasticsearch documents, make sure you are able to see data in the following format: +1. Fill the `spy_service_point` table with some data and run `console publish:trigger-events -r service_point`. +2. Make sure that the `spy_service_point_search` table is filled with respective data per store. +3. Check Elasticearch documents and make sure data is structured in the following format: ```yaml { @@ -678,7 +674,8 @@ class ServicePointSearchDependencyProvider extends SprykerServicePointSearchDepe } ``` -2. Change some record at the `spy_service_point_search` table and run `console sync:data service_point`. Make sure that your changes were synced to the respective Elasticsearch document. +4. In the `spy_service_point_search` table, change some records and run `console sync:data service_point`. +5. Make sure that your changes have been synced to the respective Elasticsearch document. {% endinfo_block %} @@ -759,67 +756,71 @@ class GlueBackendApiApplicationGlueJsonApiConventionConnectorDependencyProvider {% info_block warningBox "Verification" %} -1. Make sure that you can send the following requests: - - * `POST https://glue-backend.mysprykershop.com/service-points` - ```json - { - "data": { - "type": "service-points", - "attributes": { - "name": "Some Service Point", - "key": "ssp", - "isActive": "true", - "stores": ["DE", "AT"] - } - } - } - ``` - * `PATCH https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}` - ```json - { - "data": { - "type": "service-points", - "attributes": { - "name": "Another Name" - } +Make sure that you can send the following requests: + +* `POST https://glue-backend.mysprykershop.com/service-points` + ```json + { + "data": { + "type": "service-points", + "attributes": { + "name": "Some Service Point", + "key": "ssp", + "isActive": "true", + "stores": ["DE", "AT"] } } - ``` - * `GET https://glue-backend.mysprykershop.com/service-points/` - * `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}` - * `POST https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` - ```json - { - "data": { - "type": "service-point-address", - "attributes": { - "address1": "address1", - "address2": "address2", - "address3": "address3", - "city": "city", - "zipCode": "10115", - "countryIso2Code": "DE" - } + } + ``` + +* `PATCH https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}` + ```json + { + "data": { + "type": "service-points", + "attributes": { + "name": "Another Name" } } - ``` - * `PATCH https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses/{{service-point-address-uuid}}` - ```json - { - "data": { - "type": "service-point-address", - "attributes": { - "address1": "another address1", - "address2": "another address2", - "address3": "another address3", - "city": "another city", - "zipCode": "20115", - "countryIso2Code": "AT" - } - } - } - ``` - * `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` + } + ``` + +* `GET https://glue-backend.mysprykershop.com/service-points/` +* `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}` +* `POST https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` + ```json + { + "data": { + "type": "service-point-address", + "attributes": { + "address1": "address1", + "address2": "address2", + "address3": "address3", + "city": "city", + "zipCode": "10115", + "countryIso2Code": "DE" + } + } + } + ``` + +* `PATCH https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses/{{service-point-address-uuid}}` + ```json + { + "data": { + "type": "service-point-address", + "attributes": { + "address1": "another address1", + "address2": "another address2", + "address3": "another address3", + "city": "another city", + "zipCode": "20115", + "countryIso2Code": "AT" + } + } + } + ``` + +* `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` {% endinfo_block %} diff --git a/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md index f157e4a3d34..5305e7876ac 100644 --- a/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md +++ b/docs/scos/dev/feature-integration-guides/202304.0/install-the-service-points-feature.md @@ -1,7 +1,7 @@ --- title: Install the Service Points feature description: Learn how to integrate the Service Points feature into your project -last_updated: May 02, 2023 +last_updated: May 10, 2023 template: feature-integration-guide-template --- From ed4c54c51c3cc7207f99fefa6ddb2be68a9f830a Mon Sep 17 00:00:00 2001 From: Vadym Sachenko <vadym.sachenko@spryker.com> Date: Wed, 10 May 2023 10:01:26 +0300 Subject: [PATCH 08/14] Update Rakefile --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 467fd8e81ac..d0484191a51 100644 --- a/Rakefile +++ b/Rakefile @@ -49,7 +49,8 @@ commonOptions = { /www.acunetix.com\/[\.\w\-\/\?]+/, /gcc.gnu.org\/[\.\w\-\/\?]+/, /github.com\/[\.\w\-\/\?]+/, - /www.collect.ai\/[\.\w\-\/\?]+/ + /www.collect.ai\/[\.\w\-\/\?]+/, + /twitter.com\/[\.\w\-\/\?]+/ ], :file_ignore => [], From d5fad53fca844d5dfc10a89a86e5a99692ed073a Mon Sep 17 00:00:00 2001 From: Vadym Sachenko <vadym.sachenko@spryker.com> Date: Wed, 10 May 2023 10:18:08 +0300 Subject: [PATCH 09/14] Update Rakefile --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index d0484191a51..2b882542453 100644 --- a/Rakefile +++ b/Rakefile @@ -50,7 +50,8 @@ commonOptions = { /gcc.gnu.org\/[\.\w\-\/\?]+/, /github.com\/[\.\w\-\/\?]+/, /www.collect.ai\/[\.\w\-\/\?]+/, - /twitter.com\/[\.\w\-\/\?]+/ + /twitter.com\/[\.\w\-\/\?]+/, + /www.blackfire.io\/[\.\w\-\/\?]+/ ], :file_ignore => [], From 37e2368315e3b5377d22228da2a26ffe8c8dab9c Mon Sep 17 00:00:00 2001 From: Michael Knappe <michael.knappe@spryker.com> Date: Wed, 10 May 2023 10:31:37 +0200 Subject: [PATCH 10/14] CC-25214: IG Service as a part of a Service Point concept --- .../install-the-service-points-feature.md | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index 2a6d45ef2d4..8de31bfc63a 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -94,21 +94,21 @@ Make sure that the following changes have been applied in the database: Make sure that propel entities have been generated successfully by checking their existence. Also, make generated entity classes extending respective Spryker core classes. -| CLASS NAMESPACE | EXTENDS | -|--------------------------------------------------------------------|----------------------------------------------------------------------------------| -| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointService | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointService | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointServiceQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointServiceQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServiceType | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceType | -| \Orm\Zed\ServicePoint\Persistence\SpyServiceTypeQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceTypeQuery | -| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearch | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearch | -| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearchQuery | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearchQuery | +| CLASS NAMESPACE | EXTENDS | +|--------------------------------------------------------------------|----------------------------------------------------------------------------------------| +| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointService | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointService | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointServiceQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointServiceQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServiceType | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceType | +| \Orm\Zed\ServicePoint\Persistence\SpyServiceTypeQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceTypeQuery | +| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearch | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearch | +| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearchQuery | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearchQuery | {% endinfo_block %} @@ -116,39 +116,39 @@ Make sure that propel entities have been generated successfully by checking thei Make sure that the following changes have been applied in transfer objects: -| TRANSFER | TYPE | EVENT | PATH | -|-----------------------------------------------|-------|---------|------------------------------------------------------------------| -| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | -| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | -| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | -| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | -| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | -| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | -| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | -| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | -| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | -| Store | class | created | Generated/Shared/Transfer/Store | -| Error | class | created | Generated/Shared/Transfer/Error | -| Sort | class | created | Generated/Shared/Transfer/Sort | -| Pagination | class | created | Generated/Shared/Transfer/Pagination | -| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | -| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | -| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | -| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | -| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | -| Country | class | created | Generated/Shared/Transfer/Country | -| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | -| Region | class | created | Generated/Shared/Transfer/Region | -| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | -| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | -| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | -| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | -| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | -| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | -| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | -| ServicePointSearchCollection | class | created | Generated/Shared/Transfer/ServicePointSearchCollection | -| ServicePointSearch | class | created | Generated/Shared/Transfer/ServicePointSearch | -| ServicePointSearchRequest | class | created | Generated/Shared/Transfer/ServicePointSearchRequest | +| TRANSFER | TYPE | EVENT | PATH | +|-----------------------------------------------|-------|---------|-------------------------------------------------------------------------| +| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | +| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | +| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | +| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | +| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | +| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | +| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | +| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | +| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | +| Store | class | created | Generated/Shared/Transfer/Store | +| Error | class | created | Generated/Shared/Transfer/Error | +| Sort | class | created | Generated/Shared/Transfer/Sort | +| Pagination | class | created | Generated/Shared/Transfer/Pagination | +| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | +| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | +| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | +| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | +| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | +| Country | class | created | Generated/Shared/Transfer/Country | +| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | +| Region | class | created | Generated/Shared/Transfer/Region | +| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | +| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | +| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | +| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | +| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | +| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | +| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | +| ServicePointSearchCollection | class | created | Generated/Shared/Transfer/ServicePointSearchCollection | +| ServicePointSearch | class | created | Generated/Shared/Transfer/ServicePointSearch | +| ServicePointSearchRequest | class | created | Generated/Shared/Transfer/ServicePointSearchRequest | | ServicePointServiceCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionRequestTransfer | | ServicePointServiceCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionResponseTransfer | | ServicePointServiceCollectionTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionTransfer | @@ -577,9 +577,9 @@ class ServicePointSearchConfig extends SprykerServicePointSearchConfig #### Set up regenerate and resync features -| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | -|-----------------------------------------------------|------------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------------------| -| ServicePointSynchronizationDataBulkRepositoryPlugin | Allows synchronizing the service point search table content into Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Synchronization | +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------------------| +| ServicePointSynchronizationDataBulkRepositoryPlugin | Allows synchronizing the service point search table content into Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Synchronization | | ServicePointPublisherTriggerPlugin | Allows populating service point search table with data and triggering further export to Elasticsearch. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher | **src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** From 86e505dd7b4b39a2567025d57761f137b2fa2344 Mon Sep 17 00:00:00 2001 From: Michael Knappe <michael.knappe@spryker.com> Date: Wed, 10 May 2023 10:32:33 +0200 Subject: [PATCH 11/14] CC-25214: IG Service as a part of a Service Point concept --- .../install-the-service-points-feature.md | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index 8de31bfc63a..bca390af92d 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -116,51 +116,51 @@ Make sure that propel entities have been generated successfully by checking thei Make sure that the following changes have been applied in transfer objects: -| TRANSFER | TYPE | EVENT | PATH | -|-----------------------------------------------|-------|---------|-------------------------------------------------------------------------| -| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | -| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | -| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | -| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | -| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | -| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | -| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | -| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | -| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | -| Store | class | created | Generated/Shared/Transfer/Store | -| Error | class | created | Generated/Shared/Transfer/Error | -| Sort | class | created | Generated/Shared/Transfer/Sort | -| Pagination | class | created | Generated/Shared/Transfer/Pagination | -| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | -| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | -| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | -| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | -| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | -| Country | class | created | Generated/Shared/Transfer/Country | -| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | -| Region | class | created | Generated/Shared/Transfer/Region | -| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | -| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | -| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | -| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | -| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | -| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | -| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | -| ServicePointSearchCollection | class | created | Generated/Shared/Transfer/ServicePointSearchCollection | -| ServicePointSearch | class | created | Generated/Shared/Transfer/ServicePointSearch | -| ServicePointSearchRequest | class | created | Generated/Shared/Transfer/ServicePointSearchRequest | -| ServicePointServiceCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionRequestTransfer | -| ServicePointServiceCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionResponseTransfer | -| ServicePointServiceCollectionTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionTransfer | -| ServicePointServiceConditionsTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceConditionsTransfer | -| ServicePointServiceCriteriaTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCriteriaTransfer | -| ServicePointServiceTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceTransfer | -| ServiceTypeCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionRequestTransfer | -| ServiceTypeCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionResponseTransfer | -| ServiceTypeCollectionTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionTransfer | -| ServiceTypeConditionsTransfer | class | created | Generated/Shared/Transfer/ServiceTypeConditionsTransfer | -| ServiceTypeCriteriaTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCriteriaTransfer | -| ServiceTypeTransfer | class | created | Generated/Shared/Transfer/ServiceTypeTransfer | +| TRANSFER | TYPE | EVENT | PATH | +|-----------------------------------------------|-------|---------|--------------------------------------------------------------------------| +| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | +| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | +| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | +| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | +| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | +| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | +| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | +| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | +| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | +| Store | class | created | Generated/Shared/Transfer/Store | +| Error | class | created | Generated/Shared/Transfer/Error | +| Sort | class | created | Generated/Shared/Transfer/Sort | +| Pagination | class | created | Generated/Shared/Transfer/Pagination | +| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | +| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | +| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | +| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | +| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | +| Country | class | created | Generated/Shared/Transfer/Country | +| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | +| Region | class | created | Generated/Shared/Transfer/Region | +| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | +| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | +| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | +| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | +| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | +| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | +| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | +| ServicePointSearchCollection | class | created | Generated/Shared/Transfer/ServicePointSearchCollection | +| ServicePointSearch | class | created | Generated/Shared/Transfer/ServicePointSearch | +| ServicePointSearchRequest | class | created | Generated/Shared/Transfer/ServicePointSearchRequest | +| ServicePointServiceCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionRequestTransfer | +| ServicePointServiceCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionResponseTransfer | +| ServicePointServiceCollectionTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionTransfer | +| ServicePointServiceConditionsTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceConditionsTransfer | +| ServicePointServiceCriteriaTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCriteriaTransfer | +| ServicePointServiceTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceTransfer | +| ServiceTypeCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionRequestTransfer | +| ServiceTypeCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionResponseTransfer | +| ServiceTypeCollectionTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionTransfer | +| ServiceTypeConditionsTransfer | class | created | Generated/Shared/Transfer/ServiceTypeConditionsTransfer | +| ServiceTypeCriteriaTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCriteriaTransfer | +| ServiceTypeTransfer | class | created | Generated/Shared/Transfer/ServiceTypeTransfer | {% endinfo_block %} From 7db35aebb5810ff5b72e76b9a22b4dd51e658360 Mon Sep 17 00:00:00 2001 From: Roman Havrylko <70894038+romanhavrylko@users.noreply.github.com> Date: Wed, 10 May 2023 11:47:22 +0200 Subject: [PATCH 12/14] Install the Service Points feature (#1834) * CC-26675: adjusted service point ig with service point storage. --- .../install-the-service-points-feature.md | 378 ++++++++++++++---- 1 file changed, 309 insertions(+), 69 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index bca390af92d..f88b701bb19 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -29,6 +29,7 @@ Make sure that the following modules have been installed: | ServicePointDataImport | vendor/spryker/service-point-data-import | | ServicePointsBackendApi | vendor/spryker/service-points-backend-api | | ServicePointSearch | vendor/spryker/service-point-search | +| ServicePointStorage | vendor/spryker/service-point-storage | {% endinfo_block %} @@ -89,26 +90,29 @@ Make sure that the following changes have been applied in the database: | spy_service_point_service | table | created | | spy_service_point_store | table | created | | spy_service_point_search | table | created | +| spy_service_point_storage | table | created | | spy_service_type | table | created | | spy_region.uuid | column | created | Make sure that propel entities have been generated successfully by checking their existence. Also, make generated entity classes extending respective Spryker core classes. -| CLASS NAMESPACE | EXTENDS | -|--------------------------------------------------------------------|----------------------------------------------------------------------------------------| -| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointService | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointService | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointServiceQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointServiceQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | -| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | -| \Orm\Zed\ServicePoint\Persistence\SpyServiceType | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceType | -| \Orm\Zed\ServicePoint\Persistence\SpyServiceTypeQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceTypeQuery | -| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearch | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearch | -| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearchQuery | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearchQuery | +| CLASS NAMESPACE | EXTENDS | +|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------| +| \Orm\Zed\ServicePoint\Persistence\SpyServicePoint | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePoint | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddress | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddress | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointService | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointService | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointServiceQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointServiceQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointAddressQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointAddressQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStore | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStore | +| \Orm\Zed\ServicePoint\Persistence\SpyServicePointStoreQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServicePointStoreQuery | +| \Orm\Zed\ServicePoint\Persistence\SpyServiceType | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceType | +| \Orm\Zed\ServicePoint\Persistence\SpyServiceTypeQuery | \Spryker\Zed\ServicePoint\Persistence\Propel\AbstractSpyServiceTypeQuery | +| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearch | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearch | +| \Orm\Zed\ServicePointSearch\Persistence\SpyServicePointSearchQuery | \Spryker\Zed\ServicePointSearch\Persistence\Propel\AbstractSpyServicePointSearchQuery | +| \Orm\Zed\ServicePointStorage\Persistence\SpyServicePointStorage | \Spryker\Zed\ServicePointStorage\Persistence\Propel\AbstractSpyServicePointStorage | +| \Orm\Zed\ServicePointStorage\Persistence\SpyServicePointStorageQuery | \Spryker\Zed\ServicePointStorage\Persistence\Propel\AbstractSpyServicePointStorageQuery | {% endinfo_block %} @@ -116,51 +120,60 @@ Make sure that propel entities have been generated successfully by checking thei Make sure that the following changes have been applied in transfer objects: -| TRANSFER | TYPE | EVENT | PATH | -|-----------------------------------------------|-------|---------|--------------------------------------------------------------------------| -| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | -| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | -| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | -| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | -| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | -| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | -| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | -| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | -| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | -| Store | class | created | Generated/Shared/Transfer/Store | -| Error | class | created | Generated/Shared/Transfer/Error | -| Sort | class | created | Generated/Shared/Transfer/Sort | -| Pagination | class | created | Generated/Shared/Transfer/Pagination | -| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | -| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | -| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | -| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | -| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | -| Country | class | created | Generated/Shared/Transfer/Country | -| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | -| Region | class | created | Generated/Shared/Transfer/Region | -| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | -| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | -| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | -| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | -| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | -| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | -| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | -| ServicePointSearchCollection | class | created | Generated/Shared/Transfer/ServicePointSearchCollection | -| ServicePointSearch | class | created | Generated/Shared/Transfer/ServicePointSearch | -| ServicePointSearchRequest | class | created | Generated/Shared/Transfer/ServicePointSearchRequest | -| ServicePointServiceCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionRequestTransfer | -| ServicePointServiceCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionResponseTransfer | -| ServicePointServiceCollectionTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionTransfer | -| ServicePointServiceConditionsTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceConditionsTransfer | -| ServicePointServiceCriteriaTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCriteriaTransfer | -| ServicePointServiceTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceTransfer | -| ServiceTypeCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionRequestTransfer | -| ServiceTypeCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionResponseTransfer | -| ServiceTypeCollectionTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionTransfer | -| ServiceTypeConditionsTransfer | class | created | Generated/Shared/Transfer/ServiceTypeConditionsTransfer | -| ServiceTypeCriteriaTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCriteriaTransfer | -| ServiceTypeTransfer | class | created | Generated/Shared/Transfer/ServiceTypeTransfer | +| TRANSFER | TYPE | EVENT | PATH | +|-----------------------------------------------|-------|---------|-------------------------------------------------------------------------| +| ServicePoint | class | created | src/Generated/Shared/Transfer/ServicePoint | +| ServicePointCollection | class | created | src/Generated/Shared/Transfer/ServicePointCollection | +| ServicePointCollectionRequest | class | created | src/Generated/Shared/Transfer/ServicePointCollectionRequest | +| ServicePointCollectionResponse | class | created | src/Generated/Shared/Transfer/ServicePointCollectionResponse | +| ServicePointCriteria | class | created | src/Generated/Shared/Transfer/ServicePointCriteria | +| ServicePointConditions | class | created | src/Generated/Shared/Transfer/ServicePointConditions | +| ApiServicePointsAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointsAttributes | +| ApiServicePointAddressesAttributes | class | created | src/Generated/Shared/Transfer/ApiServicePointAddressesAttributes | +| StoreRelation | class | created | src/Generated/Shared/Transfer/StoreRelation | +| Store | class | created | Generated/Shared/Transfer/Store | +| Error | class | created | Generated/Shared/Transfer/Error | +| Sort | class | created | Generated/Shared/Transfer/Sort | +| Pagination | class | created | Generated/Shared/Transfer/Pagination | +| ErrorCollection | class | created | Generated/Shared/Transfer/ErrorCollection | +| DataImporterConfiguration | class | created | Generated/Shared/Transfer/DataImporterConfiguration | +| DataImporterReport | class | created | Generated/Shared/Transfer/DataImporterReport | +| CountryCriteria | class | created | Generated/Shared/Transfer/CountryCriteria | +| CountryConditions | class | created | Generated/Shared/Transfer/CountryConditions | +| Country | class | created | Generated/Shared/Transfer/Country | +| CountryCollection | class | created | Generated/Shared/Transfer/CountryCollection | +| Region | class | created | Generated/Shared/Transfer/Region | +| ServicePointAddressCollection | class | created | Generated/Shared/Transfer/ServicePointAddressCollection | +| ServicePointAddressCollectionRequest | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionRequest | +| ServicePointAddressCollectionResponse | class | created | Generated/Shared/Transfer/ServicePointAddressCollectionResponse | +| ServicePointAddressCriteria | class | created | Generated/Shared/Transfer/ServicePointAddressCriteria | +| ServicePointAddressConditions | class | created | Generated/Shared/Transfer/ServicePointAddressConditions | +| ServicePointAddress | class | created | Generated/Shared/Transfer/ServicePointAddress | +| GlueRelationship | class | created | Generated/Shared/Transfer/GlueRelationship | +| ServicePointSearchCollection | class | created | Generated/Shared/Transfer/ServicePointSearchCollection | +| ServicePointSearch | class | created | Generated/Shared/Transfer/ServicePointSearch | +| ServicePointSearchRequest | class | created | Generated/Shared/Transfer/ServicePointSearchRequest | +| ServicePointServiceCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionRequestTransfer | +| ServicePointServiceCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionResponseTransfer | +| ServicePointServiceCollectionTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCollectionTransfer | +| ServicePointServiceConditionsTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceConditionsTransfer | +| ServicePointServiceCriteriaTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceCriteriaTransfer | +| ServicePointServiceTransfer | class | created | Generated/Shared/Transfer/ServicePointServiceTransfer | +| ServiceTypeCollectionRequestTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionRequestTransfer | +| ServiceTypeCollectionResponseTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionResponseTransfer | +| ServiceTypeCollectionTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCollectionTransfer | +| ServiceTypeConditionsTransfer | class | created | Generated/Shared/Transfer/ServiceTypeConditionsTransfer | +| ServiceTypeCriteriaTransfer | class | created | Generated/Shared/Transfer/ServiceTypeCriteriaTransfer | +| ServiceTypeTransfer | class | created | Generated/Shared/Transfer/ServiceTypeTransfer | +| ServicePointStorage | class | created | Generated/Shared/Transfer/ServicePointStorage | +| ServicePointAddressStorage | class | created | Generated/Shared/Transfer/ServicePointAddressStorage | +| CountryStorage | class | created | Generated/Shared/Transfer/CountryStorage | +| RegionStorage | class | created | Generated/Shared/Transfer/RegionStorage | +| ServicePointStorageCollection | class | created | Generated/Shared/Transfer/ServicePointStorageCollection | +| ServicePointStorageCriteria | class | created | Generated/Shared/Transfer/ServicePointStorageCriteria | +| ServicePointStorageConditions | class | created | Generated/Shared/Transfer/ServicePointStorageConditions | +| SynchronizationData | class | created | Generated/Shared/Transfer/SynchronizationData | +| Filter | class | created | Generated/Shared/Transfer/Filter | {% endinfo_block %} @@ -380,11 +393,11 @@ console data:import:service-type Make sure that entities were imported to the following database tables respectively: - - `spy_service_point` - - `spy_service_point_store` - - `spy_service_point_address` - - `spy_service_type` - - `spy_service_point_service` +- `spy_service_point` +- `spy_service_point_store` +- `spy_service_point_address` +- `spy_service_type` +- `spy_service_point_service` {% endinfo_block %} @@ -720,7 +733,7 @@ class ServicePointSearchDependencyProvider extends SprykerServicePointSearchDepe {% info_block warningBox "Verification" %} 1. Fill the `spy_service_point` table with some data and run `console publish:trigger-events -r service_point`. -2. Make sure that the `spy_service_point_search` table is filled with respective data per store. +2. Make sure that the `spy_service_point_search` table is filled with respective data per store. 3. Check Elasticearch documents and make sure data is structured in the following format: ```yaml @@ -772,12 +785,239 @@ class ServicePointSearchDependencyProvider extends SprykerServicePointSearchDepe } ``` -4. In the `spy_service_point_search` table, change some records and run `console sync:data service_point`. +4. In the `spy_service_point_search` table, change some records and run `console sync:data service_point`. 5. Make sure that your changes have been synced to the respective Elasticsearch document. {% endinfo_block %} -### 6) Set up behavior +### 6) Configure export to Redis + +Configure tables to be published and synchronized to the Storage on create, edit, and delete changes. + +1. Adjust `RabbitMq` module configuration in `src/Pyz/Client/RabbitMq/RabbitMqConfig.php`: + +**src/Pyz/Client/RabbitMq/RabbitMqConfig.php** + +```php +<?php + +namespace Pyz\Client\RabbitMq; + +use Spryker\Client\RabbitMq\RabbitMqConfig as SprykerRabbitMqConfig; +use Spryker\Shared\ServicePointStorage\ServicePointStorageConfig; + +class RabbitMqConfig extends SprykerRabbitMqConfig +{ + /** + * @return array<mixed> + */ + protected function getSynchronizationQueueConfiguration(): array + { + return [ + ServicePointStorageConfig::QUEUE_NAME_SYNC_STORAGE_SERVICE_POINT, + ]; + } +} +``` + +2. Register new queue message processor: + +**src/Pyz/Zed/Queue/QueueDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Queue; + +use Spryker\Shared\ServicePointStorage\ServicePointStorageConfig; +use Spryker\Zed\Queue\QueueDependencyProvider as SprykerDependencyProvider; + +class QueueDependencyProvider extends SprykerDependencyProvider +{ + /** + * @param \Spryker\Zed\Kernel\Container $container + * + * @return array<\Spryker\Zed\Queue\Dependency\Plugin\QueueMessageProcessorPluginInterface> + */ + protected function getProcessorMessagePlugins(Container $container): array + { + return [ + ServicePointStorageConfig::QUEUE_NAME_SYNC_STORAGE_SERVICE_POINT => new SynchronizationStorageQueueMessageProcessorPlugin(), + ]; + } +} +``` + +3. Configure synchronization pool and event queue name + +**src/Pyz/Zed/ServicePointStorage/ServicePointStorageConfig.php** + +```php +<?php + +namespace Pyz\Zed\ServicePointStorage; + +use Pyz\Zed\Synchronization\SynchronizationConfig; +use Spryker\Shared\Publisher\PublisherConfig; +use Spryker\Zed\ServicePointStorage\ServicePointStorageConfig as SprykerServicePointStorageConfig; + +class ServicePointStorageConfig extends SprykerServicePointStorageConfig +{ + /** + * @return string|null + */ + public function getServicePointStorageSynchronizationPoolName(): ?string + { + return SynchronizationConfig::DEFAULT_SYNCHRONIZATION_POOL_NAME; + } + + /** + * @return string|null + */ + public function getEventQueueName(): ?string + { + return PublisherConfig::PUBLISH_QUEUE; + } +} +``` + +4. Set up publisher plugins: + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------------|-----------------------------------------------------------------------------------------------|---------------|------------------------------------------------------------------------------------| +| ServicePointWritePublisherPlugin | Publishes service point data by `SpyServicePoint` entity events. | | Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher\ServicePoint | +| ServicePointAddressWritePublisherPlugin | Publishes service point data by `SpyServicePointAddress` entity events. | | Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher\ServicePointAddress | +| ServicePointStoreWritePublisherPlugin | Publishes service point data by service point store entity events. | | Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher\ServicePointStore | +| ServicePointPublisherTriggerPlugin | Allows to populate service point storage table with data and trigger further export to Redis. | | Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher | + +**src/Pyz/Zed/Publisher/PublisherDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Publisher; + +use Spryker\Zed\Publisher\PublisherDependencyProvider as SprykerPublisherDependencyProvider; +use Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher\ServicePoint\ServicePointWritePublisherPlugin as ServicePointStorageWritePublisherPlugin; +use Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher\ServicePointAddress\ServicePointAddressWritePublisherPlugin as ServicePointStorageAddressWritePublisherPlugin; +use Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher\ServicePointPublisherTriggerPlugin as ServicePointStoragePublisherTriggerPlugin; +use Spryker\Zed\ServicePointStorage\Communication\Plugin\Publisher\ServicePointStore\ServicePointStoreWritePublisherPlugin as ServicePointStorageStoreWritePublisherPlugin; + +class PublisherDependencyProvider extends SprykerPublisherDependencyProvider +{ + /** + * @return array + */ + protected function getPublisherPlugins(): array + { + return array_merge( + $this->getServicePointStoragePlugins(), + ); + } + + /** + * @return array<\Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherTriggerPluginInterface> + */ + protected function getPublisherTriggerPlugins(): array + { + return [ + new ServicePointStoragePublisherTriggerPlugin(), + ]; + } + + /** + * @return list<\Spryker\Zed\PublisherExtension\Dependency\Plugin\PublisherPluginInterface> + */ + protected function getServicePointStoragePlugins(): array + { + return [ + new ServicePointStorageWritePublisherPlugin(), + new ServicePointStorageAddressWritePublisherPlugin(), + new ServicePointStorageStoreWritePublisherPlugin(), + ]; + } +} +``` + +5. Set up synchronization plugins: + +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------------------------|--------------------------------------------------------------------------|---------------|----------------------------------------------------------------------| +| ServicePointSynchronizationDataBulkRepositoryPlugin | Allows synchronizing the service point storage table content into Redis. | | Spryker\Zed\ServicePointStorage\Communication\Plugin\Synchronization | + +**src/Pyz/Zed/Synchronization/SynchronizationDependencyProvider.php** + +```php +<?php + +namespace Pyz\Zed\Synchronization; + +use Spryker\Zed\ServicePointStorage\Communication\Plugin\Synchronization\ServicePointSynchronizationDataBulkRepositoryPlugin as ServicePointStorageSynchronizationDataBulkRepositoryPlugin; +use Spryker\Zed\Synchronization\SynchronizationDependencyProvider as SprykerSynchronizationDependencyProvider; + +class SynchronizationDependencyProvider extends SprykerSynchronizationDependencyProvider +{ + /** + * @return array<\Spryker\Zed\SynchronizationExtension\Dependency\Plugin\SynchronizationDataPluginInterface> + */ + protected function getSynchronizationDataPlugins(): array + { + return [ + new ServicePointStorageSynchronizationDataBulkRepositoryPlugin(), + ]; + } +} +``` + +{% info_block warningBox "Verification" %} + +Make sure that the `service-point` trigger plugin works correctly: + +1. Fill the `spy_service_point`, `spy_service_point_store`, `spy_servoce_point_address` tables with data. +2. Run the `console publish:trigger-events -r service_point` command. +3. Make sure that the `spy_service_point_storage` table has been filled with respective data. +4. Make sure that, in your system, storage entries are displayed with `kv:service_point:{store}:{service_point_id}` mask. + +Make sure that `service-point` synchronization plugin works correctly: + +1. Fill the `spy_service_point_storage` table with some data. +2. Run the `console sync:data -r service_point` command. +3. Make sure that, in your system, storage entries are displayed with `kv:service_point:{store}:{service_point_id}` mask. + +Make sure that when a service point is created or edited through BAPI, it is exported to Redis accordingly. + +Make sure you are able to see data in Redis in the following format: +```yaml +{ + "id_service_point": 1, + "uuid": "262feb9d-33a7-5c55-9b04-45b1fd22067e", + "name": "Spryker Main Store", + "key": "sp1", + "is_active": true, + "address": { + "id_service_point_address": 1, + "uuid": "74768ee9-e7dd-5e3c-bafd-b654e7946c54", + "address1": "Caroline-Michaelis-Stra\u00dfe", + "address2": "8", + "address3": null, + "zip_code": "10115", + "city": "Berlin", + "country": { + "iso2_code": "DE", + "id_country": 60 + }, + "region": { + "uuid": "2f02b327-0165-46ea-88df-0190d9a1c242", + "id_region": 1, + "name": "Berlin" + } + }, + "_timestamp": 1683216744.8334839 +} +``` +{% endinfo_block %} + +### 7) Set up behavior 1. To enable the Backend API, register the plugins: @@ -921,4 +1161,4 @@ Make sure that you can send the following requests: * `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` -{% endinfo_block %} +{% endinfo_block %} \ No newline at end of file From 722a96d61ded253f0765b9494ffaaeb697ca7e56 Mon Sep 17 00:00:00 2001 From: Roman Havrylko <roman.havrylko@spryker.com> Date: Thu, 25 May 2023 17:17:01 +0200 Subject: [PATCH 13/14] CC-28503: added service types search in service points feature intgration. --- .../install-the-service-points-feature.md | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index f88b701bb19..0a1599d8d90 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -67,6 +67,12 @@ Make sure that the following modules have been installed: </behavior> </table> + <table name="spy_service"> + <behavior name="event"> + <parameter name="spy_service_all" column="*"/> + </behavior> + </table> + </database> ``` @@ -645,12 +651,13 @@ class PublisherDependencyProvider extends SprykerPublisherDependencyProvider #### Register publisher plugins -| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | -|-----------------------------------------|-----------------------------------------------------|---------------|-----------------------------------------------------------------------------------| -| ServicePointWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | -| ServicePointDeletePublisherPlugin | Listens for events and unpublishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | -| ServicePointAddressWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointAddress | -| ServicePointStoreWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointStore | +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|-----------------------------------------|-----------------------------------------------------------|---------------|-----------------------------------------------------------------------------------| +| ServicePointWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | +| ServicePointDeletePublisherPlugin | Listens for events and unpublishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint | +| ServicePointAddressWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointAddress | +| ServicePointStoreWritePublisherPlugin | Listens for events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointStore | +| ServiceWritePublisherPlugin | Listens for service events and publishes respective data. | None | Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\Service | **src/Pyz/Zed/Publisher/PublisherDependencyProvider.php** @@ -660,6 +667,7 @@ class PublisherDependencyProvider extends SprykerPublisherDependencyProvider namespace Pyz\Zed\Publisher; use Spryker\Zed\Publisher\PublisherDependencyProvider as SprykerPublisherDependencyProvider; +use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\Service\ServiceWritePublisherPlugin; use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint\ServicePointDeletePublisherPlugin; use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePoint\ServicePointWritePublisherPlugin; use Spryker\Zed\ServicePointSearch\Communication\Plugin\Publisher\ServicePointAddress\ServicePointAddressWritePublisherPlugin; @@ -677,6 +685,7 @@ class PublisherDependencyProvider extends SprykerPublisherDependencyProvider new ServicePointDeletePublisherPlugin(), new ServicePointAddressWritePublisherPlugin(), new ServicePointStoreWritePublisherPlugin(), + new ServiceWritePublisherPlugin(), ]; } } @@ -684,12 +693,13 @@ class PublisherDependencyProvider extends SprykerPublisherDependencyProvider #### Register query expander and result formatter plugins -| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | -|------------------------------------------------|-----------------------------------------------|---------------|------------------------------------------------------------------------| -| ServicePointSearchResultFormatterPlugin | Maps raw Elasticsearch results to a transfer. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\ResultFormatter | -| SortedServicePointSearchQueryExpanderPlugin | Adds sorting to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | -| PaginatedServicePointSearchQueryExpanderPlugin | Adds pagination to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | -| StoreServicePointSearchQueryExpanderPlugin | Adds filtering by locale to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|---------------------------------------------------|----------------------------------------------------|---------------|------------------------------------------------------------------------| +| ServicePointSearchResultFormatterPlugin | Maps raw Elasticsearch results to a transfer. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\ResultFormatter | +| SortedServicePointSearchQueryExpanderPlugin | Adds sorting to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | +| PaginatedServicePointSearchQueryExpanderPlugin | Adds pagination to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | +| StoreServicePointSearchQueryExpanderPlugin | Adds filtering by locale to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | +| ServiceTypesServicePointSearchQueryExpanderPlugin | Adds filtering by service types to a search query. | None | Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\Query | **src/Pyz/Client/ServicePointSearch/ServicePointSearchDependencyProvider.php** @@ -725,6 +735,7 @@ class ServicePointSearchDependencyProvider extends SprykerServicePointSearchDepe new StoreServicePointSearchQueryExpanderPlugin(), new SortedServicePointSearchQueryExpanderPlugin(), new PaginatedServicePointSearchQueryExpanderPlugin(), + new ServiceTypesServicePointSearchQueryExpanderPlugin(), ]; } } From 3134d739caec58b2e00ba8e041d9d4b0381bbd98 Mon Sep 17 00:00:00 2001 From: Vadym Sachenko <vadym.sachenko@spryker.com> Date: Mon, 5 Jun 2023 18:02:34 +0300 Subject: [PATCH 14/14] Update install-the-service-points-feature.md --- .../202304.0/install-the-service-points-feature.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md index 0a1599d8d90..18ffda9ac9a 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-service-points-feature.md @@ -2,7 +2,6 @@ This document describes how to integrate the Service Points feature into a Spryk ## Install feature core -Follow the steps below to install the Service Points feature. To start feature integration, integrate the required features: ### Prerequisites @@ -120,10 +119,6 @@ Make sure that propel entities have been generated successfully by checking thei | \Orm\Zed\ServicePointStorage\Persistence\SpyServicePointStorage | \Spryker\Zed\ServicePointStorage\Persistence\Propel\AbstractSpyServicePointStorage | | \Orm\Zed\ServicePointStorage\Persistence\SpyServicePointStorageQuery | \Spryker\Zed\ServicePointStorage\Persistence\Propel\AbstractSpyServicePointStorageQuery | -{% endinfo_block %} - -{% info_block warningBox "Verification" %} - Make sure that the following changes have been applied in transfer objects: | TRANSFER | TYPE | EVENT | PATH | @@ -263,7 +258,6 @@ sp2,,DE,Julie-Wolfthorn-Straße,1,,Berlin,10115 | city | mandatory | string | Berlin | City | | zip_code | mandatory | string | 10115 | Zip code | - **data/import/common/common/service_type.csv** ```csv @@ -1172,4 +1166,4 @@ Make sure that you can send the following requests: * `GET https://glue-backend.mysprykershop.com/service-points/{{service-point-uuid}}/service-point-addresses` -{% endinfo_block %} \ No newline at end of file +{% endinfo_block %}