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

add helper that removes non default addresses #3938

Closed
wants to merge 3 commits into from
Closed

add helper that removes non default addresses #3938

wants to merge 3 commits into from

Conversation

gibkigonzo
Copy link
Collaborator

Short description and why it's useful

We can have maximum two addresses. One billing and one shipping. So if someone creates account, add shipping address (default_shipping) and tried to edit it before this fix #3921 then he can't add company address which is billing address ( default_billing). So this change ensure that we don't have any address that is neither billing or shipping address. (which is invalid one, that could be added before PR: 3921).

This is error which we get if there are already two addresses (one shipping and one without any flag).

{"code":500,"result":[{"keyword":"maxItems","dataPath":".customer.addresses","schemaPath":"#/properties/customer/properties/addresses/maxItems","params":{"limit":2},"message":"should NOT have more than 2 items"}]}

Which environment this relates to

Check your case. In case of any doubts please read about Release Cycle

  • Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
  • RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
  • Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility and no breaking changes)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change

Contribution and currently important rules acceptance

Copy link
Collaborator

@pkarw pkarw left a comment

Choose a reason for hiding this comment

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

It would be rather better to support multiple addresses rather than limiting the user just to two :) can we change it?

Reference: https://github.com/aureatelabs/vsf-address-book

@andrzejewsky
Copy link
Contributor

@pkarw this PR probably will be closed as this is something that we discussed with @gibkigonzo - I'll text you on slack about the details.

@gibkigonzo
Copy link
Collaborator Author

Ok, I didn't thought that there can be more addresses (and that there is plugin for that :D ) I will close this and check if previous pr #3921 still allow for more addresses then 2

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