Closed
Description
Preconditions (*)
- 2.3.2(2.3-develop) Magento Commerce or Open Source
- Amasty Conditions module installed (cannot reproduce with vanilla m2 because this)
- PHP 7.2.21
Steps to reproduce (*)
- On the checkout, the component
Amasty_Conditions/js/action/recollect-totals
makes a call to/V1/guest-carts/:cartId/totals-information
which passes through Magento\Checkout\Model\TotalsInformationManagement - In this model the following:
$quote->getShippingAddress()->setCollectShippingRates(true)->setShippingMethod(
$addressInformation->getShippingCarrierCode() . '_' . $addressInformation->getShippingMethodCode()
);
is 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 - so setShippingMethod('_')
happens in effect.
3. This then means that validation for the shipping method is bypassed.
4. An order can then be placed without shipping information/carrier
Expected result (*)
- If the address info has the shipping carrier and/or method code set to null, the
setShippingMethod
should not be called and the quote total is returned without setting a shipping code pair
Actual result (*)
- When a address info instance is submitted with shipping codes set to null, a method is set with label
_
and zero value, meaning an order can be placed without a valid shipping method.
Metadata
Metadata
Assignees
Labels
Issue is caused by one of the bundled extensionsThe issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.3 releaseIssue related to Developer Experience and needs help with Triage to Confirm or Reject it