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

Incorrect load of default address in checkout #4682

Closed
1 of 2 tasks
ArturDivante opened this issue Jul 28, 2020 · 1 comment
Closed
1 of 2 tasks

Incorrect load of default address in checkout #4682

ArturDivante opened this issue Jul 28, 2020 · 1 comment
Assignees
Labels
bug Bug reports P3: Normal Priority mark - normal priority VSF1 Issues in regards to VSF1
Milestone

Comments

@ArturDivante
Copy link
Collaborator

ArturDivante commented Jul 28, 2020

Steps to reproduce the issue

  1. Open https://next.storefrontcloud.io/
  2. Prepare an account with existing, filled shipping details, and login to it
  3. Add some products to cart and proceed to checkout
  4. In checkout, click "continue to shipping'

Current behavior

Even though default address checkbox is checked, form is not filled with data, it only contains names and country.

It only gets correctly filled, when we uncheck and check the box again.
Default Address

Expected behavior

Shipping form should be correctly filled at once, if shipping address is available for this account

Version of Vue Storefront

next.storefrontcloud.io

Can you handle fixing this bug by yourself?

  • YES
  • NO

Environment details

  • Browser: Latest Chrome
  • OS: Ubuntu
@ArturDivante ArturDivante added the bug Bug reports label Jul 28, 2020
@pkarw pkarw added P3: Normal Priority mark - normal priority VSF1 Issues in regards to VSF1 labels Jul 29, 2020
@gibkigonzo gibkigonzo added this to the 1.12.3 milestone Jul 30, 2020
@dSurprenant
Copy link

dSurprenant commented Aug 9, 2020

It happen when in the Local Storage you dont have all the appropriate value :

(this is when your not log and never whent to the cart)
image

(this is when you pass the profile and are about to enter details in the shipping forms...)
image

In your Default.vue

inside beforeMount()

Watch the event : 'user-after-loggedin'

call a method with the received data... per exemple : fetchUserData
And dispatch to checkout/saveShippingDetails and checkout/savePaymentDetails the props:value that you need.

EX:

methods: {
    ...
    fetchUserData(receivedData){
       this.$store.dispatch('checkout/saveShippingDetails', {
             //PROPS:VALUE
       })
       this.$store.dispatch('checkout/savePaymentDetails', {
               //PROPS:VALUE
       })
    },
    ...
},
...
beforeMount() {
   ...
   this.$bus.$on('user-after-loggedin', this.fetchUserData);
   ...
},
beforeDestroy () {
   ...
   this.$bus.$off('user-after-loggedin', this.fetchUserData);
   ...
},

Fifciu added a commit that referenced this issue Apr 21, 2021
…of-default-address-in-checkout

fix: load default address in checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports P3: Normal Priority mark - normal priority VSF1 Issues in regards to VSF1
Projects
None yet
Development

No branches or pull requests

5 participants