Skip to content

Commit ba75eda

Browse files
committed
magento/devdocs#: GraphQl Checkout Tutorial
1. Made corrections for setShippingMethodsOnCart regarding magento/graphql-ce#609
1 parent ec245f1 commit ba75eda

File tree

1 file changed

+0
-76
lines changed

1 file changed

+0
-76
lines changed

guides/v2.3/graphql/tutorials/checkout/checkout-shipping-method.md

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -16,83 +16,9 @@ contributor_link: https://www.atwix.com/
1616

1717
`setShippingMethodsOnCart` mutation query is using to define a shipping method for your order and requires the next input parameters:
1818
- `cart_id`
19-
- `cart_address_id`
2019
- `carrier_code`
2120
- `method_code`
2221

23-
### Get `cart_address_id` and available shipping methods
24-
25-
Use `cart` query to retrieve `cart_address_id` and available shipping methods for your quote.
26-
27-
**Request**
28-
```text
29-
query {
30-
cart (cart_id: "{{ CART_ID }}") {
31-
shipping_addresses {
32-
address_id
33-
available_shipping_methods {
34-
amount
35-
base_amount
36-
carrier_code
37-
carrier_title
38-
error_message
39-
method_code
40-
method_title
41-
price_excl_tax
42-
price_incl_tax
43-
}
44-
}
45-
}
46-
}
47-
```
48-
49-
where
50-
`{{ CART_ID }}` - shopping cart unique ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html).
51-
52-
**Response**
53-
54-
```json
55-
{
56-
"data": {
57-
"cart": {
58-
"shipping_addresses": [
59-
{
60-
"address_id": 937,
61-
"available_shipping_methods": [
62-
{
63-
"amount": 5,
64-
"base_amount": 5,
65-
"carrier_code": "flatrate",
66-
"carrier_title": "Flat Rate",
67-
"error_message": "",
68-
"method_code": "flatrate",
69-
"method_title": "Fixed",
70-
"price_excl_tax": 5,
71-
"price_incl_tax": 5
72-
},
73-
{
74-
"amount": 9.9,
75-
"base_amount": 9.9,
76-
"carrier_code": "ups",
77-
"carrier_title": "United Parcel Service",
78-
"error_message": "",
79-
"method_code": "GND",
80-
"method_title": "Ground",
81-
"price_excl_tax": 9.9,
82-
"price_incl_tax": 9.9
83-
}
84-
]
85-
}
86-
]
87-
}
88-
}
89-
}
90-
```
91-
92-
In the next tutorial steps value of `address_id` field - `937` will be mentioned as `{{ CART_SHIPPING_ADDRESS_ID }}`.
93-
94-
### Specify shipping method for your order
95-
9622
**Request**
9723

9824
The following mutation query assigns UPS "Ground" method.
@@ -103,7 +29,6 @@ mutation {
10329
cart_id: "{{ CART_ID }}"
10430
shipping_methods: [
10531
{
106-
cart_address_id: {{ CART_SHIPPING_ADDRESS_ID }}
10732
carrier_code: "ups"
10833
method_code: "GND"
10934
}
@@ -124,7 +49,6 @@ mutation {
12449

12550
where
12651
`{{ CART_ID }}` - shopping cart unique ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html).
127-
`{{ CART_SHIPPING_ADDRESS_ID }}` - shipping address ID from the query above.
12852

12953
**Response**
13054

0 commit comments

Comments
 (0)