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

Install the shipment feature #2116

Merged
Merged
Changes from 2 commits
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 @@ -1117,17 +1117,19 @@ Ensure that the following modules have been installed:
| MODULE | EXPECTED DIRECTORY |
|--------------------|------------------------------------------|
| ShipmentTypeWidget | vendor/spryker-shop/shipment-type-widget |
| ShipmentPage | vendor/spryker-shop/shipment-page |

{% endinfo_block %}

### 2) Set up Behavior

Enable the following behaviors by registering the plugins:

| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|--------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------|
| ShipmentTypeCheckoutPageStepEnginePreRenderPlugin | Expands `Quote.items.shipment` transfer with `shipmentTypeUuid` taken from `Quote.items.shipmentType.uuid`. | | SprykerShop\Yves\ShipmentTypeWidget\Plugin\CheckoutPage |
| ShipmentTypeCheckoutAddressStepPreGroupItemsByShipmentPlugin | Cleans `Shipment.shipmentTypeUuid` from each item in `Quote.items`. | | SprykerShop\Yves\ShipmentTypeWidget\Plugin\CustomerPage |
| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
|--------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|---------------|------------------------------------------------------------|
| ShipmentTypeCheckoutPageStepEnginePreRenderPlugin | Expands `Quote.items.shipment` transfer with `shipmentTypeUuid` taken from `Quote.items.shipmentType.uuid`. | | SprykerShop\Yves\ShipmentTypeWidget\Plugin\CheckoutPage |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| ShipmentTypeCheckoutPageStepEnginePreRenderPlugin | Expands `Quote.items.shipment` transfer with `shipmentTypeUuid` taken from `Quote.items.shipmentType.uuid`. | | SprykerShop\Yves\ShipmentTypeWidget\Plugin\CheckoutPage |
| ShipmentTypeCheckoutPageStepEnginePreRenderPlugin | Expands the `Quote.items.shipment` transfer with `shipmentTypeUuid` taken from `Quote.items.shipmentType.uuid`. | | SprykerShop\Yves\ShipmentTypeWidget\Plugin\CheckoutPage |

| ShipmentTypeCheckoutAddressStepPreGroupItemsByShipmentPlugin | Cleans `Shipment.shipmentTypeUuid` from each item in `Quote.items`. | | SprykerShop\Yves\ShipmentTypeWidget\Plugin\CustomerPage |
| ShipmentReorderItemSanitizerPlugin | Sets the `ItemTransfer.shipment` property to `null` for each item after reorder. | | SprykerShop\Yves\ShipmentPage\Plugin\CustomerReorderWidget |

**src/Pyz/Yves/CheckoutPage/CheckoutPageDependencyProvider.php**

Expand Down Expand Up @@ -1175,3 +1177,31 @@ class CustomerPageDependencyProvider extends SprykerShopCustomerPageDependencyPr
}
}
```

**src/Pyz/Yves/CustomerReorderWidget/CustomerReorderWidgetDependencyProvider.php**

```php
<?php

namespace Pyz\Yves\CustomerReorderWidget;

use SprykerShop\Yves\CustomerReorderWidget\CustomerReorderWidgetDependencyProvider as SprykerCustomerReorderWidgetDependencyProvider;
use SprykerShop\Yves\ShipmentPage\Plugin\CustomerReorderWidget\ShipmentReorderItemSanitizerPlugin;

class CustomerReorderWidgetDependencyProvider extends SprykerCustomerReorderWidgetDependencyProvider
{
/**
* @return array<\SprykerShop\Yves\CustomerReorderWidgetExtension\Dependency\Plugin\ReorderItemSanitizerPluginInterface>
*/
protected function getReorderItemSanitizerPlugins(): array
{
return [
new ShipmentReorderItemSanitizerPlugin(),
];
}
}
```
abitskil marked this conversation as resolved.
Show resolved Hide resolved

{% info_block warningBox "Verification" %}
Make sure that after completing the reordering process, the address selection step functions correctly and the address type is selected as "single address".
VadymSachenko marked this conversation as resolved.
Show resolved Hide resolved
{% info_block warningBox "Verification" %}