Skip to content

Commit

Permalink
Merge pull request #2298 from spryker/bugfix/cc-31740-fulfillment-app…
Browse files Browse the repository at this point in the history
…-be-gaps

CC-31740: Fixes to the FA and C&C integration guides.
  • Loading branch information
andriitserkovnyi authored Nov 20, 2023
2 parents a9d479e + adb5d27 commit 2d2cdf6
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 30 deletions.
32 changes: 16 additions & 16 deletions _data/sidebars/pbc_all_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3045,22 +3045,22 @@ entries:
url: /docs/pbc/all/product-information-management/marketplace/manage-in-the-back-office/product-options/create-product-options.html
- title: Manage product options
url: /docs/pbc/all/product-information-management/marketplace/manage-in-the-back-office/product-options/manage-product-options.html
- title: Manage using Glue API
nested:
- title: Retrieve abstract products
url: /docs/pbc/all/product-information-management/marketplace/manage-using-glue-api/glue-api-retrieve-abstract-products.html
- title: Retrieve concrete products
url: /docs/pbc/all/product-information-management/marketplace/manage-using-glue-api/glue-api-retrieve-concrete-products.html
- title: Retrieve product offers of concrete products
url: /docs/pbc/all/product-information-management/marketplace/manage-using-glue-api/glue-api-retrieve-product-offers-of-concrete-products.html
- title: Domain model and relationships
nested:
- title: Marketplace Product
url: /docs/pbc/all/product-information-management/marketplace/domain-model-and-relationships/marketplace-product-feature-domain-model-and-relationships.html
- title: Marketplace Product Approval Process
url: /docs/pbc/all/product-information-management/marketplace/domain-model-and-relationships/marketplace-product-approval-process-feature-domain-model-and-relationships.html
- title: Marketplace Product Options
url: /docs/pbc/all/product-information-management/marketplace/domain-model-and-relationships/marketplace-product-options-feature-domain-model-and-relationships.html
- title: Manage using Glue API
nested:
- title: Retrieve abstract products
url: /docs/pbc/all/product-information-management/marketplace/manage-using-glue-api/glue-api-retrieve-abstract-products.html
- title: Retrieve concrete products
url: /docs/pbc/all/product-information-management/marketplace/manage-using-glue-api/glue-api-retrieve-concrete-products.html
- title: Retrieve product offers of concrete products
url: /docs/pbc/all/product-information-management/marketplace/manage-using-glue-api/glue-api-retrieve-product-offers-of-concrete-products.html
- title: Domain model and relationships
nested:
- title: Marketplace Product
url: /docs/pbc/all/product-information-management/marketplace/domain-model-and-relationships/marketplace-product-feature-domain-model-and-relationships.html
- title: Marketplace Product Approval Process
url: /docs/pbc/all/product-information-management/marketplace/domain-model-and-relationships/marketplace-product-approval-process-feature-domain-model-and-relationships.html
- title: Marketplace Product Options
url: /docs/pbc/all/product-information-management/marketplace/domain-model-and-relationships/marketplace-product-options-feature-domain-model-and-relationships.html
- title: "Marketplace Merchant Portal Product Management feature: Domain model and relationships"
url: /docs/pbc/all/product-information-management/marketplace/domain-model-and-relationships/marketplace-merchant-portal-product-management-feature-domain-model-and-relationships.html
- title: Product Relationship Management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,8 @@ To start integration, integrate the required features:
### 1) Install the required modules using Composer

```bash
composer require spryker/product-warehouse-allocation-example:"dev-master" --update-with-dependencies
composer require spryker/product-offer-warehouse-allocation-example:"dev-master" --update-with-dependencies
composer require spryker/product-warehouse-allocation-example:"^0.3.0" --update-with-dependencies
composer require spryker/product-offer-warehouse-allocation-example:"^0.3.0" --update-with-dependencies
```

