Zen Cart Logo
Forums / General Questions / Checkout Confirmation Page - Radio Button to Hide Div

Checkout Confirmation Page - Radio Button to Hide Div

Views: 863

Results 1 to 1 of 1
1 May 2012, 10:28 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Checkout Confirmation Page - Radio Button to Hide Div

I wonder if anyone can help me out here with some coding? I'm trying to edit my /includes/templates/CUSTOM/templates/tpl_checkout_split.php so that when the radio button for pmt- module is selected on the checkout page, then some sort of jQuery that will hide the div class, "ccinfo".

Not sure if this makes sense as I'm no coder by any stretch of teh imagination. I just need the credit card details form to be hidden when someone selects the "Pay by Instalments" radio button on our checkout confirmation page, to stop people entering their card details and thinking they'e actually paying a deposit of some kind. Any help greatly appreciated.

Here is an extract of the code I think I need to edit:

							<?php
							  $radio_buttons = 0;
							  for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
							?>
							<?php
							    if (sizeof($selection) > 1) {
							        if (empty($selection[$i]['noradio'])) {
							 ?>
							<?php echo zen_draw_radio_field('payment', $selection[$i]['id'], ($i == 0 ? true : false), 'id="pmt-'.$selection[$i]['id'].'"'); ?> 
							<?php   } ?>
							<?php
							    } else {
							    	
							?>
							<?php echo zen_draw_hidden_field('payment', $selection[$i]['id']); ?>
							<?php
							    }
							?>
							<label for="pmt-<?php echo $selection[$i]['id']; ?>" class="radioButtonLabel"><?php echo $selection[$i]['module']; ?></label>
							
              <?php
                  if (defined('(MODULE_PAYMENT_CC_STATUS') && (MODULE_PAYMENT_CC_STATUS == 'True' and $selection[$i]['id'] == 'cc')) {
              ?>
              <div class="alert"><?php echo MODULE_PAYMENT_CC_TEXT_DESCRIPTION2; ?></div>
              <?php } ?>
							<?php
							    if (defined('MODULE_ORDER_TOTAL_COD_STATUS') && MODULE_ORDER_TOTAL_COD_STATUS == 'true' and $selection[$i]['id'] == 'cod') {
							?>
							<div class="alert"><?php echo TEXT_INFO_COD_FEES; ?></div><br class="clearBoth">
							<?php
							    } else {
							      // echo 'WRONG ' . $selection[$i]['id'];
							?>
							<?php
							    }
							?>
							<br class="clearBoth" />
							
							<?php
							    if (isset($selection[$i]['error'])) {
							?>
							    <div><?php echo $selection[$i]['error']; ?></div>
							
							<?php
							    } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
							?>
							
							<div class="ccinfo">
							<?php
							      for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
							?>
							<label <?php echo (isset($selection[$i]['fields'][$j]['tag']) ? 'for="'.$selection[$i]['fields'][$j]['tag'] . '" ' : ''); ?>class="inputLabelPayment"><?php echo $selection[$i]['fields'][$j]['title']; ?></label><?php echo $selection[$i]['fields'][$j]['field']; ?>
							<br class="clearBoth" />
							<?php
							      }
							?>
							</div>
							<br class="clearBoth" />
							<?php
							    }
							    $radio_buttons++;
							?>
							<br class="clearBoth" />
							<?php
							  }
							?>
							<!-- EOF PAYMENT -->