From 94ca6a34865332855c8a84e9c3f42a9e365acefc Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Tue, 19 Dec 2023 10:24:31 +0200 Subject: [PATCH] review --- .../202204.0/install-the-navigation-module.md | 2 +- .../202212.0/install-the-navigation-module.md | 2 +- .../202307.0/install-the-navigation-module.md | 2 +- .../202311.0/install-the-navigation-module.md | 2 +- ...fer-shipment-type-subdomain-walkthrough.md | 2 +- ...ervice-point-cart-subdomain-walkthrough.md | 61 +++++++++++-------- .../service-points-domain-walkthrough.md | 28 ++++----- ...ype-service-point-subdomain-walkthrough.md | 22 +++---- .../shipment-types-domain-walkthrough.md | 43 ++++++------- 9 files changed, 83 insertions(+), 81 deletions(-) diff --git a/_includes/pbc/all/install-features/202204.0/install-the-navigation-module.md b/_includes/pbc/all/install-features/202204.0/install-the-navigation-module.md index 14434dc733f..54e6f58818a 100644 --- a/_includes/pbc/all/install-features/202204.0/install-the-navigation-module.md +++ b/_includes/pbc/all/install-features/202204.0/install-the-navigation-module.md @@ -56,7 +56,7 @@ class CollectorDependencyProvider extends SprykerCollectorDependencyProvider } ``` -### Data Setup +### Data setup You should now be able to manage navigation menus from Zed UI, and the collectors should also be able to export the navigation menus to the KV storage. This is a good time to implement an installer in your project to install a selection of frequently used navigation menus. diff --git a/_includes/pbc/all/install-features/202212.0/install-the-navigation-module.md b/_includes/pbc/all/install-features/202212.0/install-the-navigation-module.md index 14434dc733f..54e6f58818a 100644 --- a/_includes/pbc/all/install-features/202212.0/install-the-navigation-module.md +++ b/_includes/pbc/all/install-features/202212.0/install-the-navigation-module.md @@ -56,7 +56,7 @@ class CollectorDependencyProvider extends SprykerCollectorDependencyProvider } ``` -### Data Setup +### Data setup You should now be able to manage navigation menus from Zed UI, and the collectors should also be able to export the navigation menus to the KV storage. This is a good time to implement an installer in your project to install a selection of frequently used navigation menus. diff --git a/_includes/pbc/all/install-features/202307.0/install-the-navigation-module.md b/_includes/pbc/all/install-features/202307.0/install-the-navigation-module.md index 14434dc733f..54e6f58818a 100644 --- a/_includes/pbc/all/install-features/202307.0/install-the-navigation-module.md +++ b/_includes/pbc/all/install-features/202307.0/install-the-navigation-module.md @@ -56,7 +56,7 @@ class CollectorDependencyProvider extends SprykerCollectorDependencyProvider } ``` -### Data Setup +### Data setup You should now be able to manage navigation menus from Zed UI, and the collectors should also be able to export the navigation menus to the KV storage. This is a good time to implement an installer in your project to install a selection of frequently used navigation menus. diff --git a/_includes/pbc/all/install-features/202311.0/install-the-navigation-module.md b/_includes/pbc/all/install-features/202311.0/install-the-navigation-module.md index 14434dc733f..54e6f58818a 100644 --- a/_includes/pbc/all/install-features/202311.0/install-the-navigation-module.md +++ b/_includes/pbc/all/install-features/202311.0/install-the-navigation-module.md @@ -56,7 +56,7 @@ class CollectorDependencyProvider extends SprykerCollectorDependencyProvider } ``` -### Data Setup +### Data setup You should now be able to manage navigation menus from Zed UI, and the collectors should also be able to export the navigation menus to the KV storage. This is a good time to implement an installer in your project to install a selection of frequently used navigation menus. diff --git a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/product-offer-shipment-type-subdomain-walkthrough.md b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/product-offer-shipment-type-subdomain-walkthrough.md index e5de36eed8d..838d63fd426 100644 --- a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/product-offer-shipment-type-subdomain-walkthrough.md +++ b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/product-offer-shipment-type-subdomain-walkthrough.md @@ -24,7 +24,7 @@ The Product Offer Shipment Type subdomain establishes the connection between pro | ProductOfferShipmentTypeStorage | vendor/spryker/product-offer-shipment-type-storage | | ProductOfferShipmentTypeStorageExtension | vendor/spryker/product-offer-shipment-type-storage-extension | -## Data Setup +## Data setup The `ProductOfferShipmentTypeDataImport` module lets you import the relationships between shipment types and product offers. diff --git a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-point-cart-subdomain-walkthrough.md b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-point-cart-subdomain-walkthrough.md index 32f1c66ac7b..a01c828fdf2 100644 --- a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-point-cart-subdomain-walkthrough.md +++ b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-point-cart-subdomain-walkthrough.md @@ -1,18 +1,17 @@ --- title: Click and Collect feature Service Point Cart subdomain walkthrough last_updated: Nov 02, 2023 -description: Explore the Service Point Cart subdomain in the Click and Collect feature, focusing on the validation of service points and the replacement of line items in a shopping cart. Learn how to install the essential modules and leverage the extension point for implementing custom item replacement strategies during the checkout process. - +description: The Service Point Cart subdomain focuses on the validation of service points and the replacement of line items in shopping carts. template: concept-topic-template --- -# Service Point Cart - The Service Point Cart subdomain enables you to validate service points and replace line items within a shopping cart. +## Installation + [Install the Service Points Cart feature](/docs/pbc/all/install-features/{{page.version}}/install-the-service-points-cart-feature.html) -## 1. Modules +## Modules | MODULE | EXPECTED DIRECTORY | |-----------------------------|------------------------------------------------| @@ -20,30 +19,27 @@ The Service Point Cart subdomain enables you to validate service points and repl | ServicePointCartExtension | vendor/spryker/service-point-cart-extension | | ServicePointCartsRestApi | vendor/spryker/service-point-carts-rest-api | -## 2. Extension point that allows for the implementation of item replacement strategies in the cart during the checkout process +## Extension point that allows for the implementation of item replacement strategies in the cart during checkout -Utilize the extension point to implement custom strategies for replacing items in the cart during the checkout process. +The following extension point is used to implement custom strategies for replacing items in the cart during checkout: `\Spryker\Zed\ServicePointCartExtension\Dependency\Plugin\ServicePointQuoteItemReplaceStrategyPluginInterface`. -**\Spryker\Zed\ServicePointCartExtension\Dependency\Plugin\ServicePointQuoteItemReplaceStrategyPluginInterface** +Implementation example: `\Spryker\Zed\ClickAndCollectExample\Communication\Plugin\ServicePointCart\ClickAndCollectExampleServicePointQuoteItemReplaceStrategyPlugin`. -Example Implementation: +This example replacement strategy substitutes a product offer with another one based on updated information about the service point and shipment type in the shopping cart. -**\Spryker\Zed\ClickAndCollectExample\Communication\Plugin\ServicePointCart\ClickAndCollectExampleServicePointQuoteItemReplaceStrategyPlugin** - -This example replacement strategy substitutes a product offer with another based on updated information about the Service Point and Shipment Type in the shopping cart. - -At the project level, extend this capability to support more intricate scenarios, such as: +At the project level, extend this capability to support more intricate scenarios, such as the following: 1. Receiving information from external systems about the offer intended for replacement. 2. Implementing diverse algorithms for cart item replacement based on information obtained from customers. -## 2.1 How to merge cart line items with different product offers but same SKU and Merchant. +### How to merge cart line items with different product offers but same SKU and merchant. -The demo replacement strategy can guarantee work only if a product in the cart with same SKU and Merchant represented as a single cart line item. -To enable the following behavior, you need to follow the steps below: +The demo replacement strategy works only if a product in the cart with same SKU and merchant are represented as a single cart line item. +To enable this behavior, follow the steps: -1. Disable plugin **\Spryker\Zed\ProductOffer\Communication\Plugin\Cart\ProductOfferGroupKeyItemExpanderPlugin** from the **\Pyz\Zed\Cart\CartDependencyProvider::getExpanderPlugins()**, this plugin groups cart items with the same product offer. -2. Create a new ProductOfferGroupKeyItemExpanderPlugin plugin that implements **\Spryker\Zed\CartExtension\Dependency\Plugin\ItemExpanderPluginInterface** and register it in **\Pyz\Zed\Cart\CartDependencyProvider::getExpanderPlugins()**. +1. From `\Pyz\Zed\Cart\CartDependencyProvider::getExpanderPlugins()`, disable the `\Spryker\Zed\ProductOffer\Communication\Plugin\Cart\ProductOfferGroupKeyItemExpanderPlugin` plugin. + This plugin groups cart items with the same product offer. +2. Create a new `ProductOfferGroupKeyItemExpanderPlugin` plugin that implements `\Spryker\Zed\CartExtension\Dependency\Plugin\ItemExpanderPluginInterface` and register it in `\Pyz\Zed\Cart\CartDependencyProvider::getExpanderPlugins()`. 3. Add the following code to the example plugin: ```php @@ -100,8 +96,25 @@ class ProductOfferMerchantGroupKeyItemExpanderPlugin extends AbstractPlugin impl } ``` -1. Prepare several product offers for the merchant's product. -2. Log in to the store as a customer. -3. Add a product to the cart with a quantity of 1 for SKU SKU123 and Merchant MER123 and Offer [Offer1]. -4. Select a different offer, for example, Offer2, for the same product with the same Merchant and add it to the cart. -5. The cart line item with a quantity of 1, SKU SKU123 and Merchant MER123 and Offer [Offer1] will be updated to a quantity of 2. + +{% info_block warningBox "Verification" %} + + +1. Prepare several product offers for a merchant's product. + For these steps, assume you are creating offer1 and offer2 for product SKU123 and merchant MER123. +2. On the Storefront, log in as a customer. +3. Add a product to cart with the following configuration: + * Quantity: 1 + * SKU: SKU123 + * Merchant: MER123 + * Offer: offer1 + +4. Add the following product to cart: + * Quantity: 1 + * SKU: SKU123 + * Merchant: MER123 + * Offer: offer2 + +Make sure the cart item you've added in step 3 is updated to quantity 2. The number of items in cart remains 1. + +{% endinfo_block %} diff --git a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-points-domain-walkthrough.md b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-points-domain-walkthrough.md index 256c8ad6fe9..69c66e34627 100644 --- a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-points-domain-walkthrough.md +++ b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/service-points-domain-walkthrough.md @@ -1,19 +1,18 @@ --- title: Click and Collect feature Service Points domain walkthrough last_updated: Nov 02, 2023 -description: | - Explore the Service Point domain of the Click and Collect feature, exploring the definition and functionality of service points. Learn how to install the Service Points feature and set up essential modules for seamless integration. Understand the significance of data setup and discover the available methods, including the Backend API and Data Import, to configure service points, addresses, stores, service types, and services. - +description: Explore the Service Point domain of the Click and Collect feature, exploring the definition and functionality of service points. Learn how to install the Service Points feature and set up essential modules for seamless integration. Understand the significance of data setup and discover the available methods, including the Backend API and Data Import, to configure service points, addresses, stores, service types, and services. template: concept-topic-template --- -# Service Points A Service Point represents a physical location, such as a store, post office, or other designated areas, enabling customers to conveniently pick up their orders or access additional services like returns, exchanges, or customer support. Each service point has the capability to offer one or multiple unique services to customers. +## Installation + [Install the Service Points feature](/docs/pbc/all/install-features/{{page.version}}/install-the-service-points-feature.html) -## 1. Modules +## Modules | MODULE | EXPECTED DIRECTORY | |---------------------------|------------------------------------------------| @@ -32,19 +31,18 @@ A Service Point represents a physical location, such as a store, post office, or | ServicePointWidget | vendor/spryker-shop/service-point-widget | | ServicePointCartPage | vendor/spryker-shop/service-point-cart-page | -## 2. Data Setup - -Spryker offers two methods for setting up service points, service point addresses, service point stores, service types, and services: +## Data setup -- Backend API (check the `ServicePointsBackendApi` module) -- Data Import (check the `ServicePointDataImport` module) +The following options let you set up shipment types data: -## 3. Address Substitution during Checkout +| MODULE | IMPORT TYPE | +| - | - | +| `ServicePointsBackendApi` | Backend API | +| `ServicePointDataImport` | Data Import | -The `ServicePointWidget` module offers a mechanism to substitute the shipping address with the service point address during the checkout process in Yves. -### Plugins +## Address substitution during checkout -The following plugin handles address substitution when the cart item has a service point selected and the shipment type is set to `pickup`: +The `ServicePointWidget` module offers a mechanism to substitute the shipping address with the service point address during checkout. -- **\SprykerShop\Yves\ServicePointWidget\Plugin\CustomerPage\ServicePointAddressCheckoutAddressCollectionFormExpanderPlugin** +The following plugin handles address substitution when the cart item has a service point selected and the shipment type is set to `pickup`: `\SprykerShop\Yves\ServicePointWidget\Plugin\CustomerPage\ServicePointAddressCheckoutAddressCollectionFormExpanderPlugin`. diff --git a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-type-service-point-subdomain-walkthrough.md b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-type-service-point-subdomain-walkthrough.md index c4a6d6b77c3..dcffa428819 100644 --- a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-type-service-point-subdomain-walkthrough.md +++ b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-type-service-point-subdomain-walkthrough.md @@ -1,19 +1,15 @@ --- -title: Click and Collect feature Shipment Type Service Point subdomain walkthrough +title: Shipment Type Service Point subdomain last_updated: Nov 02, 2023 -description: | - Explore the Shipment Type Service Point subdomain in the Click and Collect feature, focusing on the connection between shipment types and service points. Learn how to install the Shipment Service Points feature and set up the necessary modules to establish a seamless integration. Understand the data setup process, leveraging the import functionality provided by the `ShipmentTypeServicePointDataImport` module to create a robust connection between service points and shipment types. - +description: The Shipment Type Service Point subdomain connects shipment types and service points. template: concept-topic-template --- -# Shipment Type Service Point - The Shipment Type Service Point subdomain establishes the connection between shipment types and service type. [Install the Shipment Service Points feature](/docs/pbc/all/install-features/{{page.version}}/install-the-shipment-service-points-feature.html) -## 1. Modules +## Modules | MODULE | EXPECTED DIRECTORY | |------------------------------------|---------------------------------------------------------| @@ -22,20 +18,20 @@ The Shipment Type Service Point subdomain establishes the connection between shi | ShipmentTypeServicePointsRestApi | vendor/spryker/shipment-type-service-points-rest-api | | ShipmentTypeServicePointStorage | vendor/spryker/shipment-type-service-point-storage | -## 2. Data Setup +## Data setup Spryker provides import functionality through the `ShipmentTypeServicePointDataImport` module to facilitate the setup of the connection between service points and shipment types. -## 3. Address Substitution during Checkout +## Address substitution during checkout -The `ShipmentTypeServicePointsRestApi` module offers a mechanism to substitute the shipping address with the service point address during the checkout process. +The `ShipmentTypeServicePointsRestApi` module offers a mechanism to substitute the shipping address with the service point address during checkout. ### Plugins The following plugin handles address substitution when the shipment type is set to `pickup` and a service point is selected: -- **\Spryker\Glue\ShipmentTypeServicePointsRestApi\Plugin\CheckoutRestApi\ShipmentTypeServicePointCheckoutRequestExpanderPlugin** +**\Spryker\Glue\ShipmentTypeServicePointsRestApi\Plugin\CheckoutRestApi\ShipmentTypeServicePointCheckoutRequestExpanderPlugin** -Additionally, customization possibilities exist to redefine applicable shipment type keys supporting address substitution through module configuration: +Additionally, you can redefine applicable shipment type keys supporting address substitution through module configuration: -- **\Spryker\Shared\ShipmentTypeServicePointsRestApi\ShipmentTypeServicePointsRestApiConfig::getApplicableShipmentTypeKeysForShippingAddress** +**\Spryker\Shared\ShipmentTypeServicePointsRestApi\ShipmentTypeServicePointsRestApiConfig::getApplicableShipmentTypeKeysForShippingAddress** diff --git a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-types-domain-walkthrough.md b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-types-domain-walkthrough.md index 8621b5b9ffd..b2b60f74593 100644 --- a/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-types-domain-walkthrough.md +++ b/docs/pbc/all/service-point-management/202311.0/unified-commerce/extend-and-customize/shipment-types-domain-walkthrough.md @@ -1,19 +1,17 @@ --- -title: Click and Collect feature Shipment Types domain walkthrough +title: Shipment Types domain walkthrough last_updated: Nov 02, 2023 -description: | - Explore the Shipment Type domain in the Click and Collect feature, understanding the various options available to customers for receiving their orders. This guide provides comprehensive details on installing the Shipment feature, delving into the associated modules, and showcasing different data setup methods. Additionally, discover key extension points for customizing Shipment Types behavior during the checkout process. - +description: Discover the key extension points for customizing the behavior of shipment types during checkout. template: concept-topic-template --- -# Shipment Types +Shipment types offer different options for customers to receive their orders. -Shipment types offer diverse options for customers to receive their orders. +## Installation [Install the Shipment feature](/docs/pbc/all/install-features/{{page.version}}/install-the-shipment-feature.html) -## 1. Modules +## Modules | MODULE | EXPECTED DIRECTORY | |-----------------------------------------------------------|----------------------------------------------------------------------------------| @@ -32,36 +30,35 @@ Shipment types offer diverse options for customers to receive their orders. | ShipmentTypeWidget | vendor/spryker-shop/shipment-type-widget | | SalesShipmentType | vendor/spryker/sales-shipment-type | -## 2. Data Setup +## Data setup + +The following options let you set up shipment types data: -Spryker offers two methods for setting up shipment types: -- Backend API (check `ShipmentTypesBackendApi` module) -- Data import (check `ShipmentTypeDataImport` module) +| MODULE | IMPORT TYPE | +| - | - | +| `ShipmentTypesBackendApi` | Backend API | +| `ShipmentTypeDataImport` | Data import | -## 3. Extension point for filter shipment types for the quote during the checkout process +## Extension point for filter shipment types for the quote during checkout -Filter shipment types for the quote during the checkout process with the following extension point: +Filter shipment types for the quote during checkout with the following extension point: **\Spryker\Client\ShipmentTypeStorageExtension\Dependency\Plugin\AvailableShipmentTypeFilterPluginInterface** -An example: +Example of a plugin that filters out shipment types without a product offer shipment type relation: **\Spryker\Client\ClickAndCollectExample\Plugin\ShipmentTypeStorage\ShipmentTypeProductOfferAvailableShipmentTypeFilterPlugin** -This plugin filters out shipment types without a product offer shipment type relation. +## Extension point for expanding Shipment Type data before publishing to the Storage -## 4. Extension point for expanding Shipment Type data before publishing to the Storage - -Expands shipment type storage collection with additional data before publishing to the Storage. -Use the expanded data after retrieving Shipment Type data from the Storage. +Expands shipment type storage collection with additional data before publishing to the Storage. Use the expanded data after retrieving Shipment Type data from the Storage. **\Spryker\Zed\ShipmentTypeStorageExtension\Dependency\Plugin\ShipmentTypeStorageExpanderPluginInterface** -An example: +Example of a plugin that expands shipment types with a service type: **\Spryker\Zed\ShipmentTypeServicePointStorage\Communication\Plugin\ShipmentTypeStorage\ServiceTypeShipmentTypeStorageExpanderPlugin** -This plugin expands shipment types with a service type. ## 5. Extension point for expanding Shipment Type data after retrieving from the Storage @@ -69,8 +66,6 @@ Expands shipment type storage collection with additional data after retrieving i **\Spryker\Client\ShipmentTypeStorageExtension\Dependency\Plugin\ShipmentTypeStorageExpanderPluginInterface** -An example: +Example of a plugin that expands shipment types with a service type: **\Spryker\Client\ShipmentTypeServicePointStorage\Plugin\ShipmentTypeStorage\ServiceTypeShipmentTypeStorageExpanderPlugin** - -This plugin expands shipment types with a service type.