Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPS Shipping broke at the checkout page #6564

Closed
perfpcs opened this issue Sep 10, 2016 · 9 comments
Closed

UPS Shipping broke at the checkout page #6564

perfpcs opened this issue Sep 10, 2016 · 9 comments
Assignees
Labels
bug report Component: Shipping Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@perfpcs
Copy link

perfpcs commented Sep 10, 2016

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.

@perfpcs
Copy link
Author

perfpcs commented Sep 10, 2016

`',

'result' => '

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

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

@perfpcs
Copy link
Author

perfpcs commented Sep 19, 2016

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>

@alena-marchenko
Copy link

Hi @perfpcs

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

@alena-marchenko alena-marchenko added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 20, 2016
mmansoor-magento pushed a commit that referenced this issue Oct 19, 2016
[Folks] Bugs
- MAGETWO-58334 [Github] Free shipping is not applied if cart price rule match #6584
- MAGETWO-57278 For Dutch locale, ZIP in checkout is already giving out a "validation failed" error at page load
- MAGETWO-57675 [GITHUB] WYSIWYG editor does not show. #6222 #4828 #6815
- MAGETWO-56836 [FT] Update wishlist button doesn't receive the click in AddProductsToCartFromCustomerWishlistOnFrontendTest
- MAGETWO-54412 [MERCHANT] Integrity Constraint Violation when creating orders #4580
- MAGETWO-58730 [Github] Incorrect province code sent on Checkout to UPS #6564
@SerhiyShkolyarenko
Copy link
Contributor

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

@perfpcs
Copy link
Author

perfpcs commented Oct 19, 2016

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

@Ctucker9233
Copy link

@SerhiyShkolyarenko is there a commit reference?

@franckgarnier21
Copy link

franckgarnier21 commented Feb 22, 2017

I still have the same problem with Magento 2.1.4

Fixed with this related post : #6875

@perfpcs
Copy link
Author

perfpcs commented Mar 12, 2017

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.

@hamdrew
Copy link

hamdrew commented May 11, 2017

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

magento-team pushed a commit that referenced this issue Jul 28, 2017
… UPS #6564 - for 2.1

- MAGETWO-70727: [GitHub] Shipping method randomly dissapear when page refreshed for 2.1 #7497
magento-team pushed a commit that referenced this issue Jul 28, 2017
… UPS #6564 - for 2.1

- MAGETWO-70727: [GitHub] Shipping method randomly dissapear when page refreshed for 2.1 #7497
magento-team pushed a commit that referenced this issue Jul 28, 2017
… UPS #6564 - for 2.1

- MAGETWO-70727: [GitHub] Shipping method randomly dissapear when page refreshed for 2.1 #7497
magento-team pushed a commit that referenced this issue Jul 28, 2017
… UPS #6564 - for 2.1

- MAGETWO-70727: [GitHub] Shipping method randomly dissapear when page refreshed for 2.1 #7497
magento-engcom-team pushed a commit that referenced this issue Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Shipping Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

7 participants