журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12457: LJSUP-13238: Calendar promo stage 2 - re...

Committer: nnikulochkina
LJSUP-13238: Calendar promo stage 2 - reminder links
U   trunk/bin/maint/selfpromo.pl
U   trunk/bin/maint/taskinfo-local.txt
U   trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
U   trunk/htdocs/shop/selfpromo.bml.text.local
Modified: trunk/bin/maint/selfpromo.pl
===================================================================
--- trunk/bin/maint/selfpromo.pl	2012-08-14 10:53:58 UTC (rev 12456)
+++ trunk/bin/maint/selfpromo.pl	2012-08-14 11:32:07 UTC (rev 12457)
@@ -60,4 +60,20 @@
     # notify promoter about start/stop/ not ready items
     LJ::Pay::CommercialPromo->notify_promoters($slot) if $slot;
 };
+
+# run as often as we did it for commercial_check (every minute)
+$maint{'find_cheapest_commercial'} = sub {
+    my $arg = shift;
+
+    my $slot = LJ::Pay::PromotionSlot->find_slot(class => PROMO_COMMERCIAL());
+    my $memkey = $slot->memcache_cheapest_key;
+
+    my $cheapest_promotion = LJ::Pay::CommercialPromo->find_cheapest_promotion;
+
+    if ($cheapest_promotion) {
+        LJ::MemCache::set( $memkey, $cheapest_promotion->promoid, 300 );
+    }
+};
+
+
 1;

Modified: trunk/bin/maint/taskinfo-local.txt
===================================================================
--- trunk/bin/maint/taskinfo-local.txt	2012-08-14 10:53:58 UTC (rev 12456)
+++ trunk/bin/maint/taskinfo-local.txt	2012-08-14 11:32:07 UTC (rev 12457)
@@ -68,3 +68,4 @@
   notificationpromo_check - Check the current entry promoted via NotificationPromo if it still should be promoted (not deleted / became ineligible / expired)
   commercial_create - Create promotions for sell in advance.
   commercial_check - Check current promoter object
+  find_cheapest_commercial - Find the cheapest promotion object

Modified: trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm	2012-08-14 10:53:58 UTC (rev 12456)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm	2012-08-14 11:32:07 UTC (rev 12457)
@@ -66,6 +66,7 @@
 
         my $data_selfpromo = [];
         my $buyout_cost = $slot->buyout_cost;
+        my %hints = ();
 
         my $promo = $slot->current_promotion();   # return current promotion 
         my $current_price = $promo ? $promo->cost : 0;
@@ -81,6 +82,7 @@
             $data_selfpromo = [ $promo->get_template_params(remote => $remote) ];
             $owner_cancel = $promo->can_cancel( $remote );
             $hide_buyout = $owner_cancel;
+            %hints =  $promo->get_other_promo_hints if $type eq 'entry';
 
             # MOVED TO Promotion/Auction.pm, sub _template_parameters
 
@@ -114,6 +116,7 @@
             'hide_buyout'           => $hide_buyout,
             'owner_cancel'          => $owner_cancel,
             'form_disabled'         => !$remote ? 1 : 0,
+            %hints,
         };
 
         if ($remote && $type eq 'journal') {

Modified: trunk/htdocs/shop/selfpromo.bml.text.local
===================================================================
--- trunk/htdocs/shop/selfpromo.bml.text.local	2012-08-14 10:53:58 UTC (rev 12456)
+++ trunk/htdocs/shop/selfpromo.bml.text.local	2012-08-14 11:32:07 UTC (rev 12457)
@@ -11,6 +11,9 @@
 
 .bubble.entry.buyout=promote your entry for [[buyout]] tokens
 .bubble.entry.timeleft=this entry will remain in promo for [[timeleft_hours]] hours [[timeleft_minutes]] minutes
+.bubble.entry.hint.commercial=Or buy calendar promo for [[buyout]] tokens
+.bubble.entry.hint.notification=Or buy notification promo for [[buyout]] tokens
+.bubble.entry.hint.selfpromo=Or buy selfpromo for [[buyout]] tokens
 
 .bubble.journal.buyout=promote your journal for [[buyout]] tokens
 .bubble.journal.timeleft=this journal will remain in promo for [[timeleft_hours]] hours [[timeleft_minutes]] minutes

Tags: ljcom, local, nikulochkina, nnikulochkina, pl, pm, txt
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments