vuestorefront / magento2

Vue Storefront 2 integration for Magento 2
https://docs.vuestorefront.io/magento
MIT License
171 stars 118 forks source link

[Checkout] Incorrect shipping method price displayed in order summary #451

Closed sync-by-unito[bot] closed 2 years ago

sync-by-unito[bot] commented 2 years ago

Expected

Correct shipping method price should be displayed in order summary on last step of checkout

Actual

Incorrect shipping method is being displayed

!shipping_method_price.png|width=828,height=268!

!shipping_price_order_summary.png|width=826,height=226!

Steps to reproduce

  1. Add product to cart
  2. Proceed through checkout to shipping section
  3. Insert shipping address for United States, California, and click "Select shipping method"
  4. Pick a shipping method with price higher than 0$
  5. Proceed to the last step of checkout
  6. Verify shipping price in order summary

┆Attachments: image-20220125-073753.png | image-20220125-101919.png | image-20220125-102023.png | image-20220127-160756.png | image-20220127-161937.png | Screenshot 2022-01-28 at 08.03.39.png | shipping_method_price.png | shipping_price_order_summary.png

sync-by-unito[bot] commented 2 years ago

➤ Kevin Gorjan commented:

Igor Wojciechowski

I can’t reproduce this

I only receive “Flat Rate“ as an option. Do I need to add a specific product?

sync-by-unito[bot] commented 2 years ago

➤ Kevin Gorjan commented:

Igor Wojciechowski I added “Free Shipping“, but it has the same issue. If I selected first “Flat Rate“, I see 5 dollar But when I change later to “Free“, it still gives me 5 dollars instead of free

But you still can take a look at why I don't see “Table Rates“ Thanks

sync-by-unito[bot] commented 2 years ago

➤ Marcin Kwiatkowski commented:

Deploying: https://github.com/vuestorefront/magento2/actions/runs/1739962413 ( https://github.com/vuestorefront/magento2/actions/runs/1739962413|smart-link )

sync-by-unito[bot] commented 2 years ago

➤ Igor Wojciechowski commented:

Kevin Gorjan Seems like the issue is with Best Way shipping method. Could you please chose United States, California as a shipping address? It should enable the Best Way option.

sync-by-unito[bot] commented 2 years ago

➤ Kevin Gorjan commented:

Igor Wojciechowski With the fix I made, it seems to work when I select US and California. So you can test this on the DEV

!image-20220125-073753.png|width=948,height=702!

sync-by-unito[bot] commented 2 years ago

➤ Igor Wojciechowski commented:

Checked on https://demo-magento2-canary.europe-west1.gcp.storefrontcloud.io/ ( https://demo-magento2-canary.europe-west1.gcp.storefrontcloud.io/|smart-link ) and locally Result: ❎

!image-20220125-102023.png|width=83.33333333333333%!

!image-20220125-101919.png|width=83.33333333333333%!

sync-by-unito[bot] commented 2 years ago

➤ Igor Wojciechowski commented:

Still getting $0.00 for Best Way option 😞 Moving to Todo Kevin Gorjan

sync-by-unito[bot] commented 2 years ago

➤ Kevin Gorjan commented:

Hi Igor Wojciechowski

I took my magnifier and pipe🕵️‍♂️ and had another look at this issue. The problem is here (and I think this is an issue coming from Magento)

This is in Magento FE

!image-20220127-160756.png|width=961,height=771!

So this is correct, the shipping method for Table Rate is zero dollar.

But when I ask through GraphQL the shipping methods, I get this as response when we pass the shipping-address

!image-20220127-161937.png|width=1095,height=411!

So in the shipping methods on VSF, we see the 15 dollar price, but soon as it updates the cart, you get the “correct” price. Like in the default Magento FE

I’m looking for a solution…

sync-by-unito[bot] commented 2 years ago

➤ Marcin Kwiatkowski commented:

Kevin Gorjan Igor Wojciechowski there is a cart price rule configured and because of that the shipping is free.

!Screenshot 2022-01-28 at 08.03.39.png|width=1745,height=976!

sync-by-unito[bot] commented 2 years ago

➤ Kevin Gorjan commented:

Marcin Kwiatkowski Igor Wojciechowski But this means Magento is giving me the wrong prices when I fetch the shipping methods?

sync-by-unito[bot] commented 2 years ago

➤ Marcin Kwiatkowski commented:

In Luma price on the shipping method step is correct, so if the price rule is applied, there is a 0$ for the best way shipping method. We need to check if we have the wrong price and it is a problem on our side or on the Magento API side.

sync-by-unito[bot] commented 2 years ago

➤ Kevin Gorjan commented:

Marcin Kwiatkowski Igor Wojciechowski

I researched this with a BE developer.

It seems there is a bug in Magento’s GraphQL. It skips the price rules for shipping and some cart rules.

We can’t continue with this unless Magento fixes this (or we)

sync-by-unito[bot] commented 2 years ago

➤ Marcin Kwiatkowski commented:

To do here: add information to our docs

sync-by-unito[bot] commented 2 years ago

➤ Marcin Kwiatkowski commented:

Closing, because this is not an issue on the VSF side.