<div id="payment-method" class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
<?php
$data_toggle_p = "collapse-disabled";
if($user_login_detail['user_id'] > 0 && !$this->common_lib->is_shipping_detail_pending($user_login_detail)){
$data_toggle_p = "collapse";
}
?>
<a data-toggle="<?php echo $data_toggle_p ?>" data-parent="#checkout-page" href="#payment-method-content" class="accordion-toggle">
Step 4: Payments & Confirm Order
</a>
</h2>
</div>
<?php
$default_mode = "";
if($this->common_lib->get_session("validation-4") == "1"){
$default_mode = "in";
}
?>
<div id="payment-method-content" class="panel-collapse collapse <?php echo $default_mode ?>">
<div class="panel-body row">
<div class="col-md-12">
<?php
if($user_login_detail['user_id'] > 0){
$bProfilePending = false;
$bShippingPending = false;
if($this->common_lib->is_profile_detail_pending($user_login_detail)){
$bProfilePending = true;
}
if($this->common_lib->is_shipping_detail_pending($user_login_detail)){
$bShippingPending = true;
}
if(!$bShippingPending && !$bProfilePending){
?>
<div class="goods-page">
<div class="goods-data clearfix" id="cart-list-area">
<?php
echo $this->common_lib->get_detail_cart_summary(true);
?>
</div>
</div>
<div class="promo_box bg-success">
<?php
$attributes = array('method' => 'post','class' => 'form-inline', 'id' => 'checkout-promo-form');
echo form_open('cart/checkout',$attributes);
?>
<div class="form-group">
<input type="text" required="" id="checkout_coupon_code" class="form-control" name="checkout_coupon_code" placeholder="Apply Coupon" />
<button class="btn btn-success" type="submit">Apply Coupon</button>
<input type="hidden" value="apply_coupon" name="checkout_mode" />
<div class="clearfix"></div>
</div>
<?php echo form_close(); ?>
</div>
<?php
$attributes = array('class' => 'form-horizontal1', 'id' => 'checkout-detail-form');
echo form_open('cart/checkout',$attributes);
?>
<p class="sub-heading">Please select the preferred payment method to use on this order.</p>
<div class="radio-list">
<!--label>
<input type="radio" class="payment_method" name="checkout_payment_method" value="COD" checked="checked"> Cash On Delivery <img src="<?php echo base_url()?>/assets/frontend/pages/img/checkout/cash_on_delivery.png" class="checkout_payment_icon" />
</label>
<label>
<input type="radio" class="payment_method" name="checkout_payment_method" value="PP"> PayPal <img src="<?php echo base_url()?>/assets/frontend/pages/img/checkout/paypal.jpg" class="checkout_payment_icon" />
</label>
<label-->
<input type="radio" class="payment_method" name="checkout_payment_method" checked="" value="PP"> Credit Card <img src="<?php echo base_url()?>/assets/frontend/pages/img/checkout/credit_cards.jpg" class="checkout_payment_icon" />
</label>
<!--div id="credit_card_box" style="display: block;">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-5 bg-warning">
<div class="form-group">
<label for="credit_card_number" class="">Credit Card Type <span class='require'>*</span></label>
<div class="">
<select id="card_type" class="form-control" name="checkout_credit_card_type">
<option value="Visa">Visa</option>
<option value="MasterCard">MasterCard</option>
<option value="Discover">Discover</option>
<option value="Amex">American Express</option>
</select>
</div>
</div>
<div class="form-group">
<label for="credit_card_number" class="">Credit Card Number<span class='require'>*</span></label>
<div class="">
<input type="text" id="credit_card_number" class="form-control" name="checkout_credit_card_number" />
</div>
</div>
<div class="form-group">
<label for="cvv_number" class="">CVV Number<span class='require'>*</span></label>
<div class="">
<input type="text" id="cvv_number" class="form-control" name="checkout_cvv_number" />
</div>
</div>
<div class="form-group">
<label for="expiry_date" class="">Card Expiry Date<span class='require'>*</span></label>
<div class="">
<div class="col-md-6">
Month:
<select id="expiry_month" class="form-control" name="checkout_expiry_month">
<?php
for($i=1;$i<=12;$i++){
?>
<option value="<?php echo str_pad($i, 2,"0",STR_PAD_LEFT) ?>"><?php echo str_pad($i, 2,"0",STR_PAD_LEFT) ?></option>
<?php
}
?>
</select>
</div>
<div class="col-md-6">
Year:
<select id="expiry_year" class="form-control" name="checkout_expiry_year">
<?php
for($i = (date("Y") + 1); $i <= (date("Y") + 15); $i++){
?>
<option value="<?php echo $i ?>"><?php echo $i ?></option>
<?php
}
?>
</select>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-5" style="display: none;">
<div class="col-lg-12 bg-warning">
<div class="partial_box ">
<h4>You can also pay partially</h4>
<input type="hidden" id="partial_amount" name="partial_amount" />
<div id="partial_slider"></div>
<div class="steps">
<span style="position: absolute;width: 40px;left:-18px;text-align:center;">|<br>50%</span>
<span style="position: absolute;width: 40px;left:50%;margin-left:-23px;text-align:center;">|<br>75%</span>
<span style="position: absolute;width: 40px;right:-20px;text-align:center;">|<br>100%</span>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div-->
<div class="clearfix"></div>
</div>
<div class="form-group">
<label for="delivery-payment-method">Add Comments About Your Order</label>
<textarea name="checkout_comments" id="delivery-payment-method" rows="8" class="form-control"></textarea>
</div>
<input type="hidden" value="payment_process" name="checkout_mode" />
<button class="btn btn-primary pull-right" type="submit" id="button-payment-method">Confirm Order</button>
<div class="checkbox pull-right">
<label>
<input type="checkbox" value="1" required="" /> I have read and agree to the <a title="Terms & Conditions" href="#">Terms & Conditions </a>
</label>
<?php $total = $this->common_lib->convert_grand_total(); ?>
</div>
<div class="clearfix"></div>
<h2 style="padding: 5px; text-align:center;"> You will charge $ <?php echo $total; ?></h2>
<?php echo form_close(); ?>
<?php
}else{
if($bProfilePending){
echo $this->common_lib->render_messages("<button class='btn btn-danger' type='submit' data-toggle='collapse' data-parent='#checkout-page' data-target='#payment-address-content'>Please update your billing information to continue</button>","danger");
}elseif($bShippingPending){
echo $this->common_lib->render_messages("<button class='btn btn-danger' type='submit' data-toggle='collapse' data-parent='#checkout-page' data-target='#shipping-address-content'>Please update your shipping information to continue</button>","danger");
}
}
?>
<?php
}else{
echo $this->common_lib->render_messages("<button class='btn btn-danger' type='submit' data-toggle='collapse' data-parent='#checkout-page' data-target='#checkout-content'>Please click here to continue</button>","danger");
}
?>
</div>
</div>
</div>
</div>
@KyuuKazami