[ljcom] r12350: LJSUP-12390: Saving link from cart to pr...
Committer: vtroitsky
LJSUP-12390: Saving link from cart to promotion recordsU trunk/cgi-bin/LJ/Pay/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Pay/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-07-25 13:37:19 UTC (rev 12349)
+++ trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-07-25 15:33:55 UTC (rev 12350)
@@ -392,6 +392,8 @@
my $new_promotion = LJ::Pay::Promotion::Auction->create_active($slot, $promoted_object, $cost, $rcpt_u);
+ $item->update( subitem => join('-', ($slot->slot_id, $new_promotion->promoid)) );
+
if ($cost >= $LJ::LARGE_PROMO_NOTIFICATION_COST) {
foreach my $username (@LJ::LARGE_PROMO_NOTIFICATION_USERS) {
my $nt_u = LJ::load_user($username);
@@ -402,10 +404,6 @@
}
}
- $item->set_subitem(join('-', ($slot->slot_id, $new_promotion->promoid)));
-
- # $item->save();
-
$email_subject = $ml->("selfpromo.$object_type.notification.activate.subject", { region => $region_str });
LJ::Pay::SelfPromo->debug_msg("generating the emails");
@@ -998,7 +996,6 @@
# Add object specific properties, if object exists (in case of non refunding cart)
if ( my $object = $opts->{'object'} ) {
- # my $ownerid = $object->ownerid;
my $journalid = $object->journalid;
$it->set_prop( 'selfpromo_journalid' => $journalid );
