Replies: 5 comments 10 replies
-
This would mean, that all mutations which use addressInput will also have this flag and in some cases, it would not make sense to have it there. For example, what would happen if I use
In that case, I would expect two separate flags: for shipping and for billing |
Beta Was this translation helpful? Give feedback.
-
Thats the really important part, since preference if address should be saved is done during the checkout process (when setting the address). |
Beta Was this translation helpful? Give feedback.
-
@Air-t To answer the question re adding args to the
|
Beta Was this translation helpful? Give feedback.
-
What is the expected API behavior if someone passes the |
Beta Was this translation helpful? Give feedback.
-
I think we should also test this feature along with validationRules (CheckoutAddressValidationRules): So when checkout input will look like this:
Addresses should be saved after completing the checkout. |
Beta Was this translation helpful? Give feedback.
-
Problem
Making a
checkoutComplete
or finalizing the draft order saves the shipping and billing address to the user's address book by default.1. General Assumptions
There should be a way of changing the default behavior of adding addresses to the user's book. Currently, there is no way to decide if addresses will be stored in the user's address book.
The solution for
Checkout
:saveShippingAddress
and thesaveBillingAddress
flags to theCheckoutCreateInput
(allow for creating).saveAddress
flag to thecheckoutShippingAddressUpdate
(allow for updating).saveAddress
flag to thecheckoutBillingAddressUpdate
(allow for updating).save_billing_address
andsave_shipping_address
to theCheckout
model.The solution for
Order
:saveShippingAddress
and thesaveBillingAddress
flags to theDraftOrderInput
(allow for creating and updating).save_billing_address
andsave_shipping_address
to theOrder
model.2. API changes
Mutations
Inputs
3. Database changes
4. UML diagrams
No response
5. To Do list
checkoutCreateInput
has new fieldssaveBillingAddress
andsaveBillingAddress
DraftOrderInput
has new fieldssaveBillingAddress
andsaveBillingAddress
checkoutShippingAddressUpdate
andcheckoutBillingAddressUpdate
mutations havesaveBillingAddress
andsaveBillingAddress
inputssave_billing_address
andsave_shipping_address
to theCheckout
modelsave_billing_address
andsave_shipping_address
to theOrder
modelNo response
6. To Test
Test Case 1:
checkoutCreate
mutation withsaveShippingAddress
andsaveBillingAddress
allows to choose if the address will be saved to the client's address book.Preconditions:
The client is logged in.
The client's address book is empty.
Test Steps:
checkoutCreate
mutation withsaveShippingAddress
set to true andsaveBillingAddress
set to false.checkoutComplete
mutation.Expected Result:
Test Case 2:
checkoutShippingAddressUpdate
andcheckoutBillingAddressUpdate
mutations allow for switching if the address should be saved or not.Preconditions:
The client is logged in.
The client has previously completed a checkout with a saved shipping address.
Test Steps:
checkoutShippingAddressUpdate
mutation withsaveShippingAddress
set to true.checkoutBillingAddressUpdate
mutation withsaveBillingAddress
set to false.Expected Result:
Test Case 3:
draftOrderCreate
mutation withsaveShippingAddress
andsaveBillingAddress
allows to choose if the address will be saved to the client's address book.Preconditions:
The staff is logged in.
The client's address book is empty.
Test Steps:
draftOrderCreate
mutation withsaveShippingAddress
set to true andsaveBillingAddress
set to false.Expected Result:
Test Case 4:
draftOrderCreate
mutation withsaveShippingAddress
andsaveBillingAddress
allows to choose if the address will be saved to the client's address book. Switch the initial options withdraftOrderUpdate
.Preconditions:
The staff is logged in.
The client's address book is empty.
Test Steps:
draftOrderCreate
mutation withsaveShippingAddress
set to false andsaveBillingAddress
set to true.draftOrderUpdate
mutation withsaveShippingAddress
set to true andsaveBillingAddress
set to false.Expected Result:
Beta Was this translation helpful? Give feedback.
All reactions