Closed joe-vortex closed 4 years ago
Hi @joe-vortex. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.3-develop instance
- upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@joe-vortex do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
can be fixed with the following patch:
--- magento/module-checkout/Model/TotalsInformationManagement.php 2019-10-18 13:17:40.275177439 +0100
+++ magento/module-checkout/Model/TotalsInformationManagement.php 2019-10-18 13:17:30.307000000 +0100
@@ -52,9 +52,11 @@
$quote->setBillingAddress($addressInformation->getAddress());
} else {
$quote->setShippingAddress($addressInformation->getAddress());
- $quote->getShippingAddress()->setCollectShippingRates(true)->setShippingMethod(
- $addressInformation->getShippingCarrierCode() . '_' . $addressInformation->getShippingMethodCode()
- );
+ if ($addressInformation->getShippingCarrierCode() && $addressInformation->getShippingMethodCode()) {
+ $quote->getShippingAddress()->setCollectShippingRates(true)->setShippingMethod(
+ $addressInformation->getShippingCarrierCode().'_'.$addressInformation->getShippingMethodCode()
+ );
+ }
}
$quote->collectTotals();
After discussion and investigation, I believe this issue is not specific only for Magento Commerce(EE) and the same problem should be in Open Source(CE) as well. It could be not possible to reproduce it by provided steps without buying the Amasty Conditions module
but from a code perspective, we see the bug.
Confirmed
:white_check_mark: Confirmed by @sdzhepa
Thank you for verifying the issue. Based on the provided information internal tickets MC-22098
were created
Issue Available: @sdzhepa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
thanks @sdzhepa , are you happy for me to make a PR?
Hi @joe-vortex. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
[ ] 1. Add/Edit Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 2. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop
branch, please, add the label Reproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
Hi @joe-vortex. Thank you for your report. The issue has been fixed in magento/magento2#25510 by @joe-vortex in 2.4-develop branch Related commit(s):
The fix will be available with the upcoming 2.4.2 release.
Preconditions (*)
Steps to reproduce (*)
Amasty_Conditions/js/action/recollect-totals
makes a call to/V1/guest-carts/:cartId/totals-information
which passes through Magento\Checkout\Model\TotalsInformationManagementis set, but when a shipping method has not been selected, it will return the quote shipping method with a total of 0 and a name of
_
, because$addressInformation->getShippingCarrierCode()
and method code are null - sosetShippingMethod('_')
happens in effect.Expected result (*)
setShippingMethod
should not be called and the quote total is returned without setting a shipping code pairActual result (*)
_
and zero value, meaning an order can be placed without a valid shipping method.