-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: MultishippingFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
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
Component: MultishippingFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release