Skip to content

Enabling Individual Editing of Shipping and Billing Addresses from the Customer Dashboard #38677

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

Open
wants to merge 5 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

Franciscof-Serfe
Copy link
Contributor

@Franciscof-Serfe Franciscof-Serfe commented Apr 30, 2024

Description (*)

We propose an enhancement to the Magento customer dashboard's address management functionality.
Currently, when adding an address, it defaults to both billing and shipping. However, distinguishing between them becomes confusing for clients, as editing one address impacts both. This native workflow requires generating a new address to differentiate between default shipping or billing. Our enhancement streamlines this process by allowing direct individual editing of billing and shipping addresses, thereby simplifying the user experience for logged-in clients.

Video 1: "Native Magento Flow: Editing Billing and Shipping Addresses"
NativeMagento.webm

Video 2: "Improvement Proposal: Individual Editing of Billing and Shipping Addresses"
addressImprovement.webm

Manual testing scenarios (*)

  1. Navigate to the customer dashboard.
  2. Add a new address and verify that it defaults to both billing and shipping.
  3. Edit the address and observe that both billing and shipping are affected.
  4. Apply this pull request's changes and verify that individual editing of billing and shipping addresses is possible without affecting the other.

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Enabling Individual Editing of Shipping and Billing Addresses from the Customer Dashboard #38678: Enabling Individual Editing of Shipping and Billing Addresses from the Customer Dashboard

Copy link

m2-assistant bot commented Apr 30, 2024

Hi @Franciscof-Serfe. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@Franciscof-Serfe
Copy link
Contributor Author

Franciscof-Serfe commented Apr 30, 2024

@magento I'm working on it

@Franciscof-Serfe
Copy link
Contributor Author

@magento create issue

@engcom-Hotel engcom-Hotel added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Apr 30, 2024
@Franciscof-Serfe
Copy link
Contributor Author

Franciscof-Serfe commented Aug 13, 2024

PR status update:
The branch is updated

  1. Semantic version checker failure.
    Should I modify the commits message to adjust this pipe or are no actions required from my side?

  2. Functional Tests falling, the changes added are not related.

Test:

  • Create new user from /customer/account/create/
  • Add new address. The first will be added to both billing and shipping addresses and you can edit each other individually.
    VIDEO:
testing.mp4

@ihor-sviziev , @engcom-Bravo , @engcom-Delta Can you move forward with this? Thanks.
@markshust

@engcom-Hotel
Copy link
Contributor

Hello @Franciscof-Serfe,

Kindly resolve the PR conflicts so we can proceed with further processing. In the meantime, we are moving this PR to "On Hold."

Thanks

@engcom-Hotel engcom-Hotel moved this from Pending Review to On Hold in Community Dashboard Apr 11, 2025
@Franciscof-Serfe
Copy link
Contributor Author

Hi @engcom-Hotel,
This PR has been updated for merging. I apologize for the delay on my part.

The test status review is available in this comment:
#38677 (comment)

Please let me know if you need any further action from me.
Regards,
Fran

@Franciscof-Serfe Franciscof-Serfe force-pushed the customer-dashboard-split-new-address branch 2 times, most recently from bb382f8 to 6eb70f0 Compare April 15, 2025 15:41
Copy link
Contributor

@markshust markshust left a comment

Choose a reason for hiding this comment

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

May be a little typo here?

@engcom-Hotel engcom-Hotel moved this from On Hold to Pending Review in Community Dashboard Apr 16, 2025
@engcom-Hotel engcom-Hotel moved this from Pending Review to Review in Progress in Community Dashboard Apr 16, 2025
@engcom-Hotel engcom-Hotel added Progress: review Triage: Need PO Confirmation Requirements should be clarified/approved/confirmed with Product Manager. Not ready for fix/delivery and removed Progress: on hold Progress: review labels Apr 16, 2025
@engcom-Hotel
Copy link
Contributor

Hello @Franciscof-Serfe,

Thanks for the contribution!

Since this PR contains a new feature, we are marking this PR as a Feature Request and sent a mail to PO for the approval. Please allow us time, till we get the approval. In the meantime we are moving this PR On Hold.

