Closed
Description
Preconditions (*)
- Fresh Magento 2.3.3
Steps to reproduce (*)
- Create cart rule, no condition, action: Fixed amount discount for whole cart. Discount amount $10
- Create account, create 2 addresses: address 1, address 2
- Add 2 SKUs to cart: SKU1, SKU2
- Check Out with Multiple Addresses
- SKU1 ship to address 1, SKU2 ship to address 2
- Place order
- Magento auto split order into 2 orders.
Expected result (*)
- First Order get discount $10.
- Second Order should not get discount.
Actual result (*)
- Both order get $10 discount, Total discount is $20
=============
According magento comment in code:
https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/SalesRule/Model/Rule/Action/Discount/CartFixed.php#L77
/**
* prevent applying whole cart discount for every shipping order, but only for first order
*/
if ($quote->getIsMultiShipping()) {
$usedForAddressId = $this->getCartFixedRuleUsedForAddress($rule->getId());
if ($usedForAddressId && $usedForAddressId != $address->getId()) {
return $discountData;
} else {
$this->setCartFixedRuleUsedForAddress($rule->getId(), $address->getId());
}
}
=== UPDATE: Dec 04 ===
Please cover this case as well
SKU 1: 100$
SKU 2: 200$
Rule: Fix amount 150$ for whole cart(CartFixed)
i add to cart:
SKU 1 - qty 1
SKU 2 - qty 1
then checkout:
SKU 1 - address 1
SKU 2 - address 2
Expectation:
after checkout:
Sale Order 1: discount amount 100$
Sale Order 2: discount amount: 50$
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 2 Passed. Manual verification of the issue description passedGate 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 release