-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEXT-25264 - Changed salutation to optional
NEXT-25264 - ADR for salutation default not specified
- Loading branch information
1 parent
325349c
commit e561c3f
Showing
43 changed files
with
1,244 additions
and
117 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
adr/2023-06-28-default-handle-for-non-specified-salutations.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Default handling for non specified salutations | ||
date: 2023-06-28 | ||
area: core | ||
tags: [adr, salutation] | ||
--- | ||
|
||
## Context | ||
The current implementation of the salutation in Shopware 6 needs to handle cases where the salutation is not specified by the customer or administrator. To address this requirement and promote inclusivity, we have updated the default salutation to "not_specified" for unspecified salutations in our Shopware 6 platform. | ||
|
||
## Decision | ||
We have modified the existing salutation handling in Shopware 6 to update the default value to "not_specified" when the salutation is null. This decision was made based on the following considerations: | ||
|
||
* Inclusivity: By offering a default salutation of "not_specified" for null values, we promote inclusivity and ensure that all customers are appropriately addressed, even when salutation data is missing. | ||
* Customer Experience: Providing a default salutation ensures consistency in customer communications and prevents any confusion or misinterpretation when a salutation is not explicitly specified. | ||
* Non-Deletable Default Salutation: It has been decided that the "not_specified" salutation, being the default value for unspecified salutations, should not be deletable by the shop owner. This ensures that there is always a fallback option available, guaranteeing a consistent experience for customers. | ||
|
||
## Consequences | ||
As a result of this decision, the following consequences will occur: | ||
|
||
* Improved Default Handling: When a customer or administrator does not specify a salutation, the default value will be automatically set to "not_specified." This default value itself is configurable by the shop owner. They have the flexibility to customize the "not_specified" value to their preferred salutation or leave it as it is to use the generic "not_specified" salutation. | ||
* Enhanced Inclusivity: Customers who have not specified their salutation will be addressed using the default "not_specified" salutation, reflecting our commitment to inclusivity and respect within our platform. | ||
* Code Changes: The necessary code changes have been implemented to update the default handling of null salutations. This includes validation checks, database updates, and modifications to relevant logic to accommodate the "not_specified" default value. | ||
* Different Default Values in Specific Locations: The default values used in specific locations within the platform are as follows: | ||
* Letters and Documents: When generating letters or documents where a salutation is required, the default value will be "Dear Customer" or an appropriate alternative if customization is allowed. This ensures a professional and personalized approach in written communications. | ||
* Email Communications: In email communications, the default value will be "Hello" or an alternative greeting if customization is allowed. This provides a friendly and welcoming tone in electronic correspondences. | ||
* User Interfaces: Within the user interfaces of the Shopware 6 platform, the default value will be displayed as "not_specified" for customers who have not specified a salutation. This allows for a neutral and inclusive representation in the platform's user-facing components. | ||
* Testing and Quality Assurance: Rigorous testing procedures will be conducted to ensure the accuracy and reliability of the updated default handling. Quality assurance measures will be in place to identify and address any potential issues. |
32 changes: 32 additions & 0 deletions
32
...log/_unreleased/2023-03-31-fix-salutation-auto-when-create-customer-in-admin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Fix salutation auto set default when create customer in admin | ||
issue: NEXT-25264 | ||
--- | ||
# Administration | ||
* Added computed `defaultSalutationId`, `salutationCriteria`, `salutationRepository` in to get default salutation | ||
* `sw-customer-create` component. | ||
* `sw-customer-detail` component. | ||
* `sw-order-new-customer-modal` component. | ||
* `sw-customer-detail-addresses` component. | ||
* Changed `createdComponent` method in to set default salutation for customer | ||
* `sw-customer-create` component. | ||
* `sw-customer-detail` component. | ||
* `sw-order-new-customer-modal` component. | ||
___ | ||
# Core | ||
* Changed `Shopware\Core\Checkout\Customer\SalesChannel\ChangeCustomerProfileRoute::change` to set default to `salutationId` | ||
* Changed `Shopware\Core\Checkout\Customer\SalesChannel\RegisterRoute::register` to set default to `salutationId` | ||
* Changed `Shopware\Core\Checkout\Customer\SalesChannel\UpsertAddressRoute::upsert` to set default to `salutationId` | ||
* Changed `Shopware\Core\Checkout\Order\Aggregate\OrderAddress\OrderAddressDefinition` to remove flag required with salutationId. | ||
* Added `Shopware\Core\System\Salutation\SalutationSorter` to sort salutations | ||
* Added subscribers to set salutation with default not specified | ||
* `Shopware\Core\Checkout\Order\Subscriber\OrderSalutationSubscriber` | ||
* `Shopware\Core\Checkout\Customer\Subscriber\CustomerSalutationSubscriber` | ||
* `Shopware\Core\Content\Newsletter\Subscriber\NewsletterRecipientSalutationSubscriber` | ||
___ | ||
# Storefront | ||
* Changed function `register` in `Shopware\Storefront\Controller\RegisterController` to remove `definition` `salutationId`. | ||
* Changed `Shopware\Storefront\Page\Account\Login\AccountLoginPageLoader::load` to sort salutations by `salutation_key` not specified. | ||
* Changed `Shopware\Storefront\Page\Account\Profile\AccountProfilePageLoader::load` to sort salutations by `salutation_key` not specified. | ||
* Changed `Shopware\Storefront\Page\Address\Detail\AddressDetailPageLoader::load` to sort salutations by `salutation_key` not specified. | ||
* Changed `storefront/component/address/address-personal.html.twig` to remove attribute `required` with `salutationId`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.