Committer: vtroitsky
LJSUP-12389: Implement shop cart processingU trunk/bin/upgrading/en_LJ.dat U trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm
Modified: trunk/bin/upgrading/en_LJ.dat =================================================================== --- trunk/bin/upgrading/en_LJ.dat 2012-06-28 18:28:52 UTC (rev 12197) +++ trunk/bin/upgrading/en_LJ.dat 2012-06-28 18:58:04 UTC (rev 12198) @@ -446,6 +446,8 @@ [[siteroot]] . +commercial.shop_item.type=Commercial Promo service + comment.delete=Yes comment.mark.spam.subject=Delete this user's comments as spam and ban them from further commenting? Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm =================================================================== --- trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm 2012-06-28 18:28:52 UTC (rev 12197) +++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm 2012-06-28 18:58:04 UTC (rev 12198) @@ -27,7 +27,7 @@ } sub get_product_name { - my ($self) = @_; + my ($self, $subitem) = @_; my $sp_type = $self->get_prop('selfpromo'); return LJ::Lang::ml( "selfpromo.$sp_type.shop_item.name", { 'object_url' => $self->get_object_url } ); @@ -39,9 +39,13 @@ my $amt = $self->get_amt; my $qty = $self->get_qty; + my $subitem = $self->get_subitem(); + my $prefix = ( $subitem && $subitem =~ /^commercial/ ? 'commercial' : 'selfpromo'); # Make it better + + return { 'name' => $self->get_product_name, - 'type' => LJ::Lang::ml('selfpromo.shop_item.type'), + 'type' => LJ::Lang::ml("$prefix.shop_item.type"), }; }