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

Setting shipping method for shopping cart (single address shipping) #211

Merged
merged 15 commits into from
Nov 15, 2018

Conversation

rogyar
Copy link
Contributor

@rogyar rogyar commented Oct 14, 2018

Description (*)

This PR introduces mutation for setting shipping method for a shopping cart. Also, this PR contains GraphQL schema for working with different checkout operations (setting billing and shipping addresses etc.)

Fixed Issues (if relevant)

#386

Manual testing scenarios (*)

  1. Create an empty shopping cart and add some products to the shopping cart
  2. Use the following query (with the corresponding shopping cart id) to set a shipping method:
mutation {
  setShippingMethodsOnCart(input: 
    {
      cart_id: "fda39cfe15aabde6d3c362cb3878de5s", 
      shipping_methods: [
        {
          shipping_method_code: "bestway"
          shipping_carrier_code: "tablerate"
          cart_address_id: 275
        }
      ]}) {
    
    cart {
      cart_id,
      addresses {
        firstname
        lastname
        company
        address_type
        city
        street
        region {
          code
          label
        }
        postcode
        country {
          code
          label
        }
        
        selected_shipping_method {
          code
          label
        }
      }
    }
  }
}

@keharper
Copy link
Contributor

Documentation completed in magento/devdocs#4502

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants