Magento2: UPS Shipping broke at the checkout page

Created on 10 Sep 2016  路  9Comments  路  Source: magento/magento2

UPS credentials are all correct. Rates show properly at cart level. At checkout step you can see the UPS rates for about 1-2 seconds and then they disappear and it states no UPS shipping available. If you pick another ship method and then go to payment page, then click on edit the ship method..low and behold UPS is all now there. There appears to be a page load problem with the UPS section and in updating this if you change anything on the checkout page only.

Preconditions

  1. Magento 2.1.1 (It worked fine in M2.1)
  2. Apache/2.4.6 (CentOS)
  3. PHP 7.0.8
  4. Mariadb 10.1

Steps to reproduce

  1. Add any state/zip at cart and UPS rates show fine
  2. Go to checkout..rates show briefly then disappear
  3. Pick another method and go to payment page.
  4. Pick edit ship method from payment page. UPS now all shows up!

Expected result

  1. UPS rates should show on initial checkout page load

Actual result

  1. Log Error :
    ',

'result' => '

Rating and Service1.00FailureHard111286Florida is not a valid state for the specified shipment.',

) {"is_exception":false} []

Screenshots:
ups1
ups2
ups3

Hope this is all you need. Same settings worked fine on 2.1. Ever since 2.1.1 update this issue has occured.

Shipping Ready for Work bug report

Most helpful comment

So here it is 6 months later and this issue still is not resolved??? How can people be using Magento 2 and UPS XML service?? Surely I am not the only one using this. I cannot understand how this cannot be corrected after all this time.

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.

All 9 comments

`',

'result' => '

Rating and Service1.00FailureHard111286Florida is not a valid state for the specified shipment.',

) {"is_exception":false} []`
log

Any update to this?

This looks like a bug of the one step checkout extension. It sends the state name to API incorrectly.
When you are on the cart page Magento sends state as 2-char code "FL" to API, and it works.
When you are on one step checkout it sends full name "Florida", and it won't work.
This is the only difference I see in the success/error logs:
Success:
<ShipTo> <Address> <PostalCode>32935</PostalCode> <CountryCode>US</CountryCode> <ResidentialAddress>01</ResidentialAddress> <StateProvinceCode>FL</StateProvinceCode><ResidentialAddressIndicator>01</ResidentialAddressIndicator> </Address> </ShipTo>

Error:
<ShipTo> <Address> <PostalCode>32935</PostalCode> <CountryCode>US</CountryCode> <ResidentialAddress>01</ResidentialAddress> <StateProvinceCode>Florida</StateProvinceCode><ResidentialAddressIndicator>01</ResidentialAddressIndicator> </Address> </ShipTo>

Hi @perfpcs

We've created MAGETWO-58730 internal ticket regarding this issue.
Thank you!

The fix is delivered to develop branch. Closing the issue.
Task for backporting to 2.0.x is MAGETWO-59374.

Hi, So how would I get a fix for my Magento version? Will it be in next release? Thanks

@SerhiyShkolyarenko is there a commit reference?

I still have the same problem with Magento 2.1.4

Fixed with this related post : #6875

So here it is 6 months later and this issue still is not resolved??? How can people be using Magento 2 and UPS XML service?? Surely I am not the only one using this. I cannot understand how this cannot be corrected after all this time.

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.

Disappointing that a completed fix for this major bug is yet to be released!

Was this page helpful?
0 / 5 - 0 ratings