Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated IGs. #2286

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ composer require spryker-feature/product-offer-service-points-availability: "{{p

Make sure the following modules have been installed:

| MODULE | EXPECTED DIRECTORY |
|---------------------------------------------------------|------------------------------------------------------------------------------|
| ProductOfferServicePointAvailability | vendor/spryker/product-offer-service-point-availability |
| ProductOfferServicePointAvailabilityExtension | vendor/spryker/product-offer-service-point-availability-extension |
| ProductOfferServicePointAvailabilityCalculator | vendor/spryker/product-offer-service-point-availability-calculator |
| ProductOfferServicePointAvailabilityCalculatorExtension | vendor/spryker/product-offer-service-point-availability-calculator-extension |
| ProductOfferServicePointAvailabilitiesRestApi | vendor/spryker/product-offer-service-point-availabilities-rest-api |
| ProductOfferServicePointAvailabilityWidget | vendor/spryker-shop/product-offer-service-point-availability-widget |
| MODULE | EXPECTED DIRECTORY |
|----------------------------------------------------------------|--------------------------------------------------------------------------------------|
| ProductOfferServicePointAvailability | vendor/spryker/product-offer-service-point-availability |
| ProductOfferServicePointAvailabilityCalculatorStorage | vendor/spryker/product-offer-service-point-availability-calculator-storage |
| ProductOfferServicePointAvailabilityCalculatorStorageExtension | vendor/spryker/product-offer-service-point-availability-calculator-storage-extension |
| ProductOfferServicePointAvailabilitiesRestApi | vendor/spryker/product-offer-service-point-availabilities-rest-api |
| ProductOfferServicePointAvailabilityStorage | vendor/spryker/product-offer-service-point-availability-storage |
| ProductOfferServicePointAvailabilityStorageExtension | vendor/spryker/product-offer-service-point-availability-storage-extension |
| ProductOfferServicePointAvailabilityWidget | vendor/spryker-shop/product-offer-service-point-availability-widget |

{% endinfo_block %}

Expand Down Expand Up @@ -153,29 +154,25 @@ class AvailabilityDependencyProvider extends SprykerAvailabilityDependencyProvid
#### Enable the demo Click & Collect availability calculator strategy plugin

Add the following examplary plugin.

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|----------------------------------------------|
| ExampleClickAndCollectProductOfferServicePointAvailabilityCalculatorStrategyPlugin | Calculates and returns product offer availabilities by service point UUID for requested items, prioritizing the matching criteria. Takes into account merchant references if provided. | | Spryker\Client\ClickAndCollectExample\Plugin |

**src/Pyz/Client/ProductOfferServicePointAvailabilityCalculator/ProductOfferServicePointAvailabilityCalculatorDependencyProvider.php**
**src/Pyz/Client/ProductOfferServicePointAvailabilityCalculatorStorage/ProductOfferServicePointAvailabilityCalculatorStorageDependencyProvider.php**

