Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1d365b

Browse files
committed
checkpoint
1 parent d58bdc6 commit a1d365b

File tree

9 files changed

+42
-49
lines changed

9 files changed

+42
-49
lines changed

src/_data/toc/graphql.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -358,28 +358,25 @@ pages:
358358
- label: In-store pickup tutorial
359359
url: /graphql/tutorials/inventory/index.html
360360

361-
- label: Step 1. Generate the customer token
362-
url: /graphql/tutorials/inventory/isp-customer-token.html
363-
364-
- label: Step 2. Create an empty cart
361+
- label: Step 1. Create an empty cart
365362
url: /graphql/tutorials/inventory/isp-shopping-cart.html
366363

367-
- label: Step 3. Add products to the cart
364+
- label: Step 2. Add products to the cart
368365
url: /graphql/tutorials/inventory/isp-add-product-to-cart.html
369366

370-
- label: Step 4. Search for in-store pickup locations
367+
- label: Step 3. Search for in-store pickup locations
371368
url: /graphql/tutorials/inventory/isp-search-pickup-locations.html
372369

373-
- label: Step 5. Set the shipping address
370+
- label: Step 4. Set the shipping address
374371
url: /graphql/tutorials/inventory/isp-shipping-address.html
375372

376-
- label: Step 6. Set the billing address
373+
- label: Step 5. Set the billing address
377374
url: /graphql/tutorials/inventory/isp-billing-address.html
378375

379-
- label: Step 7. Set the payment method
376+
- label: Step 6. Set the payment method
380377
url: /graphql/tutorials/inventory/isp-payment-method.html
381378

382-
- label: Step 8. Place the order
379+
- label: Step 7. Place the order
383380
url: /graphql/tutorials/inventory/isp-place-order.html
384381

385382
- label: Release Notes
30.2 KB
Loading

src/guides/v2.4/graphql/tutorials/inventory/index.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@ functional_areas:
1212
- Integration
1313
---
1414

15-
This tutorial builds upon the [Order Processing with Inventory Management]({{page.baseurl}}/rest/tutorials/inventory/index.html) REST tutorial to demonstrate the In-Store Pickup feature. In-store pickup allows a shopper to place an order online and collect from a physical store. The shopper selects the store from a list of locations that are within the specified radius of a postal code or city.
15+
This tutorial builds upon the [Order Processing with Inventory Management]({{page.baseurl}}/rest/tutorials/inventory/index.html) REST tutorial to demonstrate the In-Store Pickup feature. In-store pickup allows a shopper to place an order online and collect it from a physical store. The shopper selects the store from a list of locations that are within the specified radius of a city or postal code.
1616

17-
The Order Processing with Inventory Management tutorial configures several entities that make this tutorial possible:
17+
The Order Processing with Inventory Management REST tutorial configures several entities that make this GraphQL tutorial possible:
1818

1919
* A fully-defined customer
2020
* A set of sources, some of which are designed as pickup locations
2121
* Several products that have been assigned to these sources
2222

23-
{:.bs-callout-info}
24-
To be eligible for in-store pickup, a product must be assigned to a custom stock. See <Merchdoc x-ref>.
25-
2623
The **8-step tutorial** generally takes **30 minutes**.
2724

2825
### Before you begin
@@ -31,20 +28,18 @@ Complete the following prerequisites:
3128

3229
* Install a Magento 2.4 instance with sample data.
3330

