<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
<div class="heading">
   <h1 style=""><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location='<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
</div>
 <div class="content">
 <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
  <div id="tab_general" class="page">
    <table class="form">
         <tr>
        <td><?php echo $enable_product_payment_limit; ?></td>
        <td><input type="checkbox" name="product_payment_limit" value="1" <?php echo $product_payment_limit?'checked="checked"':'' ; ?> />
	
	</td>
      </tr>
  
 	  
     <tr>
        <td><?php echo $mix_cart_payment_method; ?></td>
        <td>
		<select name="mix_cart_payment">
			<option value="1" <?php echo $mix_cart_payment=='1'?'selected="selected"':'' ; ?>>
			<?php echo $mix_cart_payment_method_1; ?>
			</option>
			<option value="2" <?php echo $mix_cart_payment=='2'?'selected="selected"':'' ; ?>>
			<?php echo $mix_cart_payment_method_2; ?>
			</option>
		</select>
	
	
	</td>
      </tr>
	  
	  
	 <tr>
        <td><?php echo $conflict_cart_payment_method; ?></td>
        <td>
		<select name="conflict_cart_payment">
			<option value="1" <?php echo $conflict_cart_payment=='1'?'selected="selected"':'' ; ?>>
			<?php echo $conflict_cart_payment_method_1; ?>
			</option>
			<option value="2" <?php echo $conflict_cart_payment=='2'?'selected="selected"':'' ; ?>>
			<?php echo $conflict_cart_payment_method_2; ?>
			</option>
		</select>
	
	
	</td>
      </tr>
      
	  
	   <tr>
        <td><?php echo $force_payment_method; ?></td>
        <td>
		
			<div class="scrollbox">
                  <?php 
		 $payment_methods=array();
				  $files = glob(DIR_APPLICATION . 'controller/payment/*.php');
		
		if ($files) {
			foreach ($files as $file) {
				$extension = basename($file, '.php');
				
				$this->load->language('payment/' . $extension);
	
				$action = array();				
				$payment_methods[] = array(
					'code'       => $extension,
					'name'       => $this->language->get('heading_title'),
					'status'     => $this->config->get($extension . '_status') ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),
					'sort_order' => $this->config->get($extension . '_sort_order'),
					'action'     => $action
				);
			}
		}
		
		$product_payment_limit=explode('|',$force_payment_methods);
				  $class = 'odd'; ?>
                  <?php foreach ($payment_methods as $payment_method) { ?>
                  <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
                  <div class="<?php echo $class; ?>">
                    
                    <input type="checkbox" name="force_payment_methods_array[]" onclick="set_force_payment_methods()" value="<?php echo $payment_method['code']; ?>" <?php if (in_array($payment_method['code'], $product_payment_limit)) { ?>
                   checked="checked"
                    <?php }  ?> />
                    <?php echo $payment_method['name']; ?>
                  
                  </div>
                  <?php } ?>
				  
                </div>
				
				
                <a onclick="$(this).parent().find(':checkbox').attr('checked', true);">Select All</a> / <a onclick="$(this).parent().find(':checkbox').attr('checked', false);">Unselect All</a>
				 
	
	
	</td>
      </tr>
	  
    </table>
  </div>
</form>
  </div>
</div>
<script type="text/javascript"><!--
$.tabs('.tabs a');
//--></script>
