File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Release Notes for Craft Commerce
2
2
3
+ ## Unreleased
4
+
5
+ - Fixed a bug where a line item’s sale price could be incorrectly calculated. ([ #3928 ] ( https://github.com/craftcms/commerce/issues/3928 ) )
6
+
3
7
## 4.8.1.2 - 2025-02-10
4
8
5
9
- Fixed a bug where carts’ adjustment totals could be calculated incorrectly. ([ #3888 ] ( https://github.com/craftcms/commerce/issues/3888 ) )
Original file line number Diff line number Diff line change @@ -610,10 +610,16 @@ public function populateFromPurchasable(PurchasableInterface $purchasable): void
610
610
$ ignoreSales = false ;
611
611
foreach (Plugin::getInstance ()->getDiscounts ()->getAllActiveDiscounts ($ this ->getOrder ()) as $ discount ) {
612
612
if (Plugin::getInstance ()->getDiscounts ()->matchLineItem ($ this , $ discount , true )) {
613
+ // Break if matched discount is set to ignore sales.
613
614
$ ignoreSales = $ discount ->ignoreSales ;
614
615
if ($ ignoreSales ) {
615
616
break ;
616
617
}
618
+
619
+ // Break if matched discount is set to not apply any subsequent discounts.
620
+ if ($ discount ->stopProcessing ) {
621
+ break ;
622
+ }
617
623
}
618
624
}
619
625
You can’t perform that action at this time.
0 commit comments