We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b5f35c commit 63b936aCopy full SHA for 63b936a
ecommerce/pricing/lib/pricing/offer.rb
@@ -11,7 +11,7 @@ def initialize(id)
11
@discounts = []
12
@state = :draft
13
14
- @three_plus_one_gratis = Discounts::ThreePlusOneGratis.new
+ @three_plus_one_gratis = Discounts::ThreePlusOneGratis.new(@list)
15
end
16
17
def add_item(product_id, base_price)
@@ -26,8 +26,8 @@ def add_item(product_id, base_price)
26
total_value: @list.actual_sum + price
27
}
28
)
29
-
30
- anything_applied = @three_plus_one_gratis.apply(@list)
+
+ anything_applied = @three_plus_one_gratis.apply(base_price)
31
apply DiscountApplied.new(
32
data: {
33
order_id: @id,
0 commit comments