Skip to content

Commit

Permalink
VCST-661: The effect off X cart subtotal, no more than Y does not tak…
Browse files Browse the repository at this point in the history
…e an account the selected items in cart (#544)

fix: The effect off X cart subtotal, no more than Y does not take an account the selected items in cart.
  • Loading branch information
OlegoO committed Apr 12, 2024
1 parent 8d7a848 commit 515c112
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static void ApplyRewards(this CartAggregate aggregate, ICollection<Promot
payment.ApplyRewards(shoppingCart.Currency, paymentRewards);
}

var subTotalExcludeDiscount = shoppingCart.Items.Sum(li => (li.ListPrice - li.DiscountAmount) * li.Quantity);
var subTotalExcludeDiscount = shoppingCart.Items.Where(li => li.SelectedForCheckout).Sum(li => (li.ListPrice - li.DiscountAmount) * li.Quantity);

var cartRewards = rewards.OfType<CartSubtotalReward>();
foreach (var reward in cartRewards.Where(reward => reward.IsValid))
Expand Down

0 comments on commit 515c112

Please sign in to comment.