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

CC-31565: Update Shipment, Service Points features #2269

Merged
merged 19 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
70fc94d
CC-31565: Update Shipment, Service Points features
dmiseev Oct 24, 2023
4830b61
Merge branch 'master' into bugfix/cc-31565-product-bundle-in-cc
andriitserkovnyi Oct 30, 2023
cd418c6
Update install-the-service-points-feature.md
andriitserkovnyi Oct 30, 2023
1e6a9c3
Merge branch 'master' into bugfix/cc-31565-product-bundle-in-cc
andriitserkovnyi Oct 31, 2023
d9a7fbc
Update install-the-service-points-feature.md
andriitserkovnyi Oct 31, 2023
1adf93d
Update install-the-service-points-feature.md
andriitserkovnyi Oct 31, 2023
825a2f3
Update install-the-service-points-feature.md
andriitserkovnyi Oct 31, 2023
e5108d4
Merge branch 'master' into bugfix/cc-31565-product-bundle-in-cc
andriitserkovnyi Oct 31, 2023
bbfe73a
Update install-the-service-points-feature.md
andriitserkovnyi Oct 31, 2023
d38f22d
Update install-the-service-points-feature.md
andriitserkovnyi Oct 31, 2023
bcdc6f2
Update install-the-shipment-feature.md
andriitserkovnyi Oct 31, 2023
f9c7967
Update install-the-service-points-feature.md
andriitserkovnyi Nov 1, 2023
a558689
Update install-the-service-points-feature.md
andriitserkovnyi Nov 1, 2023
1a4a0f8
Update install-the-service-points-feature.md
andriitserkovnyi Nov 6, 2023
34a375c
Merge branch 'master' into bugfix/cc-31565-product-bundle-in-cc
andriitserkovnyi Nov 6, 2023
efa24bf
names
andriitserkovnyi Nov 6, 2023
0b874b3
names
andriitserkovnyi Nov 6, 2023
bb4fb64
names
andriitserkovnyi Nov 6, 2023
15b115b
Merge branch 'master' into bugfix/cc-31565-product-bundle-in-cc
andriitserkovnyi Nov 6, 2023
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 @@ -1465,7 +1465,73 @@ service_point_widget.no_results,"Nichts gefunden...",de_DE
console data:import glossary
```

### 2) Enable controllers
### 2) Set up configuration

Add the following configuration to your project:

1. Disable service point selection for product bundles (if it's exists) during checkout:

| CONFIGURATION | SPECIFICATION | NAMESPACE |
|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------|
| ServicePointWidgetConfig::getNotApplicableServicePointAddressStepFormItemPropertiesForHydration() | Defines a list of properties in a `ItemTransfer` that are not intended for form hydration. | Pyz\Yves\ServicePointWidget |
| ProductBundleConfig::getAllowedBundleItemFieldsToCopy() | Defines a list of allowed fields to be copied from a source bundle item to destination bundled items. | Pyz\Zed\ProductBundle |

**src/Pyz/Yves/ServicePointWidget/ServicePointWidgetConfig.php**

```php
<?php

namespace Pyz\Yves\ServicePointWidget;

use Generated\Shared\Transfer\ItemTransfer;
use SprykerShop\Yves\ServicePointWidget\ServicePointWidgetConfig as SprykerServicePointWidgetConfig;

class ServicePointWidgetConfig extends SprykerServicePointWidgetConfig
{
/**
* @return list<string>
*/
public function getNotApplicableServicePointAddressStepFormItemPropertiesForHydration(): array
{
return [
ItemTransfer::BUNDLE_ITEM_IDENTIFIER,
ItemTransfer::RELATED_BUNDLE_ITEM_IDENTIFIER,
];
}
}
```

**src/Pyz/Zed/ProductBundle/ProductBundleConfig.php**

```php
<?php

namespace Pyz\Zed\ProductBundle;

use Generated\Shared\Transfer\ItemTransfer;
use Spryker\Zed\ProductBundle\ProductBundleConfig as SprykerProductBundleConfig;

class ProductBundleConfig extends SprykerProductBundleConfig
{
/**
* @return list<string>
*/
public function getAllowedBundleItemFieldsToCopy(): array
{
return [
ItemTransfer::SHIPMENT,
];
}
}
```

{% info_block warningBox "Verification" %}

Make sure that service point selection is not possible for product bundles on the checkout address step (`http://mysprykershop.com/checkout/address`).

{% endinfo_block %}

### 3) Enable controllers

Register the following route providers on the Storefront:

Expand Down Expand Up @@ -1499,7 +1565,7 @@ class RouterDependencyProvider extends SprykerRouterDependencyProvider
}
```

### 3) Set up widgets
### 4) Set up widgets

1. Register the following plugins to enable widgets:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1749,7 +1749,73 @@ Ensure that the following modules have been installed:

{% endinfo_block %}

### 2) Set up Behavior
### 2) Set up configuration

Add the following configuration to your project:

1. Disable shipment point selection for product bundles (if it's exists) during checkout:

| CONFIGURATION | SPECIFICATION | NAMESPACE |
|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------|
| ShipmentTypeWidgetConfig::getNotApplicableServicePointAddressStepFormItemPropertiesForHydration() | Defines a list of properties in a `ItemTransfer` that are not intended for form hydration. | Pyz\Yves\ShipmentTypeWidget |
| ProductBundleConfig::getAllowedBundleItemFieldsToCopy() | Defines a list of allowed fields to be copied from a source bundle item to destination bundled items. | Pyz\Zed\ProductBundle |

**src/Pyz/Yves/ShipmentTypeWidget/ShipmentTypeWidgetConfig.php**

```php
<?php

namespace Pyz\Yves\ShipmentTypeWidget;

use Generated\Shared\Transfer\ItemTransfer;
use SprykerShop\Yves\ShipmentTypeWidget\ShipmentTypeWidgetConfig as SprykerShipmentTypeWidgetConfig;

class ShipmentTypeWidgetConfig extends SprykerShipmentTypeWidgetConfig
{
/**
* @return list<string>
*/
public function getNotApplicableShipmentTypeAddressStepFormItemPropertiesForHydration(): array
{
return [
ItemTransfer::BUNDLE_ITEM_IDENTIFIER,
ItemTransfer::RELATED_BUNDLE_ITEM_IDENTIFIER,
];
}
}
```

**src/Pyz/Zed/ProductBundle/ProductBundleConfig.php**

```php
<?php

namespace Pyz\Zed\ProductBundle;

use Generated\Shared\Transfer\ItemTransfer;
use Spryker\Zed\ProductBundle\ProductBundleConfig as SprykerProductBundleConfig;

class ProductBundleConfig extends SprykerProductBundleConfig
{
/**
* @return list<string>
*/
public function getAllowedBundleItemFieldsToCopy(): array
{
return [
ItemTransfer::SHIPMENT,
];
}
}
```

{% info_block warningBox "Verification" %}

Make sure that shipment point selection is not possible for product bundles on the checkout address step (`http://mysprykershop.com/checkout/address`).

{% endinfo_block %}

### 3) Set up Behavior

Enable the following behaviors by registering the plugins:

Expand Down
Loading