Closed
Description
Preconditions (*)
1.magento 2.4-develop
2.php7.2
3.mariadb 10.1.37
Steps to reproduce (*)
See my screenshot. The same shopping cart has different shipping methods through web pages and graphql.
Expected result (*)
available_shipping_methods should contain three shipping methods
Actual result (*)
available_shipping_methods and selected_shipping_method get the same shipping method
Additional info from engcom
If there is a cart with added product in it and the Shipping Address is set
The following query
setShippingMethodsOnCart(
input: {
cart_id: "7gTbC717fEjlvQmKIgPgWQaOJ1xOzziD",
shipping_methods: [
{
carrier_code: "tablerate"
method_code: "bestway"
}
]
}
) {
cart {
shipping_addresses {
available_shipping_methods{
amount{
currency
}
available
carrier_code
carrier_title
method_code
method_title
}
selected_shipping_method {
carrier_code
carrier_title
method_code
method_title
amount {
currency
}
}
}
}
}
}
will return
"data": {
"setShippingMethodsOnCart": {
"cart": {
"shipping_addresses": [
{
"available_shipping_methods": [
{
"amount": {
"currency": "USD"
},
"available": true,
"carrier_code": "tablerate",
"carrier_title": "Best Way",
"method_code": "bestway",
"method_title": "Table Rate"
}
],
"selected_shipping_method": {
"carrier_code": "tablerate",
"carrier_title": "Best Way",
"method_code": "bestway",
"method_title": "Table Rate",
"amount": {
"currency": "USD"
}
}
}
]
}
}
}
}
The same in available_shipping_methods
and in selected_shipping_method
But the cart query
query {
cart(
cart_id: "7gTbC717fEjlvQmKIgPgWQaOJ1xOzziD"
) {
shipping_addresses {
available_shipping_methods {
available
amount {
currency
}
carrier_code
carrier_title
method_code
method_title
}
}
items {
product {
name
}
}
}
}
Returns all three available Shipping methods
{
"data": {
"cart": {
"shipping_addresses": [
{
"available_shipping_methods": [
{
"available": true,
"amount": {
"currency": "USD"
},
"carrier_code": "freeshipping",
"carrier_title": "Free Shipping",
"method_code": "freeshipping",
"method_title": "Free"
},
{
"available": true,
"amount": {
"currency": "USD"
},
"carrier_code": "flatrate",
"carrier_title": "Flat Rate",
"method_code": "flatrate",
"method_title": "Fixed"
},
{
"available": true,
"amount": {
"currency": "USD"
},
"carrier_code": "tablerate",
"carrier_title": "Best Way",
"method_code": "bestway",
"method_title": "Table Rate"
}
]
Metadata
Metadata
Labels
GraphQLThe issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentIndicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branch