```php
<?php

/**
* This file is part of the Spryker Suite.
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

namespace Pyz\Client\ProductOfferServicePointAvailabilityCalculator;
namespace Pyz\Client\ProductOfferServicePointAvailabilityCalculatorStorage;

use Spryker\Client\ClickAndCollectExample\Plugin\ExampleClickAndCollectProductOfferServicePointAvailabilityCalculatorStrategyPlugin;
use Spryker\Client\ProductOfferServicePointAvailabilityCalculator\ProductOfferServicePointAvailabilityCalculatorDependencyProvider as SprykerProductOfferServicePointAvailabilityCalculatorDependencyProvider;
use Spryker\Client\ProductOfferServicePointAvailabilityCalculatorStorage\ProductOfferServicePointAvailabilityCalculatorStorageDependencyProvider as SprykerProductOfferServicePointAvailabilityCalculatorStorageDependencyProvider;

class ProductOfferServicePointAvailabilityCalculatorDependencyProvider extends SprykerProductOfferServicePointAvailabilityCalculatorDependencyProvider
class ProductOfferServicePointAvailabilityCalculatorStorageDependencyProvider extends SprykerProductOfferServicePointAvailabilityCalculatorStorageDependencyProvider
{
/**
* @return list<\Spryker\Client\ProductOfferServicePointAvailabilityCalculatorExtension\Dependency\Plugin\ProductOfferServicePointAvailabilityCalculatorStrategyPluginInterface>
* @return list<\Spryker\Client\ProductOfferServicePointAvailabilityCalculatorStorageExtension\Dependency\Plugin\ProductOfferServicePointAvailabilityCalculatorStrategyPluginInterface>
*/
protected function getProductOfferServicePointAvailabilityCalculatorStrategyPlugins(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ Ensure the following transfers have been created:
| ProductOfferShipmentTypeIteratorConditions | class | created | src/Generated/Shared/Transfer/ProductOfferShipmentTypeIteratorConditionsTransfer |
| ProductOfferShipmentType | class | created | src/Generated/Shared/Transfer/ProductOfferShipmentTypeTransfer |
| ProductOfferShipmentTypeStorage | class | created | src/Generated/Shared/Transfer/ProductOfferShipmentTypeStorageTransfer |
| ProductOfferShipmentTypeCollectionRequest | class | created | src/Generated/Shared/Transfer/ProductOfferShipmentTypeCollectionRequestTransfer |
| ProductOfferShipmentTypeCollectionResponse | class | created | src/Generated/Shared/Transfer/ProductOfferShipmentTypeCollectionResponseTransfer |
| ProductOfferCriteria | class | created | src/Generated/Shared/Transfer/ProductOfferCriteriaTransfer |
| ProductOfferConditions | class | created | src/Generated/Shared/Transfer/ProductOfferConditionsTransfer |
| ProductOfferCollection | class | created | src/Generated/Shared/Transfer/ProductOfferCollectionTransfer |
Expand Down Expand Up @@ -112,6 +114,8 @@ Ensure the following transfers have been created:
| Item | class | created | src/Generated/Shared/Transfer/ItemTransfer |
| ProductOfferStorageCriteria | class | created | src/Generated/Shared/Transfer/ProductOfferStorageCriteriaTransfer |
| ProductOfferStorageCollection | class | created | src/Generated/Shared/Transfer/ProductOfferStorageCollectionTransfer |
| Error | class | created | src/Generated/Shared/Transfer/ErrorTransfer |
| ErrorCollection | class | created | src/Generated/Shared/Transfer/ErrorCollectionTransfer |
| ProductOfferStorage.productConcreteSku | property | added | src/Generated/Shared/Transfer/ProductOfferStorageTransfer |
| ShipmentTypeStorage.key | property | added | src/Generated/Shared/Transfer/ShipmentTypeStorageTransfer |

Expand Down Expand Up @@ -415,7 +419,28 @@ Make sure that the configured data has been added to the `spy_product_offer_ship

{% endinfo_block %}

### 5) Set up behavior
### 5) Add translations

1. Append the glossary according to your configuration:

```csv
product_offer_shipment_type.validation.product_offer_reference_not_found,Product offer '%product_offer_reference%' not found.,en_US
product_offer_shipment_type.validation.product_offer_reference_not_found,Product offer '%product_offer_reference%' nicht gefunden.,de_DE
product_offer_shipment_type.validation.shipment_type_uuid_not_found,Delivery types with uuids '%shipment_type_uuids%' not found.,en_US
product_offer_shipment_type.validation.shipment_type_uuid_not_found,Lieferarten mit den uuids '%shipment_type_uuids%' wurde nicht gefunden.,de_DE
product_offer_shipment_type.validation.product_offer_not_unique,A product offer with the same reference already exists in request.,de_DE
product_offer_shipment_type.validation.product_offer_not_unique,Ein Product Offer mit der gleichen Referenz liegt bereits in der Anfrage vor.,de_DE
product_offer_shipment_type.validation.shipment_type_not_unique,A delivery type for product offer '%product_offer_reference%' with the same uuid already exists in request.,de_DE
product_offer_shipment_type.validation.shipment_type_not_unique,Ein Lieferart für Product Offer '%product_offer_reference%' mit derselben UUID ist bereits in der Anfrage vorhanden.,de_DE
```

2. Import data:

```bash
console data:import glossary
```

### 6) Set up behavior

Enable the following plugins:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,22 @@ Make sure that availability plugin works correctly:

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|---------------------------------------------------------------|-------------------------------------------------------------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ShipmentTypeProductOfferServicePointAvailabilityFilterPlugin | Filters product offer service point availability by shipmen type. | None | Spryker\Client\ProductOfferShipmentTypeAvailability\Plugin\ProductOfferServicePointAvailability\ShipmentTypeProductOfferServicePointAvailabilityFilterPlugin |
| ShipmentTypeProductOfferServicePointAvailabilityFilterPlugin | Filters product offer service point availability by shipmen type. | None | Spryker\Client\ProductOfferShipmentTypeAvailabilityStorage\Plugin\ProductOfferServicePointAvailabilityStorage\ShipmentTypeProductOfferServicePointAvailabilityFilterPlugin |

