Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: payment_status_update.php
<style type="text/css"> ul.timeline { list-style-type: none; position: relative; } ul.timeline:before { content: ' '; background: #d4d9df; display: inline-block; position: absolute; left: 29px; width: 2px; height: 100%; z-index: 400; } ul.timeline > li { margin: 20px 0; padding-left: 20px; } ul.timeline > li:before { content: ' '; background: white; display: inline-block; position: absolute; border-radius: 50%; border: 3px solid #22c0e8; left: 20px; width: 20px; height: 20px; z-index: 400; } ul.timeline p{ font-size: 13px !important; } .checkbox label::before, .checkbox label::after, .radio label::before, .radio label::after{ width: 23px; height: 23px; } </style> <hr/> <form action="<?php echo base_url($this->config->item('apanel_name').'/ecomm/orders/update_payment_status'); ?>" method="post" id="status_form" class="form form-horizontal" enctype="multipart/form-data"> <input type="hidden" name="order_id" value="<?=$order_data[0]->order_id?>"> <input type="hidden" name="user_id" value="<?=$order_data[0]->user_id?>"> <input type="hidden" name="product_id" value="<?=$product_id?>"> <?php if($variation){ ?> <input type="hidden" name="variation_id" value="<?=$variation[0]->variation_id?>"> <?php } ?> <div class="section"> <div class="section-body"> <div class="form-group"> <label class="col-md-3 control-label">Status :-</label> <div class="col-md-9"> <select name="order_status" class="select2" required=""> <option value="">---Select---</option> <?php foreach ($status_titles as $key => $value) { ?> <option value="<?=$value->PaymentStatusId?>" <?php if($value->PaymentStatusId == $currentStatusId) echo 'selected'; //if($value->id <= $order_data[$max_index]->status_title){ echo 'disabled';} ?>><?=$value->PaymentStatus?></option> <?php } ?> <!-- <option value="other_status">Other</option> --> </select> </div> </div> <div class="form-group"> <label class="col-md-12 control-label"><b>Please note that for the order with payment done, when cancelled, the payment is added to registered client wallet.</b></label> <!--<div class="col-md-9"> <textarea name="status_desc" id="status_desc" class="form-control" required=""></textarea> </div>--> </div> <!-- <div class="form-group"> <label class="col-md-3 control-label"></label> <div class="col-md-9"> <div class="checkbox checkbox-inline" style="padding-top: 7px;"> <input type="checkbox" id="cbk_mail" name="send_mail"> <label for="cbk_mail"> Send email to user for their order status update. </label> </div> </div> </div> --> <br/> <div class="form-group"> <div class="col-md-9 col-md-offset-3"> <button type="submit" name="btn_submit" class="btn btn-primary btn_save">Save</button> </div> </div> </div> </div> </form> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script type="text/javascript"> $(document).ready(function(e){ $('.select2').select2(); $(".datepicker").datepicker({ minDate: 0,dateFormat: 'dd-mm-yy' }); }); $("select[name='order_status']").change(function(e){ if($(this).val()=='other_status'){ $(".titleInput").show(); } else{ $(".titleInput").hide(); } }); $("#status_form").submit(function (e) { e.preventDefault(); var _btn=$(this).find(".btn_save"); _btn.attr("disabled", true); href = $(this).attr("action"); $(this).find("button[name='btn_submit']").text("Please wait..."); var data = new FormData($(this)[0]); $.ajax({ url:href, data: data, processData: false, contentType: false, type:'post', success:function(res){ alert(res); location.reload(); }, error : function(res){ alert('Order email sent to customer and status is successfully updated...'); } }); }); </script>