Conversation
src/guides/v2.3/graphql/tutorials/checkout/checkout-add-product-to-cart.md
Outdated
Show resolved
Hide resolved
src/guides/v2.3/graphql/tutorials/checkout/checkout-add-product-to-cart.md
Outdated
Show resolved
Hide resolved
| - As a guest user who does not create an account | ||
|
|
||
| The **10-step tutorial** generally takes **30 minutes**. | ||
| The 10-step tutorial generally takes 30 minutes. |
There was a problem hiding this comment.
Revert. The highlighting is part of the tutorial template.
| 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). | ||
|
|
||
| * Install a GraphQl client. You can use any GraphQl client to send calls to Magento. [GraphiQL](https://electronjs.org/apps/graphiql) is recommended. | ||
| - In the Magento admin, create a coupon that will be used in [Step 7. Apply a coupon]({{page.baseurl}}/graphql/tutorials/checkout/checkout-coupon.html). |
There was a problem hiding this comment.
Add a link to merchdocs. Also, this isn't the most important bullet item. Delete the "Find the merchant documentation" item and replace it with this one.
src/guides/v2.3/graphql/tutorials/checkout/checkout-customer.md
Outdated
Show resolved
Hide resolved
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Add these back. They're the closing marks for the data and top-level` objects. Also I think the lack of blank line afterward is causing the display problems in GH.
src/guides/v2.3/graphql/tutorials/checkout/checkout-billing-address.md
Outdated
Show resolved
Hide resolved
src/guides/v2.4/graphql/tutorials/checkout/checkout-shipping-method.md
Outdated
Show resolved
Hide resolved
src/guides/v2.4/graphql/tutorials/checkout/checkout-shipping-method.md
Outdated
Show resolved
Hide resolved
…t-to-cart.md Co-authored-by: Kevin Harper <keharper@users.noreply.github.com>
Co-authored-by: Kevin Harper <keharper@users.noreply.github.com>
|
|
||
| Sign in as a customer to the website using the email `john.doe@example.com` and password `b1b2b3l@w+`. You should be successfully logged in. | ||
|
|
||
| [Authorization tokens]({{page.baseurl}}/graphql/authorization-tokens.html) describes the mutation further. |
There was a problem hiding this comment.
Move this line to be above "Verify this step"
| ## Create a new shipping address | ||
|
|
||
| The following mutation adds a shipping address to the quote. | ||
| In this step, we use the `createCustomerAddress` mutation to add a shipping address to the customer record. Then we can use it in the cart. |
There was a problem hiding this comment.
In the bulleted list at the beginning of the topic, change "Add" to "Create". Also, delete the second bullet. Maybe wordsmith the intro a bit to say the tutorial shows two ways to set a shipping address.
There was a problem hiding this comment.
We've broken the tutorial. We don't describe how to set the shipping address for a guest.
|
|
||
| For **Rule Information**: | ||
|
|
||
| - Rule Name: Watch Coupon |
There was a problem hiding this comment.
Make all the field names bold.
| **Request:** | ||
|
|
||
| ```text | ||
| ```graphql |
There was a problem hiding this comment.
In the last line of the topic, the right parenthesis is missing.
Co-authored-by: Kevin Harper <keharper@users.noreply.github.com>
| setShippingAddressesOnCart( | ||
| input: { | ||
| cart_id: "{ CART_ID }" | ||
| cart_id: "{{ CART_ID }}" |
There was a problem hiding this comment.
Remove a set of braces. With a double set, Jekyll thinks CART_ID is a varaible, which renders as a blank.
Also, insert a region_id and set save_in_address_book to true.
There was a problem hiding this comment.
That's from trying to get variables working in Altair.
| ## Add a new billing address | ||
|
|
||
| The following mutation adds a new billing address. `{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html). | ||
| Similar to the previous step, we will add a billing address to the customer. `{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html). In this example, the `default_billing` parameter is set to `true`. The street address is also different, so we can see that different addresses are being created. |
There was a problem hiding this comment.
Get rid of everything but adding a billing address to the cart, so the procedure is the same for guests and customers.
The shipping and billing addresses are now different. That's OK, but be sure to mention that.
|
Hi @dobooth, thank you for your contribution! |
|
Hi @dobooth, thank you for your contribution! |
keharper
left a comment
There was a problem hiding this comment.
A couple of nits, but the setShippingAddressOnCart response needs to be expanded.
| } | ||
| ``` | ||
|
|
||
| ## Add Authorization header |
There was a problem hiding this comment.
| ## Add Authorization header | |
| ## Specify an Authorization header |
| If using guest checkout, run the following example. | ||
|
|
||
| `{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html). | ||
| If using a logged in customer, send the customer's authorization token in the `Authorization` parameter of the header. See [Authorization tokens]({{page.baseurl}}/graphql/authorization-tokens.html) for more information. |
There was a problem hiding this comment.
The response needs to include the available_shipping_methods object. Add it after the country object
available_shipping_methods{
carrier_code
carrier_title
method_code
method_title
}
}
| `{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html). | ||
|
|
||
| {:.bs-callout .bs-callout-info} | ||
| The `carrier_code` and `method_code` values come from the results of the mutation on the previous step. |
There was a problem hiding this comment.
It's currently missing from the tutorial. This should link to the shipping address step
| carrier_code: "ups" | ||
| method_code: "GND" | ||
| carrier_code: "tablerate" | ||
| method_code: "bestway" |
There was a problem hiding this comment.
The alignment is off here
|
running tests |
|
Hi @dobooth, thank you for your contribution! |
Purpose of this pull request
This pull request (PR) enhances and fixes the GraphQL tutorial.
It clarifies steps, adds instructions for creating a coupon and other markup fixes.
Affected DevDocs pages
whatsnew
Simplified and updated the GraphQL tutorial.