**src/Pyz/Client/ProductOfferServicePointAvailability/ProductOfferServicePointAvailabilityDependencyProvider.php**
**src/Pyz/Client/ProductOfferServicePointAvailabilityStorage/ProductOfferServicePointAvailabilityStorageDependencyProvider.php**

```php
<?php

namespace Pyz\Client\ProductOfferServicePointAvailability;
namespace Pyz\Client\ProductOfferServicePointAvailabilityStorage;

use Spryker\Client\ProductOfferServicePointAvailability\ProductOfferServicePointAvailabilityDependencyProvider as SprykerProductOfferServicePointAvailabilityDependencyProvider;
use Spryker\Client\ProductOfferShipmentTypeAvailability\Plugin\ProductOfferServicePointAvailability\ShipmentTypeProductOfferServicePointAvailabilityFilterPlugin;
use Spryker\Client\ProductOfferServicePointAvailabilityStorage\ProductOfferServicePointAvailabilityStorageDependencyProvider as SprykerProductOfferServicePointAvailabilityStorageDependencyProvider;
use Spryker\Client\ProductOfferShipmentTypeAvailabilityStorage\Plugin\ProductOfferServicePointAvailabilityStorage\ShipmentTypeProductOfferServicePointAvailabilityFilterPlugin;

class ProductOfferServicePointAvailabilityDependencyProvider extends SprykerProductOfferServicePointAvailabilityDependencyProvider
class ProductOfferServicePointAvailabilityStorageDependencyProvider extends SprykerProductOfferServicePointAvailabilityStorageDependencyProvider
{
/**
* @return list<\Spryker\Client\ProductOfferServicePointAvailabilityExtension\Dependency\Plugin\ProductOfferServicePointAvailabilityFilterPluginInterface>
* @return list<\Spryker\Client\ProductOfferServicePointAvailabilityStorageExtension\Dependency\Plugin\ProductOfferServicePointAvailabilityFilterPluginInterface>
*/
protected function getProductOfferServicePointAvailabilityFilterPlugins(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ Enable the following behaviors by registering the plugins:

| PLUGIN | DESCRIPTION | PREREQUISITES | NAMESPACE |
|-------------------------------------------------|-----------------------------------------------------------------------------|---------------|----------------------------------------------------------------------------------------------|
| MerchantProductOfferServiceStorageFilterPlugin | Filters product offer services collection by active and approved merchants. | | Spryker\Zed\MerchantProductOfferStorage\Communication\Plugin\ProductOfferServicePointStorage |
| MerchantProductOfferServiceCollectionStorageFilterPlugin | Filters product offer services collection by active and approved merchants. | | Spryker\Zed\MerchantProductOfferStorage\Communication\Plugin\ProductOfferServicePointStorage |

**src/Pyz/Client/Catalog/CatalogDependencyProvider.php**
**src/Pyz/Zed/ProductOfferServicePointStorage/ProductOfferServicePointStorageDependencyProvider.php**

```php
<?php

namespace Pyz\Zed\ProductOfferServicePointStorage;

use Spryker\Zed\MerchantProductOfferStorage\Communication\Plugin\ProductOfferServicePointStorage\MerchantProductOfferServiceStorageFilterPlugin;
use Spryker\Zed\MerchantProductOfferStorage\Communication\Plugin\ProductOfferServicePointStorage\MerchantProductOfferServiceCollectionStorageFilterPlugin;
use Spryker\Zed\ProductOfferServicePointStorage\ProductOfferServicePointStorageDependencyProvider as SprykerProductOfferServicePointStorageDependencyProvider;

class ProductOfferServicePointStorageDependencyProvider extends SprykerProductOfferServicePointStorageDependencyProvider
{
/**
* @return list<\Spryker\Zed\ProductOfferServicePointStorageExtension\Dependeency\Plugin\ProductOfferServiceStorageFilterPluginInterface>
* @return list<\Spryker\Zed\ProductOfferServicePointStorageExtension\Dependency\Plugin\ProductOfferServiceCollectionStorageFilterPluginInterface>
*/
protected function getProductOfferServiceStorageFilterPlugins(): array
protected function getProductOfferServiceCollectionStorageFilterPlugins(): array
{
return [
new MerchantProductOfferServiceStorageFilterPlugin(),
new MerchantProductOfferServiceCollectionStorageFilterPlugin(),
];
}
}
Expand Down