34-
The sample data defines a functional store, called Luma, that sells fitness clothing and accessories. The store does not provide any sandbox accounts for testing credit card payments, so transactions will be simulated using an offline [payment method](https://glossary.magento.com/payment-method).
31+
The sample data defines a functional store, called Luma, that sells fitness clothing and accessories. The store does not provide any sandbox accounts for testing credit card payments, so transactions will be simulated using an offline [payment method](https://glossary.magento.com/payment-method).
3532

3633
* Work through the [Order Processing with Inventory Management]({{page.baseurl}}/rest/tutorials/inventory/index.html) REST tutorial.
3734

3835
* Install a GraphQl client. You can use any GraphQl client to send calls to Magento. [GraphiQL](https://electronjs.org/apps/graphiql) is recommended.
3936

40-
* Learn about GraphQL, how it works, and how to use it. See [Introduction to GraphQL](https://graphql.org/learn/) for details.
41-
4237
* Know how to generate a customer token. See [Authorization tokens]({{page.baseurl}}/graphql/authorization-tokens.html) for details.
4338

44-
* Find the Magento Merchant documentation. Refer to [Getting Started with {{site.data.var.ce}}](http://docs.magento.com/m2/ce/user_guide/getting-started.html) for information about the Luma store that is created when you install Magento with the sample data.
45-
4639
### Other resources
4740

41+
* [Managing Inventory](https://docs.magento.com/user-guide/catalog/inventory-management.html) in the _Magento User Guide_ describes Inventory Management and the in-store pickup feature.
42+
4843
* [GraphQL checkout tutorial]({{page.baseurl}}/graphql/tutorials/checkout/index.html) demonstrates the process that a logged-in customer or guest use to place an order.
4944

50-
* [REST Tutorials]({{ page.baseurl }}/rest/tutorials/index.html) provides additional information about completing any Magento REST tutorial.
45+
* [REST Tutorials]({{ page.baseurl }}/rest/tutorials/index.html) provide demonstrations of other workflows using REST endpoints.

src/guides/v2.4/graphql/tutorials/inventory/isp-add-product-to-cart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
layout: tutorial
33
group: graphql
4-
title: Step 3. Add products to the cart
4+
title: Step 2. Add products to the cart
55
subtitle: GraphQL In-store pickup tutorial
66
level3_subgroup: graphql-inventory
77
return_to:
88
title: GraphQL Overview
99
url: graphql/index.html
10-
menu_order: 30
10+
menu_order: 20
1111
functional_areas:
1212
- Integration
1313
---
1414

1515
GraphQL supports all product types, but this tutorial only demonstrates how to add simple products to the shopping cart.
1616

17-
`{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/inventory/isp-add-product-to-cart.html).
17+
`{ CART_ID }` is the unique shopping cart ID from [Step 1. Create empty cart]({{ page.baseurl }}/graphql/tutorials/inventory/isp-add-product-to-cart.html).
1818

1919
The following mutation adds two simple products, 24-WB01 and 24-WB03, to the shopping cart.
2020

src/guides/v2.4/graphql/tutorials/inventory/isp-billing-address.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ query {
4040
{
4141
"data": {
4242
"customer": {
43-
"default_billing": "4"
43+
"default_billing": "2"
4444
}
4545
}
4646
}
4747
```
4848

4949
## Set the billing address
5050

51-
Now that we have the value of the `default_billing` attribute, we can set the billing address. The `{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/inventory/isp-add-product-to-cart.html).
51+
Now that we have the value of the `default_billing` attribute, we can set the billing address.
5252

5353
**Headers:**
5454

5555
`Authorization: Bearer <customer token>`
5656

57-
`Store: us`
57+
`Store: default`
5858

5959
**Request:**
6060

@@ -64,7 +64,7 @@ mutation {
6464
input: {
6565
cart_id: "{ CART_ID }"
6666
billing_address: {
67-
customer_address_id: "4"
67+
customer_address_id: 2
6868
}
6969
}
7070
) {

src/guides/v2.4/graphql/tutorials/inventory/isp-payment-method.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
layout: tutorial
33
group: graphql
4-
title: Step 7. Set the payment method
4+
title: Step 5. Set the payment method
55
subtitle: GraphQL In-store pickup tutorial
66
level3_subgroup: graphql-inventory
77
return_to:
88
title: GraphQL Overview
99
url: graphql/index.html
10-
menu_order: 70
10+
menu_order: 50
1111
functional_areas:
1212
- Integration
1313
---
@@ -16,8 +16,6 @@ You must always set a payment method for an order.
1616

1717
Use the following `cart` query to determine which payment methods are available for your order.
1818

19-
`{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/inventory/isp-add-product-to-cart.html).
20-
2119
**Headers:**
2220

2321
`Authorization: Bearer <customer token>`

src/guides/v2.4/graphql/tutorials/inventory/isp-search-pickup-locations.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
---
22
layout: tutorial
33
group: graphql
4-
title: Step 4. Search for in-store pickup locations
4+
title: Step 3. Search for in-store pickup locations
55
subtitle: GraphQL In-store pickup tutorial
66
level3_subgroup: graphql-inventory
77
return_to:
88
title: GraphQL Overview
99
url: graphql/index.html
10-
menu_order: 40
10+
menu_order: 30
1111
functional_areas:
1212
- Integration
1313
---
1414

15-
Assuming all physical products the customer selected are eligible for in-store pickup, Magento displays the "Pick in Store" option on the checkout page. Use the [`pickupLocations` query]({{page.baseurl}}/) to return a list of places the customer can pick up their order.
15+
Assuming all physical products the customer selected are eligible for in-store pickup, when the shopper goes to the checkout page, the Luma storefront displays the **Pick in Store** tab and shipping method, as shown below.
16+
17+
![Pick in Store tab]({{site.baseurl}}/common/images/graphql/in-store-pickup.png)
18+
19+
When a logged-in customer clicks on the **Pick in Store** tab, Magento displays the closest location, based on the customer's default address. The customer can also select alternate locations. Guests do not have a pre-selected location, but they can select one.
20+
21+
Use the [`pickupLocations` query]({{page.baseurl}}/) to return a list of places the customer can pick up their order.
1622

1723
The example below search for locations that are in a 50 km radius of the US ZIP code 10101. The query returns three stores, listed in proximity to the specified ZIP code.
1824

src/guides/v2.4/graphql/tutorials/inventory/isp-shipping-address.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
layout: tutorial
33
group: graphql
4-
title: Step 5. Set the shipping address
4+
title: Step 4. Set the shipping address
55
subtitle: GraphQL In-store pickup tutorial
66
level3_subgroup: graphql-inventory
77
return_to:
88
title: GraphQL Overview
99
url: graphql/index.html
10-
menu_order: 50
10+
menu_order: 40
1111
functional_areas:
1212
- Integration
1313
---
@@ -16,8 +16,6 @@ When the customer selects a location for in-store pickup, you must provide the a
1616

1717
In the following example, the customer has chosen to pick up the order at the Brooklyn store. The shipping address for this store was defined in the [Order Processing with Inventory Management]({{page.baseurl}}/rest/tutorials/inventory/index.html) tutorial.
1818

19-
`{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/inventory/isp-add-product-to-cart.html).
20-
2119
**Headers:**
2220

2321
`Authorization: Bearer <customer token>`
@@ -107,8 +105,4 @@ mutation {
107105

108106
## Verify this step {#verify-step}
109107

110-
1. Sign in as a customer to the website using the email `[email protected]` and password `Password1`.
111-
112-
1. Go to Checkout.
113-
114-
1. On the Shipping step, the pickup location is displayed.
108+
This step cannot be verified from the Admin.

src/guides/v2.4/graphql/tutorials/inventory/isp-shopping-cart.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
---
22
layout: tutorial
33
group: graphql
4-
title: Step 2. Create an empty cart
4+
title: Step 1. Create an empty cart
55
subtitle: GraphQL In-store pickup tutorial
66
level3_subgroup: graphql-inventory
77
return_to:
88
title: GraphQL Overview
99
url: graphql/index.html
10-
menu_order: 20
10+
menu_order: 10
1111
functional_areas:
1212
- Integration
1313
---
1414

15+
{:.bs-callout-info}
16+
This tutorial assumes that you have already created a customer. If you have not, see [Authorization tokens]({{page.baseurl}}/graphql/authorization-tokens.html) for details about creating a customer.
17+
1518
The [`customerCart` query]({{page.baseurl}}/graphql/queries/customer-cart.html) returns the active cart for the logged-in customer. If the cart does not exist, the query creates one. You must specify the customer’s authorization token in the headers. Otherwise, the query fails. ["Get customer authorization token"]({{ page.baseurl }}/graphql/get-customer-authorization-token.html) describes describes these tokens.
1619

17-
The customer created in the REST tutorial does not have an active cart. The following query creates an empty cart and returns the cart ID. You must specify the customer’s authorization token in the headers of the call.
20+
The customer does not have an active cart. The following query creates an empty cart and returns the cart ID. You must specify the customer’s authorization token in the headers of the call.
1821

1922
**Headers:**
2023

2124
`Authorization: Bearer <customer token>`
2225

23-
`Store: us`
26+
`Store: default`
2427

2528
**Request:**
2629

@@ -38,7 +41,7 @@ The customer created in the REST tutorial does not have an active cart. The foll
3841
{
3942
"data": {
4043
"customerCart": {
41-
"id": "AhO82AZbXTuLZF6KsRjQz2jf0GwCHcjc"
44+
"id": "AGRqP1L4VifCX9qqJO7KBKo1zAkvJrYZ"
4245
}
4346
}
4447
}

0 commit comments

Comments
 (0)