My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 87 attachment: order_total_value_for_promotions.patch (919 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Index: /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/models/order.rb
===================================================================
--- /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/models/order.rb (revision 78)
+++ /home/edmundo/workspace_aptana/trunk/vendor/plugins/substruct/app/models/order.rb (working copy)
@@ -50,7 +50,7 @@

# Make sure it's valid to add
if promo.minimum_cart_value
- return if promo.minimum_cart_value > self.total
+ return if promo.minimum_cart_value > self.line_items_total
end
logger.info "PROMO MIN CART VALUE PASSED"

@@ -78,7 +78,7 @@
# Percent
when 1 then
oli.quantity = 1
- oli.unit_price = -(self.total * (promo.discount_amount/100))
+ oli.unit_price = -(self.line_items_total * (promo.discount_amount/100))
#
# Buy N get 1 free
when 2 then

Powered by Google Project Hosting