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

selected_shipping_method received twice even if multishipping was disabled #508

Closed
TomashKhamlai opened this issue Mar 21, 2019 · 3 comments

Comments

@TomashKhamlai
Copy link
Contributor

TomashKhamlai commented Mar 21, 2019

Preconditions (*)

There were lot of settings. Write a comment if not reproducible

  1. Setup Magento to support all the shipping methods or at least UPS

Steps to reproduce (*)

  1. Generate Customer token
  2. Create empty cart
  3. Set shipping address on empty cart
  4. Try to set any shipping method and get the error
  5. Add simple product to cart with qty 7
  6. Try to set the next shipping method
mutation {
  setShippingMethodsOnCart(
    input: {
      cart_id: "{{ YOUR VALUE }}"
      shipping_methods: {
        cart_address_id: {{ YOUR VALUE }}
        carrier_code: "ups"
        method_code: "GND"
      }
    }
  ) {
    cart {
      shipping_addresses {
        selected_shipping_method {
          carrier_code
          method_code
          label
          amount
        }
        available_shipping_methods {
          carrier_title
          method_title
          price_incl_tax
          base_amount
          price_excl_tax
          amount
        }
      }
    }
  }
}
  1. Disable Multishipping
  2. Examine the cart:
query {
  cart(cart_id: "{{ YOUR VALUE }}")
  {
    shipping_addresses {
      selected_shipping_method {
        carrier_code
        method_code
      }
    }
  }
}

Expected result (*)

  1. selected_shipping_method only once
{
  "data": {
    "cart": {
      "shipping_addresses": [
        {
          "selected_shipping_method": {
            "carrier_code": ups,
            "method_code": GND
          }
        }
      ]
    }
  }
}

Actual result (*)

  1. selected_shipping_method only twice
{
  "data": {
    "cart": {
      "shipping_addresses": [
        {
          "selected_shipping_method": {
            "carrier_code": null,
            "method_code": null
          }
        },
        {
          "selected_shipping_method": {
            "carrier_code": "ups",
            "method_code": "GND"
          }
        }
      ]
    }
  }
}
@TomashKhamlai TomashKhamlai added bug Something isn't working Component: QuoteGraphQl labels Mar 21, 2019
@TomashKhamlai
Copy link
Contributor Author

Not a bug

@TomashKhamlai TomashKhamlai reopened this Mar 21, 2019
@TomashKhamlai TomashKhamlai changed the title selected_shipping_method received twice selected_shipping_method received twice even if multishipping was disabled Mar 21, 2019
@TomashKhamlai
Copy link
Contributor Author

TomashKhamlai commented Mar 21, 2019

Just a good test case for future checks of #404. @naydav, please verify that Customer can set any number of addresses on preparing cart for checkout and please prepare some expectations for the case when Multishipping was disabled unexpectedly for Customers

@TomashKhamlai TomashKhamlai added the QA in progress We are checking label Apr 22, 2019
@naydav
Copy link
Contributor

naydav commented Apr 24, 2019

We could not consider that is a bug. State of the system was changed during checkout workflow.

@naydav naydav closed this as completed Apr 24, 2019
@naydav naydav removed the bug Something isn't working label Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants