Committer: nnikulochkina
LJSUP-14188: Do not show pay buttons in cart historyU trunk/cgi-bin/LJ/Widget/Shop/Cart.pm
Modified: trunk/cgi-bin/LJ/Widget/Shop/Cart.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/Shop/Cart.pm 2012-11-06 13:06:27 UTC (rev 12866) +++ trunk/cgi-bin/LJ/Widget/Shop/Cart.pm 2012-11-07 10:50:09 UTC (rev 12867) @@ -122,10 +122,11 @@ return { 'empty_cart' => 1 }; } - my $dengi_online_html = ""; - unless ($LJ::DISABLED{'dengionline'}) { + my ($dengi_online_html, $dengionline_disabled) = ("", 1); + if (LJ::is_enabled('dengionline') && !$cart->cart_paid()) { my $d_o_widget = LJ::Widget::Shop::View::DengiOnline->new; $dengi_online_html = $d_o_widget->render_body; + $dengionline_disabled = 0; } # and calculate how much will it cost the user @@ -200,7 +201,7 @@ 'method_groups' => \@method_groups, 'allow_repeat' => $cart->allow_repeat, 'show_wallet_warning' => $show_wallet_warning, - 'dengionline_disabled' => $LJ::DISABLED{'dengionline'} ? 1 : 0, + 'dengionline_disabled' => $dengionline_disabled, 'dengi_online_html' => $dengi_online_html, 'is_wallet_enable' => !$LJ::DISABLED{'dengionline'} && LJ::Pay::Method::Wallet->suitable_for($cart) ? 1 : 0, };