wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r9403: LJSUP-6618. Repeat order cost 0$

Committer: gprochaev
LJSUP-6618. Repeat order cost 0$

U   trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm	2010-08-26 05:59:01 UTC (rev 9402)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/UserHead.pm	2010-08-26 06:00:34 UTC (rev 9403)
@@ -12,6 +12,15 @@
     return $self->{subitem};
 }
 
+sub calculate_price {
+    my ($self) = @_;
+
+    my ($uh_id) = $self->{subitem} =~ m#uh-(\d+)#;
+    my $uh = LJ::UserHead->get_userhead ($uh_id);
+    my $price = $uh ? $uh->get_price : 0;
+    $self->set_amt($price);
+}
+
 sub _adopt_item {
     my $self = shift;
     my %args = @_;

Tags: ljcom, pm, wisest-owl
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