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

Username only updated on first address and when there is 1 address #2932

Merged

Conversation

Akarshit
Copy link
Contributor

Fix for #2812

Username not updated everytime the billing address is changed. It is only updated when

  • This is the first billing address the user is entering.
  • The user is editing the only billing address.

To test the PR

  1. Sign-up as a new user
  2. Checkout a product, the username will be changed from Guest to the name you use in Billing Address
  3. Create an address with different billing name, the profile name will not change.
  4. Delete the second address
  5. Edit the billing address and change name, the profile name will change.

@Akarshit Akarshit force-pushed the bugfix-userNameUpdate branch from 8e96b36 to 5dab7d9 Compare September 22, 2017 20:27
@Akarshit Akarshit force-pushed the bugfix-userNameUpdate branch from 5dab7d9 to affd362 Compare September 22, 2017 20:30
Copy link
Member

@mikemurray mikemurray left a comment

Choose a reason for hiding this comment

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

Seems to work well, just have two instances of single quotes that need to be doubled.

});
};

if (!account.name || _.get(account, 'profile.addressBook.length', 0) === 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Double quotes on strings.

});
};
// update the name when there is no name or the user updated his only shipping address
if (!account.name || _.get(account, 'profile.addressBook.length', 0) <= 1) {
Copy link
Member

Choose a reason for hiding this comment

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

Double quotes.

@spencern
Copy link
Contributor

spencern commented Oct 2, 2017

@mikemurray can you fix those quote issues in this PR so we can merge?

@mikemurray mikemurray merged commit ad581db into reactioncommerce:marketplace Oct 3, 2017
@spencern spencern mentioned this pull request Oct 11, 2017
@Akarshit Akarshit deleted the bugfix-userNameUpdate branch February 23, 2021 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants