Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

save_in_address_book has no impact on Address Book #509

Closed
TomashKhamlai opened this issue Mar 21, 2019 · 3 comments
Closed

save_in_address_book has no impact on Address Book #509

TomashKhamlai opened this issue Mar 21, 2019 · 3 comments
Labels
bug Something isn't working Checkout Component: QuoteGraphQl Contribution Day Tickets is good for start on Contribution Day good first issue Good for newcomers

Comments

@TomashKhamlai
Copy link
Contributor

TomashKhamlai commented Mar 21, 2019

Preconditions (*)

Steps to reproduce (*)

  1. Create customer without address from Storefront
  2. Generate Customer Token
  3. Create empty cart
  4. Add simple product
  5. Set address on cart but use save_in_address_book: true
mutation {
  setShippingAddressesOnCart(
    input: {
      cart_id: "{{ YOUR VALUE }}"
      shipping_addresses: {
        address: {
          firstname: "John"
          lastname: "Doubledo"
          street: "6161 West Centinela Avenue"
          telephone: "+15555555555"
          country_code: "us"
          save_in_address_book: true
          city: "Culver city"
        }
      }
    }
  ) {
    cart {
      shipping_addresses {
        address_id
        
        selected_shipping_method {
          carrier_code
          method_code
          label
          amount
        }
        available_shipping_methods {
          carrier_code
          method_code
          price_incl_tax
          base_amount
          price_excl_tax
          amount
        }
      }
    }
  }
}
  1. Verify that Customer address was saved and can be used on Storefront

Expected result (*)

Address is in Address book

Actual result (*)

No Address is in Address book

Also, save_in_address_book field should be NOT required (according to
#583)

@XxXgeoXxX
Copy link
Member

Hi, @TomashKhamlai
I am not sure that this behavior is a bug, because I saw saved address in "quote_address" table.
After check on frontend - address saved in address book when order was placed.
Maybe we need some clarification about your steps and about default behaviour

@TomashKhamlai
Copy link
Contributor Author

@XxXgeoXxX, were you able to set region_id in Step 5? #592

I tried this way:

mutation {
  setShippingAddressesOnCart(
    input: {
      cart_id: "kyBqpZRDTTyiOLQTwndJGpqi37vhoWpO"
      shipping_addresses: {
        address: {
          firstname: "John"
          lastname: "Doubledo"
          street: "6161 West Centinela Avenue"
          telephone: "+15555555555"
          postcode: "90230"
          region: "12"
          country_code: "us"
          save_in_address_book: true
          city: "Culver city"
        }
      }
    }
  ) {
    cart {
      shipping_addresses {
        address_id
        postcode
        region {
          
          code
          label
        }
        
        selected_shipping_method {
          carrier_code
          method_code
          label
          amount
        }
        available_shipping_methods {
          carrier_code
          method_code
          price_incl_tax
          base_amount
          price_excl_tax
          amount
        }
      }
    }
  }
}
address_id quote_id created_at updated_at customer_id save_in_address_book customer_address_id address_type email prefix firstname middlename lastname suffix company street city region region_id postcode country_id telephone fax same_as_billing collect_shipping_rates shipping_method shipping_description weight subtotal base_subtotal subtotal_with_discount base_subtotal_with_discount tax_amount base_tax_amount shipping_amount base_shipping_amount shipping_tax_amount base_shipping_tax_amount discount_amount base_discount_amount grand_total base_grand_total customer_notes applied_taxes discount_description shipping_discount_amount base_shipping_discount_amount subtotal_incl_tax base_subtotal_total_incl_tax discount_tax_compensation_amount base_discount_tax_compensation_amount shipping_discount_tax_compensation_amount base_shipping_discount_tax_compensation_amnt shipping_incl_tax base_shipping_incl_tax vat_id vat_is_valid vat_request_id vat_request_date vat_request_success validated_country_code validated_vat_number gift_message_id free_shipping
189 47 2019-04-15 17:27:20 NULL 3 1 NULL shipping [email protected] NULL John NULL Doubledo NULL NULL 6161 West Centinela Avenue Culver city 12 NULL 90230 us +15555555555 NULL 0 1 flatrate_flatrate Flat Rate - Fixed 1.0000 10.0000 10.0000 10.0000 10.0000 0.0000 0.0000 5.0000 5.0000 0.0000 0.0000 0.0000 0.0000 15.0000 15.0000 NULL [] NULL 0.0000 0.0000 10.0000 10.0000 0.0000 0.0000 0.0000 NULL 5.0000 5.0000 NULL NULL NULL NULL NULL NULL NULL NULL 0

But actually there is no Customer with id 3 in customer_address_entity. Can you confirm it?

@naydav
Copy link
Contributor

naydav commented Apr 24, 2019

Confirm that bug is present.
We don't have any logic for processing save_in_address_book input

Also, need to create the corresponding test

@naydav naydav changed the title Couldn't verify that save_in_address_book has impact on Address Book save_in_address_book has no impact on Address Book Apr 24, 2019
@naydav naydav added good first issue Good for newcomers Contribution Day Tickets is good for start on Contribution Day and removed Component: CustomerGraphQl labels Apr 24, 2019
@VitaliyBoyko VitaliyBoyko self-assigned this May 1, 2019
@naydav naydav added the Checkout label May 2, 2019
@naydav naydav added this to the Release: 2.3.3 milestone May 2, 2019
@VitaliyBoyko VitaliyBoyko self-assigned this May 8, 2019
@kisroman kisroman self-assigned this Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Checkout Component: QuoteGraphQl Contribution Day Tickets is good for start on Contribution Day good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants