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-30854 Setting address based on shipment type and service point selection #2259

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ Make sure that the following modules have been installed:

1. Add the following configuration to your project:

| CONFIGURATION | SPECIFICATION | NAMESPACE |
|---------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|-------------------------|
| CheckoutRestApiConfig::shouldExecuteQuotePostRecalculationPlugins() | Defines if a stack of `QuotePostRecalculatePluginStrategyInterface` plugins should be executed after quote recalculation. | Pyz\Zed\CheckoutRestApi |
| CONFIGURATION | SPECIFICATION | NAMESPACE |
|-------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|--------------------------|
| CheckoutRestApiConfig::shouldExecuteQuotePostRecalculationPlugins() | Defines if a stack of `QuotePostRecalculatePluginStrategyInterface` plugins should be executed after quote recalculation. | Pyz\Zed\CheckoutRestApi |
| CheckoutRestApiConfig::getRequiredCustomerRequestDataForGuestCheckout() | Returns the customer data fields required for checkout as a guest user. | Pyz\Glue\CheckoutRestApi |

**src/Pyz/Glue/CheckoutRestApi/CheckoutRestApiConfig.php**

Expand All @@ -68,6 +69,31 @@ class CheckoutRestApiConfig extends SprykerCheckoutRestApiConfig
}
```

**src/Pyz/Glue/CheckoutRestApi/CheckoutRestApiConfig.php**

```php
<?php

namespace Pyz\Glue\CheckoutRestApi;

use Generated\Shared\Transfer\RestCustomerTransfer;
use Spryker\Glue\CheckoutRestApi\CheckoutRestApiConfig as SprykerCheckoutRestApiConfig;

class CheckoutRestApiConfig extends SprykerCheckoutRestApiConfig
{
/**
* @return list<string>
*/
public function getRequiredCustomerRequestDataForGuestCheckout(): array
{
return array_merge(parent::getRequiredCustomerRequestDataForGuestCheckout(), [
RestCustomerTransfer::FIRST_NAME,
RestCustomerTransfer::LAST_NAME,
]);
}
}
```

2. Add all the payment methods available in the shop to `CheckoutRestApiConfig`—for example:

<details>
Expand Down
Loading