owebia / magento2-module-advanced-shipping

Other
91 stars 29 forks source link

Shipping Method Pre-selection Causes Error on Checkout #116

Closed KhaledBinAmir closed 1 year ago

KhaledBinAmir commented 1 year ago

Hello, I am currently using the Owebia Magento2 Advanced Shipping module for a project. It's working great, but I have run into an issue on the checkout page. Here's a brief description of the problem:

Description of the issue: When a customer inputs their address data, the shipping method is automatically pre-selected, which does not immediately display the shipping cost in the checkout total. However, when the customer attempts to select a payment method, Magento returns an error message: "The shipping address is missing. Set the address and try again."

Even though the checkout page shows the shipping method as pre-selected, the user must manually select the shipping method again for the process to work correctly.

ezgif-1-226ddce462

Implications of the issue: This has led to a poor user experience as customers cannot complete the checkout process unless they reselect the shipping method, despite it appearing as if it's already been selected. This issue has also resulted in incomplete transactions, which could potentially impact sales.

Expected behavior: When a shipping method is pre-selected, the shipping cost should be immediately visible in the checkout total. The customer should be able to proceed to payment selection without any additional interaction with the shipping method selection.

According to the Magento documentation here: https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/set-payment-method/, this error occurs because the setPaymentMethodOnCart mutation is run before setShippingAddressesOnCart. As such, it appears that the shipping address should be set first to resolve this issue.

Can you please look into this and provide a fix or a workaround? Your assistance is greatly appreciated.

owebia commented 1 year ago

Hi,

This is not related to Advanced Shipping module. You should ask the company that created your checkout module.

Best Regards, A.L.