Magento2: Table Rates shipping method does not update checkout

Created on 26 Oct 2016  路  13Comments  路  Source: magento/magento2

Changing the shipping address on checkout does not make Table Rate method to update.

Preconditions

  1. Magento 2.1.2 with sample data
  2. PHP 7.0.12 and MySQL 5.6
  3. Chrome 54 and Firefox 49

    Steps to reproduce

  4. Disable all shipping methods but leave Table Rates enabled

  5. Import in Table Rates one rate for some non-default country like Afghanistan:
    AFG,_,_,0.0000,15.0000
  6. Add Simple product to cart
  7. Go to checkout and fill the checkout form, set Country to United States if it is not already selected
  8. Shipping methods will update showing "Sorry, no quotes are available for this order at this time"
  9. Now change Country to Afghanistan

    Expected result

  10. Shipping methods should update displaying Table Rate method

    Actual result

  11. Shipping methods block does not update and show the same "Sorry, no quotes are available for this order at this time" text even if correct country is selected: http://prntscr.com/cz8dd2

Comment: if you refresh checkout page having Afghanistan selected the shipping method will display, proving that Table Rates was configured correctly.

Checkout Fixed in 2.1.x Format is valid Ready for Work bug report

All 13 comments

I am mainly posting this to confirm that others are seeing this problem too and first poster is not alone. Tested from multiple locations and computers

Preconditions:

  • on our development site
  • Magento 2.1.2 without sample data
  • php 7.0.11
  • MySQL 5.6.25
  • We use flat rate ship table.

Steps to reproduce:

1) clear cache

2) add to cart

3) check out

4) type in a test shipping address

Expected Result

Shipping rate showing 100% of the time.

Actual Result

Shipping rate showing (sometimes...25% of the time...the rate shows correctly but 75% of the time it does not). Refresh should be automatic but the only way to get shipping rate is to press refresh in browser

More Information

Here's what a 3rd party told us:

I just tested this in Chrome and on the first test I received a shipping quote of

$9.75 UPS

once I passed the Country field in the left hand column.

However, it did not work after the 2nd test, and it did not work when I tested in firefox. The first time the refresh occurred once I passed the country field, and that refresh was not triggered on subsequent attempts.

Live site is fine:

No problem with current live site which is on 2.0.7 running with php 7.0.11 and MySQL 5.6.25

Hi, thank you for your reporting. Internal ticket was created MAGETWO-60340

Hey, having the same issue here too,, any workarounds?

( Using Amasty Table rates plugin )

It's likely this issue is related to the shipping carrier validation for tablerates.

You'll see from excerpt of shipping method validation below that the region, postcode and country are required fields for this carrier. As such shipping rates will only update when all three fields are present.
In this case, the validation is too stringent for your shipping rate table - which requires only country.

Validation for address fields (perhaps excluding country) should be "required" = false so they are used to determine whether to refresh rates but if not present, will not prevent rates being returned.
define( [], function () { "use strict"; return { getRules: function() { return { 'postcode': { 'required': true }, 'country_id': { 'required': true }, 'region_id': { 'required': true }, 'region_id_input': { 'required': true } }; } }; } );

any update here?

Hi, also the same problem with version 2.1.4. Anyone a workaround?

Hi. Any updates on this?

2.1.5 same problem. Table rates never showing, wildcard on country and region. Postnumber defined. Giving no shipping alternatives what so ever.

Same problem, any work around?

@Turv I've used the following patch:

--- /a/app/code/Magento/OfflineShipping/view/frontend/web/js/model/shipping-rates-validation-rules/tablerate.js
+++ /b/app/code/Magento/OfflineShipping/view/frontend/web/js/model/shipping-rates-validation-rules/tablerate.js
@@ -13,16 +13,16 @@
         getRules: function () {
             return {
                 'postcode': {
-                    'required': true
+                    'required': false
                 },
                 'country_id': {
-                    'required': true
+                    'required': false
                 },
                 'region_id': {
-                    'required': true
+                    'required': false
                 },
                 'region_id_input': {
-                    'required': true
+                    'required': false
                 }
             };
         }

I used @vovayatsyuk patch to make it work again, although I only had to disable postcode validation.

@Kasoi-free, thank you for your report.
The issue is already fixed in 2.1.0

Same issue is there in Magento ver. 2.1.9 for Australian zip codes

Country | Region/State | Zip/Postal Code | Order Subtotal (and above) | Shipping Price
-- | -- | -- | -- | --
AUS | * | 3000 | 200 | 200

Was this page helpful?
0 / 5 - 0 ratings