Open ntmhung opened 1 year ago
Hi @ntmhung. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
@magento give me 2.4-develop
HI, Please provide patch to us so we continue to use UPS as shipping method
This is a major S0 issue that Adobe will need to address in the immediate future.
The immediate impact is that starting this coming Monday, June 5 2023, merchants will no longer be able to add UPS rates to Magento. UPS will no longer generate any XML API keys, which Magento requires.
The long-term impact is that as of June 2024, every merchant that uses Magento's native UPS rate connector will no longer get rates from UPS. This has a high probability of breaking checkout, as most US merchants do not offer multiple parcel shipment providers.
Until this is resolved in Magento core, Merchants have the option of switching to a third party provider for their UPS rates, but that involves additional costs and setup. That's not an acceptable solution in the broad picture. See eg. https://twitter.com/saas_boss/status/1664354635346243585
Hello @rhoerr,
Adobe team is working on a solution for new 2.4.6 customers. All the current 2.4.4, 2.4.5 and 2.4.6 customers who are currently using the XML API gateway to get shipping rates from UPS are not affected and can continue utilize this API till its EOL in June 2024. Adobe Commerce 2.4.7 will come with upgraded UPS REST API instead.
Great, thank you for the info @chernenm . Will look forward to that in the 2.4.7 release coming up soon.
Plz give link of any 3rd party that giving ups with Magento
On Fri, 2 Jun 2023, 23:08 Ryan Hoerr, @.***> wrote:
This is a major S0 issue that Adobe will need to address in the immediate future.
The immediate impact is that starting this coming Monday, June 5 2023, merchants will no longer be able to add UPS rates to Magento. UPS will no longer generate any XML API keys, which Magento requires.
The long-term impact is that as of June 2024, every merchant that uses Magento's native UPS rate connector will no longer get rates from UPS. This has a high probability of breaking checkout, as most US merchants do not offer multiple parcel shipment providers.
Until this is resolved in Magento core, Merchants have the option of switching to a third party provider for their UPS rates, but that involves additional costs and setup. That's not an acceptable solution in the broad picture.
— Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/37534#issuecomment-1574089907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3VJ3B53BUYX7O5MM5DJALXJIQK7ANCNFSM6AAAAAAYNFKIWY . You are receiving this because you commented.Message ID: @.***>
Seriously, this is not a joke! Something needs to be done about this, now. There is no point in using Magento if it can't calculate shipping. If this doesn't get fixed soon, I foresee a mass exodus from Magento.
hello @ihaveathumb, @techguysourav, Please check the official UPS extension at Magento marketplace https://marketplace.magento.com/ups-shipping.html while Adobe is working on a solution for out of the box integration.
@chernenm Is the message at the top of that extension listing still applicable?
IMPORTANT NOTE: This extension is currently available for merchants in POLAND, FRANCE, UNITED KINGDOM, GERMANY, ITALY, SPAIN, NETHERLANDS and BELGIUM ONLY. It will be available for merchants in other countries soon. At this time, please only install this extension if you are in the above-mentioned countries.
Also, when will 2.4.7 with the UPS REST API be released? There's not currently any published release date for 2.4.7, which suggests it won't be until sometime in 2024. That's cutting it close for the many merchants that will need to update.
Thanks
hi @rhoerr,
The API update is planed to be included into 2.4.7-beta2 version which scheduled for October 2023. In addition we are working on a hotfix for new 2.4.6 customers and ensuring that UPS extension documentation is up to date at Magento marketplace.
hello @ihaveathumb, @techguysourav, Please check the official UPS extension at Magento marketplace https://marketplace.magento.com/ups-shipping.html while Adobe is working on a solution for out of the box integration.
That doesn't work for me, because I'm not in the very few countries that it supports.
This is an issue as UPS will no longer generate keys and the extension on marketplace isn't for the USA! So if you don't have keys then no UPS on your Magento site. Not good at all.
Can you still generate keys on UPS as I have not been able to?
Hello, @maxq,
Adobe is currently working on the solution for this issue, we will be releasing a hotfix for 2.4.4, 2.4.5 and 2.4.6 customers.
When, though? This is taking way too long for an issue that you knew far ahead of time was going to happen!!!
On Thu, Aug 3, 2023, 5:29 PM chernenm @.***> wrote:
Hello, @maxq https://github.com/maxq,
Adobe is currently working on the solution for this issue, we will be releasing a hotfix for 2.4.4, 2.4.5 and 2.4.6 customers.
— Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/37534#issuecomment-1664670248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQJYIRNP2OENNRYNMIDBOTXTQJ35ANCNFSM6AAAAAAYNFKIWY . You are receiving this because you were mentioned.Message ID: @.***>
Is there any update on this?
Hello @joemstar,
The fix will be published tomorrow, September 14 around noon CST at https://experienceleague.adobe.com/docs/commerce-knowledge-base/kb/overview.html?lang=en
Thank you @chernenm! That's good to see.
@chernenm for 2.4.3-p1 patch is applying?
hello @laconica-vasilij, the patch is only applicable for supported versions of Adobe Commerce and Magento Open Source which are 2.4.4+
Applied the patch, anyone know how to get credentials from UPS?
Applied the patch, anyone know how to get credentials from UPS?
Look at the instructions https://developer.ups.com/get-started. You need to create an application to receive API keys
Their API signup is so bad you go through all the steps then get this. There is a non-technical issue with your request, in order to resolve it you will need to complete and submit the requested information. [Click Here to Resolve] so you click on it and get HTTP 400 bad request.
See this stuff so much nowadays wonder who's coding this stuff.
Also love this little gem.
Did this work for anyone? I applied patch to 2.4.5 but getting an error
I pin pointed the issue and it looks like its related to the fact that response is not sending any shipping codes like the following.
Instead response from UPS is coming back as this
Which does not match up with anything that we have in Magento
@timur-gafarov-acadaca I have tried to reproduced this on 2.4.5 on both local and cloud instance to be sure, but the issue is not there . I see the UPS methods with shipping rates.
The codes that you are seeing are the UPS Rating API response that we get back after the rating request, here is a chunked sample from response:
"RatedShipment": [ { "Disclaimer": { "Code": "05", "Description": "Rate excludes VAT. Rate includes a fuel surcharge, but excludes taxes, duties and other charges that may apply to the shipment." }, "Service": { **"Code": "01",** "Description": "" }, "RatedShipmentAlert": [ { "Code": "119001", "Description": "Additional Handling has automatically been set on Package 1." }, { "Code": "110971", "Description": "Your invoice may vary from the displayed reference rates" } ], "BillingWeight": { "UnitOfMeasurement": { "Code": "LBS", "Description": "Pounds" }, "Weight": "100.0" }, "TransportationCharges": { "CurrencyCode": "USD", "MonetaryValue": "321.11" }, "ServiceOptionsCharges": { "CurrencyCode": "USD", "MonetaryValue": "32.50" }, "TotalCharges": { "CurrencyCode": "USD", "MonetaryValue": "353.61" }, "NegotiatedRateCharges": { "TotalCharge": { "CurrencyCode": "USD", "MonetaryValue": "181.75" } }, "GuaranteedDelivery": { "BusinessDaysInTransit": "1", "DeliveryByTime": "10:30 A.M." }, "RatedPackage": { "TransportationCharges": { "CurrencyCode": "USD", "MonetaryValue": "321.11" }, "ServiceOptionsCharges": { "CurrencyCode": "USD", "MonetaryValue": "32.50" }, "TotalCharges": { "CurrencyCode": "USD", "MonetaryValue": "353.61" }, "Weight": "100.0", "BillingWeight": { "UnitOfMeasurement": { "Code": "LBS", "Description": "Pounds" }, "Weight": "100.0" } } }]
The Allowed methods are the methods that are mapped with the response codes under the UPS module using a helper configuration. Please explain your concern if any regarding the codes and give us the steps on how the issue is coming for you.
@glo05363 I was doing testing in admin, so possibly only admin is broken. Can you pls also try placing order via Admin?
@timur-gafarov-acadaca I have checked using admin interface and i can see the Rates data, Please check your configuration settings .
@glo05363 I double checked the code and pretty sure there is a bug somewhere. Via XDEBUG I found the place where UPS codes are being compared with local Magento codes.
vendor/magento/module-ups/Model/Carrier.php:1346
Here its looking for 01 code in the list of Magento codes that don't map to this format. In this screenshot you can see values of allowed methods array which stores codes differently in alphanumeric format.
Configuration settings look fine as I am able to get a similar response from UPS like you pasted before. The problem is that its not getting processed correctly and possibly skipping process that you mentioned related to Helper mapper. Please make sure that your patch is applied and that settings are in fact using the new REST authentication method.
@timur-gafarov-acadaca Yes i am using the new REST method and patch is applied, The helper mapping is working fine. I suggest you give me your admin config settings details and the steps you are following once . Also check shipping.log file once .
@glo05363 we found the issue. Its related to allowed method.
To reproduce the issue:
Its working fine for us when we use system value but we have to allow only 4 method types in this scenario.
Also we ship only to specific countries. Most of them are available but some are not. So you can also select specific country like below in case error is not thrown.
I just finished implementing this today and got everything working correctly. Here are some things I found and how I set it up.
First, you have to go to https://developer.ups.com/ and create an app. Log in to the developer site and click the person icon on the top right and select "Apps". Click "Add Apps" and fill out all the info. Next, make sure to at least add Authorization(O Auth) and Rating. Give your app a name and callback URL I left blank. The Client ID is the User ID and the Client Secret is Password in the Magento UPS configuration.
When the origin of shipment drop-down is changed there is a stopObserving which makes the values not convert properly to the core_config database. The values stored in the DB should be 01, 02, 03 not 1DML, 1DA, 1DAL, etc. If you already had them set and you didn't change values and just run the code everything will work but if you go in the admin and change and save, it will store the wrong allowed method codes and you will not show any quotes. I changed both stopObserving to observe in \vendor\magento\module-ups\view\adminhtml\templates\system\shipping\carrier_config.phtml
from:
Event.stopObserving($('carriers_ups_origin_shipment'), 'change', this.changeOriginShipment.bind(this));
to:
Event.observe($('carriers_ups_origin_shipment'), 'change', this.changeOriginShipment.bind(this));
After this change when you change origin of shipment in the admin, it should change the allowed methods below and populate them with the numeric code and not the letter abbreviation in the database.
I made a new module for UPS because I needed Surepost functionality. Surepost requires you to have it enabled on your account so you can not just add it without first getting approval. Surepost has to be its own API call and can not be combined with a normal rating request. The default code supports sending just one service code to rate but I am not sure where it is used. I tried using what was there already but if you send just one service code UPS will not return. There is typo that makes it not work. If you are trying to send a request for just one service you need to change the following in Model/Carrier.php:
From:
$rateParams['RateRequest']['Shipment']['Service']['code']
To:
$rateParams['RateRequest']['Shipment']['Service']['Code']
Changing the case of code to Code, solves the issue.
If you do only send one request the JSON response that returns is in a different format. You will need to modify _parseRestResponse to check this and put it into an array so the rest of the code will work. I changed this:
$arr = $rateResponseData['RateResponse']['RatedShipment'] ?? [];
to this:
if (isset($rateResponseData['RateResponse']['RatedShipment']['Service']['Code']))
$arr = array($rateResponseData['RateResponse']['RatedShipment']) ?? [];
else
$arr = $rateResponseData['RateResponse']['RatedShipment'] ?? [];
There is no documentation on how to get a Surepost quote from UPS so I am leaving it here for others that might need it. You have to set the following:
$params['10_action'] = 'Rate';
$rateParams['RateRequest']['Request']['RequestOption'] = "Rate";
$rateParams['RateRequest']['Shipment']['Service']['Code'] = "93";
$rateParams['RateRequest']['Shipment']['Service']['Description'] = "UPS Surepost";
Code 93 is for Surepost 1lb and over so you have to make sure the weight is at least 1. If it is less than 1, you need to quote service code 92 or just round up the weight to 1. The unit also has to be LBS, if it's under 1 you have to change the service code to 92, convert the lbs to ounces, and set it OZS instead of LBS.
"PackageWeight" => [ "UnitOfMeasurement" => [ "Code" => "LBS" ],
- The documentation for the UPS API left a lot of details out so some of it was trial and error. Hopefully, this helps others looking to do the same thing.
I just finished implementing this today and got everything working correctly. Here are some things I found and how I set it up.
- First, you have to go to https://developer.ups.com/ and create an app. Log in to the developer site and click the person icon on the top right and select "Apps". Click "Add Apps" and fill out all the info. Next, make sure to at least add Authorization(O Auth) and Rating. Give your app a name and callback URL I left blank. The Client ID is the User ID and the Client Secret is Password in the Magento UPS configuration.
How long have you created an application on the developer portal? Because I have a problem like @maxq (comment)
I just finished implementing this today and got everything working correctly. Here are some things I found and how I set it up.
- First, you have to go to https://developer.ups.com/ and create an app. Log in to the developer site and click the person icon on the top right and select "Apps". Click "Add Apps" and fill out all the info. Next, make sure to at least add Authorization(O Auth) and Rating. Give your app a name and callback URL I left blank. The Client ID is the User ID and the Client Secret is Password in the Magento UPS configuration.
How long have you created an application on the developer portal? Because I have a problem like @maxq (comment)
I tried setting up a new app and I do not see this error or even it asking for a position title. You might want to try contacting UPS API support at uoltects@ups.com. I called for support and they are only reachable by email but can answer more detailed questions on implementation.
@glo05363 Can above be incorporated into the patch? I don't know if you are the person who was working on it originally but the fact that you can't choose specific shipping methods in configs is a big part of missing functionality as most merchants do choose limited number of those and without being able to do that, this patch is not helpfull.
@timur-gafarov-acadaca I have looked into this issue today and it is reproducible to me after following the steps given by you. I see the solution provided by @dazz397 but the issue is not populating the numbered or lettered codes, it is about populating the correct allowed methods on the basis of "XML" or "REST". I am working on it and will provide you with the solution in the patch. let me update here again first thing tomorrow about the patch.
@timur-gafarov-acadaca we have created the patch files for 2.4.5, 2.4.4 and 2.4.6 respectively with the changes on the allowed method issue. To give a brief on the issue : when we were changing the UPS Type to : UPS, XML or REST the allowed methods options were populating for cgi UPS [default] and for XML [the number codes] but not for the REST type as we were using the default cgi methods in the case of REST as well while it required the same method options of SOAP. By changing the following in case of REST from:
Event.stopObserving($('carriers_ups_origin_shipment'), 'change', this.changeOriginShipment.bind(this));
this.changeOriginShipment(null, 'default');
to
Event.observe($('carriers_ups_origin_shipment'), 'change', this.changeOriginShipment.bind(this));
this.changeOriginShipment(null, null);
it will work fine and the origin of shipment dropdown will also work as expected showing the methods as required. patch files will be available soon.
Thank you @glo05363, appreciate a quick turn around!
Having the same issue with the current patch. Have UPS account for REST. Error "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.", so not working correctly.
Having the same issue with the current patch. Have UPS account for REST. Error "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.", so not working correctly.
@Film54 The new patches are not yet released. Once released we will inform here as well.
New version of the patches have just been released today https://experienceleague.adobe.com/docs/commerce-knowledge-base/kb/troubleshooting/known-issues-patches-attached/ups-shipping-method-integration-migration-from-soap-to-restful-api.html They are fully compatible with the previous patches and can be applied on top.
You can try to use PHP SDK by AbanteCart team. See repo https://github.com/abantecart/ups-php for details. There example how to obtain access token in the readme.md
Thank you @glo05363! That fixed my issue.
Everyone using ups shipping now can use below enhanced shipping plugin auto address validation
https://commercemarketplace.adobe.com/ecomplugins-upsrest.html
Their API signup is so bad you go through all the steps then get this. There is a non-technical issue with your request, in order to resolve it you will need to complete and submit the requested information. [Click Here to Resolve] so you click on it and get HTTP 400 bad request.
See this stuff so much nowadays wonder who's coding this stuff.
Also love this little gem.
I'm getting the same error. How long did it take you to resolve this issue? I submitted the form half a month ago, but still stuck here.
We can do it for you. If you share your UPS account details then we will do in just 50 USD. Contact me at https://www.ecomplugins.com/index.php?route=information/contact
We can't sign up as well, so we've not been able to offer UPS as a shipping option for.... when did this start... 8 months ago?
Add me on skype at vipin1211987 for any discussion.
We can't sign up as well, so we've not been able to offer UPS as a shipping option for.... when did this start... 8 months ago?
In one discussion, four people were blocked by UPS and found it hard to pass through even after providing the required information. Great UPS!
Description
My client has informed me that starting from June 5, 2023, UPS no longer issues new access keys. UPS is going to change to use Oauth 2.0.
I think the magento/module-ups module should be updated to meet the requirement. It needed to be done before June 5, 2023. This is the API document https://developer.ups.com/api/reference#operation/GenerateToken.
Expected behavior
The magento/module-ups supports using the OAuth security model from UPS.
Benefits
It will help new users planning to use the UPS shipping method connect to the UPS API after June 5, 2023.
Additional information
No response
Release note
No response