{% info_block warningBox "Verification" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class ProductOfferShipmentTypeStorageConfig extends SprykerProductOfferShipmentT
/**
* @return string|null
*/
public function getProductOfferShipmentTypeStorageSynchronizationPoolName(): ?string
public function getProductOfferShipmentTypeSynchronizationPoolName(): ?string
{
return SynchronizationConfig::DEFAULT_SYNCHRONIZATION_POOL_NAME;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Install the required modules using Composer:

```bash
composer require spryker-feature/service-points-cart: "{{page.version}}" --update-with-dependencies
composer require spryker/service-point-carts-rest-api:"^1.0.0" --update-with-dependencies
```

{% info_block warningBox "Verification" %}
Expand All @@ -28,6 +29,7 @@ Make sure that the following modules have been installed:
| ServicePointCart | vendor/spryker/service-point-cart |
| ServicePointCartExtension | vendor/spryker/service-point-cart-extension |
| ServicePointCartPage | vendor/spryker-shop/service-point-cart-page |
| ServicePointCartsRestApi | vendor/spryker/service-point-carts-rest-api |

{% endinfo_block %}

Expand All @@ -44,16 +46,76 @@ service_point_cart.checkout.validation.error,Der ausgewählte Servicepunkt "%uui

Register the plugins:

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|--------------------------------------------------|--------------------------------------------------------------------------------------------------|---------------|-------------------------------------------------------------|
| ServicePointCheckoutPreConditionPlugin | Validates if `QuoteTransfer.items.servicePoint` is active and available for the current store. | None | Spryker\Zed\ServicePointCart\Communication\Plugin\Checkout |
| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|------------------------------------------------|------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------------------------|
| ServicePointCheckoutPreConditionPlugin | Validates if `QuoteTransfer.items.servicePoint` is active and available for the current store. | | Spryker\Zed\ServicePointCart\Communication\Plugin\Checkout |
| ReplaceServicePointQuoteItemsQuoteMapperPlugin | If shipments are provided, replaces quote items using an applicable strategy. | | Spryker\Zed\ServicePointCartsRestApi\Communication\Plugin\CheckoutRestApi |

**src/Pyz/Zed/Checkout/CheckoutDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\Checkout;

use Spryker\Zed\Checkout\CheckoutDependencyProvider as SprykerCheckoutDependencyProvider;
use Spryker\Zed\ServicePointCart\Communication\Plugin\Checkout\ServicePointCheckoutPreConditionPlugin;

class CheckoutDependencyProvider extends SprykerCheckoutDependencyProvider
{
/**
* @param \Spryker\Zed\Kernel\Container $container
*
* @return array<\Spryker\Zed\CheckoutExtension\Dependency\Plugin\CheckoutPreConditionPluginInterface>
*/
protected function getCheckoutPreConditions(Container $container): array
{
return [
new ServicePointCheckoutPreConditionPlugin(),
];
}
```

{% info_block warningBox "Verification" %}

1. Add an item to cart and proceed to checkout.
2. Select a service point.
3. Deactivate the service point.
4. Proceed to the *Summary* page.
On the *Summary* page, make sure you get the validation error.
4. Proceed to the **Summary** page.
On the **Summary** page, make sure you get the validation error.

{% endinfo_block %}

**src/Pyz/Zed/CheckoutRestApi/CheckoutRestApiDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\CheckoutRestApi;

use Spryker\Zed\CheckoutRestApi\CheckoutRestApiDependencyProvider as SprykerCheckoutRestApiDependencyProvider;
use Spryker\Zed\ServicePointCartsRestApi\Communication\Plugin\CheckoutRestApi\ReplaceServicePointQuoteItemsQuoteMapperPlugin;

class CheckoutRestApiDependencyProvider extends SprykerCheckoutRestApiDependencyProvider
{
/**
* @return array<\Spryker\Zed\CheckoutRestApiExtension\Dependency\Plugin\QuoteMapperPluginInterface>
*/
protected function getQuoteMapperPlugins(): array
{
return [
new ReplaceServicePointQuoteItemsQuoteMapperPlugin() # Has to be placed before PaymentsQuoteMapperPlugin
];
}
```

{% info_block warningBox "Verification" %}

1. Prepare two product offers for the same product:
1. With support for the pickup shipment type and a connection to a service point.
2. Without support for the pickup shipment type.
2. Using Glue API, add the product offer 2 to cart.
3. Using the `checkout-data` endpoint, select a service point for the item.
Make sure the selected service point is returned in the response. Make sure the product offer 2 has been replaced with the product offer 1.

{% endinfo_block %}
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ use Spryker\Zed\DataImport\DataImportDependencyProvider as SprykerDataImportDepe
use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointDataImportPlugin;
use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointStoreDataImportPlugin;
use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServicePointAddressDataImportPlugin;
use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServiceTypeDataImportPlugin;
use Spryker\Zed\ServicePointDataImport\Communication\Plugin\DataImport\ServiceDataImportPlugin;

class DataImportDependencyProvider extends SprykerDataImportDependencyProvider
{
Expand Down Expand Up @@ -757,7 +759,9 @@ 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\Query\ServiceTypesServicePointSearchQueryExpanderPlugin;
use Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\ResultFormatter\ServicePointSearchResultFormatterPlugin;
use Spryker\Client\ServicePointSearch\Plugin\Elasticsearch\ResultFormatter\ServicePointAddressRelationExcludeServicePointQueryExpanderPlugin;
use Spryker\Client\ServicePointSearch\ServicePointSearchDependencyProvider as SprykerServicePointSearchDependencyProvider;

class ServicePointSearchDependencyProvider extends SprykerServicePointSearchDependencyProvider
Expand Down Expand Up @@ -1162,10 +1166,10 @@ Verify the `service-type` synchronization plugin works correctly:

1. To enable the Backend API, register the plugins:

| 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 |
| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|--------------------------------------------|---------------------------------------------------|---------------|------------------------------------------------------------------------|
| ServicePointsBackendResourcePlugin | Registers the `service-points` resource. | | \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplication |
| ServicePointAddressesBackendResourcePlugin | Registers the `service-point-addresses` resource. | | \Spryker\Glue\ServicePointsBackendApi\Plugin\GlueBackendApiApplication |

**src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Make sure the following modules have been installed:
2. Optional: To install the demo multi-shipment picking strategy, install the module:

```bash
composer require spryker/picking-list-multi-shipment-picking-strategy-example: "^0.1.0" --update-with-dependencies
composer require spryker/picking-list-multi-shipment-picking-strategy-example: "^0.2.1" --update-with-dependencies
```

Make sure the following module has been installed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ Content-Length: 165
namespace Pyz\Glue\GlueBackendApiApplication;

use Spryker\Glue\GlueBackendApiApplication\GlueBackendApiApplicationDependencyProvider as SprykerGlueBackendApiApplicationDependencyProvider;
use Spryker\Glue\WarehouseUsersBackendApi\Plugin\GlueApplication\WarehouseUserAssignmentsBackendResourcePlugin;
use Spryker\Glue\WarehouseUsersBackendApi\Plugin\GlueBackendApiApplication\WarehouseUserAssignmentsBackendResourcePlugin;

class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiApplicationDependencyProvider
{
Expand Down

0 comments on commit 2d2cdf6

Please sign in to comment.