checkout:GWM
This commit is contained in:
parent
7dc3cfd1d5
commit
00e3c5a442
@ -99,7 +99,7 @@ $routes->match(['get','post'],'/booked_slot','Admin_controller::booked_slot');
|
|||||||
$routes->match(['get','post'],'/manage_availability','Admin_controller::manage_availability');
|
$routes->match(['get','post'],'/manage_availability','Admin_controller::manage_availability');
|
||||||
$routes->match(['get','post'],'/add_to_cart_package','Admin_controller::add_to_cart_package');
|
$routes->match(['get','post'],'/add_to_cart_package','Admin_controller::add_to_cart_package');
|
||||||
$routes->match(['post'],'/order_details','Admin_controller::order_details');
|
$routes->match(['post'],'/order_details','Admin_controller::order_details');
|
||||||
$routes->match(['get'],'/view_member_details/(:any)','Admin_controller::view_member_details/$1');
|
$routes->match(['get'],'/view_credit_details/(:any)','Admin_controller::view_credit_details/$1');
|
||||||
|
|
||||||
|
|
||||||
$routes->match(['get'],'/admin_home','Dashboard::admin_home');
|
$routes->match(['get'],'/admin_home','Dashboard::admin_home');
|
||||||
|
|||||||
@ -1084,28 +1084,14 @@ class Admin_controller extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function view_member_details($member_id)
|
public function view_credit_details($member_id)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$creditsData = $this->creditsModel->where('member_id',$member_id)->where('is_active',1)->orderBy('id' , 'ASC')->findAll();
|
$creditsData = $this->creditsModel->where('md5(member_id)',$member_id)->where('is_active',1)->orderBy('id' , 'ASC')->findAll();
|
||||||
$recent_expiry = $this->creditsModel->select('expiring_date')->selectSum('running_balance', 'no_of_credits')->groupBy('expiring_date')->orderBy('expiring_date', 'asc')->where('member_id',$member_id)->where('is_active',1)->first();
|
|
||||||
if($recent_expiry){
|
|
||||||
$data['no_of_credits'] = $recent_expiry['no_of_credits'];
|
|
||||||
$data['expiring_date'] = $recent_expiry['expiring_date'];
|
|
||||||
}else{
|
|
||||||
$data['no_of_credits'] = '';
|
|
||||||
$data['expiring_date'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$data['credit_data'] = [];
|
$data['credit_data'] = [];
|
||||||
$data['avaiable_credit'] = 0;
|
$data['avaiable_credit'] = 0;
|
||||||
$data['profile'] = $this->MemberModel->select('member.* , zipcode.code as zipcode')
|
|
||||||
->join('zipcode', 'member.pincode = zipcode.id', 'left')
|
|
||||||
->where('member.id', $member_id)
|
|
||||||
->find();
|
|
||||||
$data['country'] = $this->CountryModel->findAll();
|
$data['country'] = $this->CountryModel->findAll();
|
||||||
foreach ($creditsData as $creditsDataindex => $creditsDataValue)
|
foreach ($creditsData as $creditsDataindex => $creditsDataValue)
|
||||||
{
|
{
|
||||||
@ -1115,36 +1101,13 @@ class Admin_controller extends BaseController
|
|||||||
array_push($data['credit_data'] , $creditsDataValue);
|
array_push($data['credit_data'] , $creditsDataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$output = '<div class="table-responsive"><table class="table mb-0"><thead class="thead-light"><tr> <th>Order Id</th><th>Order Date</th><th>Expiry Date</th><th>Credit Transactions</th><th>Credit Balance</th></tr></thead><tbody>';
|
||||||
$TransactionData = $this->TransactionModel->where('member_id', $member_id)->where('status', 'success')->findAll();
|
for( $i = count($data['credit_data']) - 1; $i >= 0 ; $i--) {
|
||||||
$data['TransactionData'] = [];
|
$date = new DateTime($data['credit_data'][$i]['created_at']);
|
||||||
foreach ($TransactionData as $TransactionDatakey => $TransactionDatavalue) {
|
$expirydate = new DateTime($data['credit_data'][$i]['expiring_date']);
|
||||||
$credit_data = $this->creditsModel->where('member_id', $member_id)
|
$output .='<tr><td>'.$data['credit_data'][$i]['order_id'].'</td><td>'.$date->format('M-d-Y').'</td><td>'.$expirydate->format('M-d-Y').'</td><td>'.$data['credit_data'][$i]['running_balance'].'</td><td>'.$data['credit_data'][$i]['avaiable_credit'].'</td></tr>';
|
||||||
->select('package_name')
|
|
||||||
->select('cost')
|
|
||||||
->select('credit_points')
|
|
||||||
->select('expiring_date')
|
|
||||||
->selectSum('credit_points', 'creditPointsSum')
|
|
||||||
->selectSum('cost', 'costSum')
|
|
||||||
->selectCount('package_name', 'pack_count')
|
|
||||||
->groupBy('package_name')
|
|
||||||
->where('order_id',$TransactionDatavalue['order_id'])
|
|
||||||
->where('is_active',1)
|
|
||||||
->findAll();
|
|
||||||
$TransactionDatavalue['credit_data'] = $credit_data;
|
|
||||||
array_push($data['TransactionData'] ,$TransactionDatavalue);
|
|
||||||
}
|
}
|
||||||
$data['gst'] = $this->RuleModel->select('value')->where('rule_key', 3 )->get()->getRow()->value;
|
echo $output .= '</tbody></table></div> ';
|
||||||
$data['pst'] = $this->RuleModel->select('value')->where('rule_key', 4 )->get()->getRow()->value;
|
|
||||||
$zip = $this->ZipcodeModel->findAll();
|
|
||||||
$output = '<option value="">Select Zipcode</option>';
|
|
||||||
foreach($zip as $row)
|
|
||||||
{
|
|
||||||
$output .= '<option value="'.$row['id'].'">'.$row['code'].'</option>';
|
|
||||||
}
|
|
||||||
$data['zipcode'] = $output;
|
|
||||||
|
|
||||||
echo view('view_member_details',$data); //dashboard
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -372,8 +372,8 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</br>
|
||||||
<input type="checkbox" " id="rememberMe"> <label for="rememberMe">Accept and Continue</label>
|
<input type="checkbox" " id="rememberMe"> <label for="rememberMe">By placing your order, you agree to our company privacy policy and condition of use.</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
|
|||||||
|
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
|
|
||||||
<p>By placing your order, you agree to our company privacy policy and condition of use.</p>
|
<!-- <p>By placing your order, you agree to our company privacy policy and condition of use.</p> -->
|
||||||
|
|
||||||
<!-- <button id="card-button" type="button">Proceed to Pay</button> -->
|
<!-- <button id="card-button" type="button">Proceed to Pay</button> -->
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@
|
|||||||
<td><?php echo $row['name'];?></td>
|
<td><?php echo $row['name'];?></td>
|
||||||
<td><?php echo $row['mobile'];?></td>
|
<td><?php echo $row['mobile'];?></td>
|
||||||
<td><?php echo $row['email'];?></td>
|
<td><?php echo $row['email'];?></td>
|
||||||
<td><?php echo $row['credits'];?></td>
|
<td class="credit_usage" id="<?php echo md5($row['id']);?>"><?php echo $row['credits'];?></td>
|
||||||
<td><?php if($row['is_active'] == 1){ echo "Active"; }else{ echo "Deactive"; }?></td>
|
<td><?php if($row['is_active'] == 1){ echo "Active"; }else{ echo "Deactive"; }?></td>
|
||||||
<td><a href="<?= base_url() ?>member_edit/<?php echo md5($row['id']);?>"><i class="mdi mdi-lead-pencil" style="font-size:18px;"></i></a>
|
<td><a href="<?= base_url() ?>member_edit/<?php echo md5($row['id']);?>"><i class="mdi mdi-lead-pencil" style="font-size:18px;"></i></a>
|
||||||
<?php if ($row['is_active'] == 1) { ?>
|
<?php if ($row['is_active'] == 1) { ?>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<a href="<?= base_url() ?>member_activate/<?php echo md5($row['id']);?>"><i class="mdi mdi-account-cancel-outline" title="Activate" style="font-size:18px;"></i></a>
|
<a href="<?= base_url() ?>member_activate/<?php echo md5($row['id']);?>"><i class="mdi mdi-account-cancel-outline" title="Activate" style="font-size:18px;"></i></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<i class="mdi mdi-eye-outline credit_usage" id="<?php echo md5($row['id']);?>" style="font-size:18px;" title="Transactions"></i>
|
<i class="mdi mdi-eye-outline transaction" id="<?php echo md5($row['id']);?>" style="font-size:18px;" title="Transactions"></i>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title" id="myLargeModalLabel">Transaction Details</h4>
|
<h4 class="modal-title" id="myLargeModalLabel"></h4>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="model-table" >
|
<div class="modal-body" id="model-table" >
|
||||||
@ -110,18 +110,18 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <script>
|
<script>
|
||||||
$(document).on('click','.',function(){
|
$(document).on('click','.credit_usage',function(){
|
||||||
|
|
||||||
var member_id = $(this).closest('i').attr('id');
|
var member_id = $(this).closest('td').attr('id');
|
||||||
|
alert(member_id);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"<?= base_url(); ?>view_credit_details/"+member_id,
|
url:"<?= base_url(); ?>view_credit_details/"+member_id,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
$('#myLargeModalLabel').html('Credits Details')
|
||||||
$('.modal-body').html(response);
|
$('#model-table').html(response);
|
||||||
$('#full-width-modal').modal('show');
|
$('#bs-example-modal-lg').modal('show');
|
||||||
// $('#bs-example-modal-lg').modal('show');
|
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
// Handle the error here
|
// Handle the error here
|
||||||
@ -129,17 +129,17 @@ $(document).on('click','.',function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script> -->
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$(document).on('click','.credit_usage',function(){
|
$(document).on('click','.transaction',function(){
|
||||||
|
|
||||||
var member_id = $(this).closest('i').attr('id');
|
var member_id = $(this).closest('i').attr('id');
|
||||||
alert(member_id);
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"<?= base_url(); ?>/transactions_list/"+member_id,
|
url:"<?= base_url(); ?>/transactions_list/"+member_id,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
$('#myLargeModalLabel').html('Transaction Details')
|
||||||
$('#model-table').html(response);
|
$('#model-table').html(response);
|
||||||
$('#bs-example-modal-lg').modal('show');
|
$('#bs-example-modal-lg').modal('show');
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user