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

[ljcom] r12674: LJSUP-12963: Implement Shop UI

Committer: wisest-owl
LJSUP-12963: Implement Shop UI

U   trunk/bin/upgrading/en_LJ.dat
U   trunk/cgi-bin/LJ/Widget/Shop/Cart.pm
U   trunk/cgi-bin/LJ/Widget/Shop/Checkout.pm
U   trunk/templates/Shop/Cart.tmpl
U   trunk/templates/Shop/Checkout.tmpl
Modified: trunk/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat	2012-09-21 08:34:05 UTC (rev 12673)
+++ trunk/bin/upgrading/en_LJ.dat	2012-09-21 09:03:41 UTC (rev 12674)
@@ -10920,6 +10920,12 @@
 shop.cart.paid_info.status.success|staleness=1
 shop.cart.paid_info.status.success=Successful
 
+shop.cart.payment.mobile.phone_number=Phone Number
+
+shop.cart.payment.mobile.total=Total
+
+shop.cart.payment.mobile.buy=Buy
+
 shop.cart.payment.credit_card.group.desc|staleness=1
 shop.cart.payment.credit_card.group.desc=Click on logo to choose your payment method
 

Modified: trunk/cgi-bin/LJ/Widget/Shop/Cart.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/Cart.pm	2012-09-21 08:34:05 UTC (rev 12673)
+++ trunk/cgi-bin/LJ/Widget/Shop/Cart.pm	2012-09-21 09:03:41 UTC (rev 12674)
@@ -122,6 +122,12 @@
         return { 'empty_cart' => 1 };
     }
 
+    my $dengi_online_html = "";
+    unless ($LJ::DISABLED{'dengionline'}) {
+        my $d_o_widget = LJ::Widget::Shop::View::DengiOnline->new;
+        $dengi_online_html = $d_o_widget->render_body;
+    }
+
     # and calculate how much will it cost the user
     my %amts = $cart->calculate_price;
 
@@ -186,9 +192,7 @@
         LJ::Pay::Wallet->is_user_eligible($remote) &&
         LJ::Pay::Wallet->get_user_balance($remote) < $cart_price_tokens &&
         !LJ::Pay::Payment::PayItem::WalletTokens->present_in($cart);
-
-    my $dengi_online_params = $LJ::DISABLED{'dengionline'} ? {} : LJ::Widget::Shop::View::DengiOnline->template_params($cart);
-
+    
     # compile data
     return {
         %$table_params,
@@ -197,7 +201,7 @@
         'allow_repeat' => $cart->allow_repeat,
         'show_wallet_warning' => $show_wallet_warning,
         'dengionline_disabled' => $LJ::DISABLED{'dengionline'} ? 1 : 0,
-        %$dengi_online_params,
+        'dengi_online_html' => $dengi_online_html,
     };
 }
 

Modified: trunk/cgi-bin/LJ/Widget/Shop/Checkout.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/Checkout.pm	2012-09-21 08:34:05 UTC (rev 12673)
+++ trunk/cgi-bin/LJ/Widget/Shop/Checkout.pm	2012-09-21 09:03:41 UTC (rev 12674)
@@ -94,6 +94,7 @@
         cart_valid => $self->{cart_valid},
         cart_errors => $self->{cart_errors},
         cart_link => $cart->cart_link,
+        dengionline_disabled => $LJ::DISABLED{'dengionline'} ? 1 : 0,
     };
 }
 

Modified: trunk/templates/Shop/Cart.tmpl
===================================================================
--- trunk/templates/Shop/Cart.tmpl	2012-09-21 08:34:05 UTC (rev 12673)
+++ trunk/templates/Shop/Cart.tmpl	2012-09-21 09:03:41 UTC (rev 12674)
@@ -58,7 +58,11 @@
 	 <form action="" method="post">
 		<TMPL_VAR form_auth>
 		<input type="hidden" name="act" value="delete">
+        <TMPL_IF dengionline_disabled>
 		<TMPL_INCLUDE name="templates/Shop/CartTable.tmpl">
+        <TMPL_ELSE>
+		<TMPL_INCLUDE name="templates/Shop/CartTableDO.tmpl">
+        </TMPL_IF>
 	 </form>
 	<div class="canyon b-cart-pay">
 		<div class="canyon-section">
@@ -143,6 +147,6 @@
 </div>
 
 <TMPL_IF expr="cart_valid && !dengionline_disabled">
-<TMPL_INCLUDE "templates/Shop/DengiOnline.tmpl">
+<TMPL_VAR dengi_online_html>
 </TMPL_IF>
 

Modified: trunk/templates/Shop/Checkout.tmpl
===================================================================
--- trunk/templates/Shop/Checkout.tmpl	2012-09-21 08:34:05 UTC (rev 12673)
+++ trunk/templates/Shop/Checkout.tmpl	2012-09-21 09:03:41 UTC (rev 12674)
@@ -11,7 +11,7 @@
 		</div>
 	<TMPL_ELSE>
 		<TMPL_LOOP table_params><TMPL_INCLUDE name="templates/Shop/CartTable.tmpl"></TMPL_LOOP>
-		<TMPL_UNLESS expr="used_method eq 'free'">
+		<TMPL_UNLESS expr="(used_method eq 'free') or (!dengionline_disabled)">
 		<div class="canyon">
 			<div class="canyon-side">
 				<form method="post" action="<TMPL_VAR cart_link>">
@@ -36,4 +36,4 @@
 			<TMPL_LOOP method_params><TMPL_INCLUDE expr="sprintf('method/%s.tmpl', used_method)"></TMPL_LOOP>
 		</div>
 	</TMPL_UNLESS>
-</div>
\ No newline at end of file
+</div>

Tags: dat, ljcom, pm, tmpl, 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