Thanks

@Franciscof-Serfe
Copy link
Contributor Author

Hi @engcom-Hotel ,
Just to clarify — Why is this PR considered a new feature?

I’d see something like adding profile pictures to customer accounts or address validation as a new feature. But in this case, the "Change Billing Address" and "Change Shipping Address" buttons already existed. This PR simply fixes them so they work as expected.

Thanks for reviewing and helping to clarify this.

Best regards,
Francisco

@markshust
Copy link
Contributor

@engcom-Hotel I agree with @Franciscof-Serfe, this is a UI improvement so things work as expected, not a new feature.

@engcom-Hotel
Copy link
Contributor

Hello @Franciscof-Serfe @markshust,

Since this PR enhances an existing feature of Magento and is not a bug, we have classified it as a feature request. The related issue has also been marked as a feature request.

This change will impact the user experience, which is why we require PO approval to proceed further.

Rest assured, we are actively working on this PR and will provide you with updates shortly.

Thanks

Copy link

Failed to run the builds. Please try to re-run them later.

1 similar comment
Copy link

Failed to run the builds. Please try to re-run them later.

@Franciscof-Serfe
Copy link
Contributor Author

@magento run all tests

@Franciscof-Serfe Franciscof-Serfe force-pushed the customer-dashboard-split-new-address branch from 6267d4c to 0d57587 Compare April 28, 2025 14:15
@Franciscof-Serfe
Copy link
Contributor Author

@magento run all tests

@engcom-Hotel
Copy link
Contributor

Hello @Franciscof-Serfe,

The approval on this feature request has been received from the PO. Hence moving further with the PR.

Thanks

@engcom-Hotel engcom-Hotel moved this from On Hold to Review in Progress in Community Dashboard Apr 30, 2025
@engcom-Hotel engcom-Hotel removed the Triage: Need PO Confirmation Requirements should be clarified/approved/confirmed with Product Manager. Not ready for fix/delivery label Apr 30, 2025
@engcom-Hotel
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

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

Hello @Franciscof-Serfe,

Thanks for the contribution!

Please refer to the below review comments, and it seems some functional tests are failing due to this change, please fix them as well.

Also please add some automated test for this PR change.

Thanks

'customer/address/formPost',
['_secure' => true, 'id' => $this->getAddress()->getId()]
);
$queryParams = ['_secure' => true];
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we can simplified this section as follows:

$queryParams = ['_secure' => true];

// Consolidate $defaultShipping and $defaultBilling conditions
if ($defaultShipping == 1) {
    $queryParams['default_shipping'] = 1;
}
if ($defaultBilling == 1) {
    $queryParams['default_billing'] = 1;
}

// Add 'id' parameter only if the address is not both default billing and shipping
if (!$this->getAddress()->isDefaultBilling() || !$this->getAddress()->isDefaultShipping()) {
    $queryParams['id'] = $this->getAddress()->getId();
}

// URL construction remains in a single block
$postURL = $this->_urlBuilder->getUrl(
    'customer/address/formPost',
    $queryParams
);

Just a sample code, just check the condition before implementing the same.

* @return string
*/
public function getSaveUrl()
public function getSaveUrl($defaultShipping = 0, $defaultBilling = 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maintain backward compatibility for the getSaveUrl method by deprecating the old method and introducing a new one

@Franciscof-Serfe
Copy link
Contributor Author

@magento run all tests

@engcom-Hotel
Copy link
Contributor

Hello @Franciscof-Serfe,

It seems the automated tests are still failing due to the changes please check those as well and please add some automated test in accordance to the DOD.

Thanks

@Franciscof-Serfe
Copy link
Contributor Author

Hi @engcom-Hotel ,
Sorry for the delay. I'm aware of the pending fixes.
I’ll get back to finishing this contribution as soon as I have some time available.

Regards,
Francisco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: needs update Project: Community Picked PRs upvoted by the community
Projects
Status: Changes Requested
Development

Successfully merging this pull request may close these issues.

[Issue] Enabling Individual Editing of Shipping and Billing Addresses from the Customer Dashboard
4 participants