Magento2: Shipping Rate Quote Fails

Created on 4 Oct 2016  路  11Comments  路  Source: magento/magento2

Disappearing shipping quote on shipping address form

Preconditions

  1. Magento CE 2.1
  2. UPS Shipping

Steps to reproduce

  1. Add product to cart
  2. Click checkout in mini cart
  3. Complete Shipping Address form
  4. Select shipping method
  5. Press next
  6. Click on banner to go back to home page
  7. Click checkout in mini cart

Expected result

  1. Form automatically filled in
  2. Shipping quote displayed

Actual result

  1. Form automatically filled in
  2. shipping quote appears then disappears
Checkout Shipping Fixed in 2.1.x Format is valid needs update bug report

Most helpful comment

I ran into this issue, as well. saw the corresponding patch in the other issue #6564. However that didn't work either.

after digging in it looks like a typo of sorts in Magento_Customer/js/address-converter.js

changing

addressData.region = {
    region_id: addressData.region_id,
    region_code: addressData.region_code,
    region: regionName
};

to (notice: regionId vs region_id)

addressData.region = {
    region_id: addressData.regionId,
    region_code: addressData.regionCode,
    region: regionName
};

resolved it for now

All 11 comments

Currently having this issue on 2.1.3.

var/debug.log (with debugging turned on for the UPS XML type) is showing that the full State name (Missouri) is being sent instead of its corresponding code (MO) for the destination address.

This isn't a problem with the non-XML UPS type, so it seems to definitely be a bug.

This seems to be related to this issue: https://github.com/magento/magento2/issues/6564

I ran into this issue, as well. saw the corresponding patch in the other issue #6564. However that didn't work either.

after digging in it looks like a typo of sorts in Magento_Customer/js/address-converter.js

changing

addressData.region = {
    region_id: addressData.region_id,
    region_code: addressData.region_code,
    region: regionName
};

to (notice: regionId vs region_id)

addressData.region = {
    region_id: addressData.regionId,
    region_code: addressData.regionCode,
    region: regionName
};

resolved it for now

Hello,

I confirm the issue. It fix the problem for me too.

Thanks!

The problem is NOT fixed for me. Very frustrated.
6 Months later still no fix...

To Recap I have updated the 3 files mentioned in 2 posts here:

address-converter.js
new-customer-address.js
shipping-rates-validator.js

Even after updating these files still UPS quotes show up for 2 seconds and then all disappear on the checkout page.

`Florida01

<ShipFrom>
  <Address>
      <PostalCode>32905</PostalCode>
      <CountryCode>US</CountryCode>
      **<StateProvinceCode>FL</StateProvinceCode>**
  </Address>
</ShipFrom>

<Package>
  <PackagingType><Code>00</Code></PackagingType>
  <PackageWeight>
     <UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement>
    <Weight>2</Weight>
  </PackageWeight>
</Package><RateInformation><NegotiatedRatesIndicator/></RateInformation>  </Shipment>

',
'result' => '
Rating and Service1.00FailureHard111286Florida is not a valid state for the specified shipment.',
) {"is_exception":false} []`

I also tried fix on #6875 and this solved nothing either.

`after digging in it looks like a typo of sorts in Magento_Customer/js/address-converter.js

changing

addressData.region = {
region_id: addressData.region_id,
region_code: addressData.region_code,
region: regionName
};

to (notice: regionId vs region_id)

addressData.region = {
region_id: addressData.regionId,
region_code: addressData.regionCode,
region: regionName
};
`

Isn't the problem related to a mistake in the UPS module rather then general shipping info files above? Right now using UPS XML with M2 is impossible. Why cannot anyone fix this? Its impossible to bring a site Live if using UPS.

@dhob68 Is this issue still actual? We were not able to reproduce it on ver. 2.1.7

Yes, still a problem on 2.1.7 Here is a link to a video that shows what happens. https://youtu.be/jPI2R7jlb7k

It is still broke. I have to use a 3rd party checkout because they do not seem to want to fix this bug. Almost 9 months now..sigh.

@dhob68 , could you please provide some more information?

  • UPS method settings (without credentials of course)
  • and examples of origin and departure addresses, like country, state, zip code

Origin

  • Country: USA
  • State: Pennsylvnia
  • Zip: 15668
  • City: Murrysville

Departure

  • Any in USA

UPS Settings

  • Enabled for Checkout: Yes
  • UPS Type: UPS XML
  • Live Account: Yes
  • Access License Number: *
  • Gateway XML URL: https://onlinetools.ups.com/ups.app/xml/Rate
  • Mode: Live
  • User ID: *
  • Origin of the Shipment: United States
  • Password: *
  • Title: United Parcel Service
  • Enable Negotiated Rates: Yes
  • Packages Request Type: Divide to equal weight
  • Shipper Number: *
  • Container: Customer Packaging
  • Weight Unit: LBS
  • Tracking XML URL: https://www.ups.com/ups.app/xml/Track
  • Destination Type: Residential
  • Maximum Package Weight: 18
  • Pickup Method: Regular Daily Pickup
  • Minimum Package Weight: 0.1
  • Calculate Handling Fee: Fixed
  • Handling Applied: Per order
  • Handling Fee: 2.00
  • Allowed Methods: UPS Standard, UPS Ground
  • Free Method: None
  • Free Shipping Amount Threshold: Disable
  • Ship to Applicable Countries: Specific Counties
  • Ship to Specific Countries: USA
  • Show Method if Not Applicable: No
  • Debug: No

Hi, @dhob68. Thank you, we know about this problem and it has already been fixed, you will get a fix in the upcoming release.
Here is the pull request that solves the problem: https://github.com/magento/magento2/pull/9485.

Fixed in https://github.com/magento/magento2/pull/9485 Thank you @rachkulik

Was this page helpful?
0 / 5 - 0 ratings