fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-11-26 01:05 pm

[dw-nonfree] holiday bonus promo

[commit: http://hg.dwscoalition.org/dw-nonfree/rev/64ec99765ba5]

http://bugs.dwscoalition.org/show_bug.cgi?id=3249

10% points bonus on all transactions paid for in cash through the month of
December 2010.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Hooks/AnniversaryPromotion.pm
--------------------------------------------------------------------------------
diff -r 6fb0009da7c4 -r 64ec99765ba5 cgi-bin/DW/Hooks/AnniversaryPromotion.pm
--- a/cgi-bin/DW/Hooks/AnniversaryPromotion.pm	Thu Nov 18 13:31:15 2010 +0800
+++ b/cgi-bin/DW/Hooks/AnniversaryPromotion.pm	Fri Nov 26 21:03:12 2010 +0800
@@ -21,14 +21,15 @@ use LJ::Hooks;
 
 # returns if the promotion is valid right now
 sub promo_valid {
-    # valid from 2010-05-01 01:00:00 UTC to 2010-05-08 01:00:00 UTC
-    # this corresponds to 2010-04-30 21:00:00 EDT and a week later...
-    return 0 if time < 1272675600 || time > 1273280400;
+    # valid from Wed Dec  1 00:00:00 2010 UTC to Fri Dec 31 23:59:59 2010 UTC
+    return 0 if time < 1291161600 || time > 1293839999;
     return 1;
 }
 
 
 # returns how many points this cart is eligible for
+# clever; depends on the way that 10 points == $1
+# so if you buy $1 worth of stuff, you get 1 extra point (==1/10th of what you bought)
 sub cart_bonus_points {
     return int( $_[0]->total_cash );
 }
--------------------------------------------------------------------------------