Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: products_sellings.php
<style> .page-title { padding: 2rem 0 !important;} .onoffswitch { position: relative; width: 56px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; } .onoffswitch-checkbox { display: none; } .onoffswitch-label { display: block; overflow: d-none; cursor: pointer; border: 2px solid #FFFFFF; border-radius: 20px; } .onoffswitch-inner { display: block; width: 200%; margin-left: -100%; transition: margin 0.3s ease-in 0s; } .onoffswitch-inner:before, .onoffswitch-inner:after { display: block; float: left; width: 50%; height: 22px; padding: 0; line-height: 22px; font-size: 12px; color: black; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; box-sizing: border-box; } .onoffswitch-inner:before { content: "ON"; padding-left: 0; background-color: #26a69a; color: #FFFFFF; } .datepicker{ top: 50px !important; } .onoffswitch-inner:after { content: "OFF"; padding-right: 6px; background-color: rgb(38 50 56); color: #FFFFFF; text-align: right; } .onoffswitch-switch { display: block; width: 12px; margin: 5px; background: #FFFFFF; position: absolute; top: 0; bottom: 0; right: 30px; border: 2px solid #FFFFFF; border-radius: 20px; transition: all 0.3s ease-in 0s; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { margin-left: 0; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { right: 0px; } </style> <!-- Page header --> <div class="page-header border-bottom-0 mt-3 service_top_links ml-2"></div> <div class="page-header border-bottom-0 services_header"> <div class="page-header-content header-elements-md-inline"> <div class="page-title d-flex"> <h4><a href="javascript:void(0)" class="BackButton-Link" onclick="goBack()"><i class="icon-arrow-left52 mr-2"></i></a> <?=$page_title?></h4> </div> </div> </div> <!-- /page header --> <!-- Content area --> <div class="content pt-0"> <div class="card"> <div class="card-header header-elements-inline services_search"> <h5 class="card-title cardCollapse"><?php echo $this->lang->line('CUST_CH_BTN'); ?></h5> <div class="header-elements"> <div class="list-icons"> <a class="list-icons-item rotate-180" data-action="collapse"></a> </div> </div> </div> <div class="card-body CollapsedCardBody" style="display: block;"> <div class="row"> <div class="col-xl-12"> <form method="get" action="<?= base_url($this->config->item('apanel_name').'/ecomm/products/products_sellings'); ?>"> <div class="form-group row"> <div class="col-md-4 col-12"> <?php $selected1 = ''; $selected2 = ''; if($type_id == 1){ $selected1 = 'selected=selected'; } if($type_id == 2){ $selected2 = 'selected=selected'; } $html = ''; $html.='<select name="type_id" id="type_id" class="select2 form-control">'; $html .= '<option '.$selected1." value='1'>" . $this->lang->line('BE_LBL_984') . "</option>"; $html .= '<option '.$selected2." value='2'>" . $this->lang->line('BE_LBL_985') . "</option>"; $html.= '</select>'; echo $html; ?> </div> <div class="col-md-4 col-12"> <?php $html = ''; if($categories){ $html.='<select name="category_id" id="category_id" class="select2 form-control">'; $html .= '<option value="">' . $this->lang->line('BE_LBL_964') . '</option>'; foreach($categories AS $singleCategory) { $selected = ''; if($category_id == $singleCategory->id){ $selected = 'selected=selected'; } $html.= '<option '.$selected.' value="'.$singleCategory->id.'">'.$singleCategory->category_name.'</option>'; } $html.= '</select>'; } echo $html; ?> </div> <div class="col-md-4 col-12"> <select name="product_id" id="product_id" class="select2 form-control"> <option value=""><?php echo $this->lang->line('BE_LBL_986'); ?></option> </select> </div> <div class="col-md-4 col-12 mt-2"> <input type="text" placeholder="Start Date" name="start_date" class="form-control datepicker" value="<?php echo ($start_date ? $start_date : ''); ?>" autocomplete="off"> </div> <div class="col-md-4 col-12 mt-2"> <input type="text" placeholder="End Date" name="end_date" class="form-control datepicker" value="<?php echo ($end_date ? $end_date : ''); ?>" autocomplete="off"> </div> <div class="col-md-4 col-12"> <button type="submit" name="data_search" class="btn ThemeColorButton mt-2"><?php echo $this->lang->line('CUST_CH_BTN'); ?></button> </div> </div> </form> </div> </div> </div> </div> <div class="card"> <div class="row"> <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> <div class="card-body"> <div class="form-group row"> <div class="clearfix"></div> <?php if(!empty($products)){ ?> <div class="col-lg-12"> <div class="table-responsive"> <table class="table table-striped table-bordered table-advance table-hover" width="100%"> <thead> <tr> <th>Product Name</th> <?php if($type_id == 2){ ?> <th><?php echo $this->lang->line('BE_LBL_987'); ?></th> <th><?php echo $this->lang->line('BE_LBL_988'); ?></th> <?php } ?> <th><?php echo $this->lang->line('CUST_CH_67'); ?></th> <th><?php echo ($type_id == 2 ? 'Order ID' : 'No. of Product Sold'); ?></th> <?php if($type_id == 1){ ?> <th><?php echo $this->lang->line('BE_LBL_988'); ?></th> <?php } ?> <?php if($type_id == 2){ ?> <th><?php echo $this->lang->line('BE_LBL_989'); ?></th> <?php } ?> </tr> </thead> <tbody> <?php define('IMG_PATH', base_url().'assets/images/users/'); $t_amount=0; $i=0; foreach ($products as $key => $row) { ?> <tr class="item_holder"> <td><?php echo $row->product_title;?></td> <?php if($type_id == 2){ ?> <td><?php echo $row->product_qty;?></td> <td><?php echo $row->amount;?></td> <?php $t_amount += $row->amount; } ?> <td><?php echo $row->category_name;?></td> <td> <?php if($type_id == 2){ ?> <a href="<?php echo base_url($this->config->item('apanel_name')."/ecomm/orders/order_summary/".$row->order_unique_id);?>"><?php echo ($type_id == 2 ? $row->order_unique_id : ($row->total_product_sell ? $row->total_product_sell : '0')); ?></a> <?php }else{ ?> <?php echo ($type_id == 2 ? $row->order_unique_id : ($row->total_product_sell ? $row->total_product_sell : '0')); ?> <?php } ?> </td> <?php if($type_id == 1){ ?> <td><?php echo $row->amount;?></td> <?php $t_amount += $row->amount; } if($type_id == 2){ ?> <td><?php echo ($row->created_at ? date('d-m-Y h:i a',$row->created_at) : '-');?></td> <?php } ?> </tr> <?php $i++; } ?> </tbody> </table> <div class="col-md-12"> <p class="text-right"> <?php echo '<b>Total </b> = '.$t_amount; ?> </p> </div> <?php }else{ ?> <div class="col-lg-12 col-sm-12 col-xs-12" style="text-align: center;"> <h4 class="text-muted" style="font-weight: 400"><?php echo $this->lang->line('BE_LBL_968'); ?></h4> <br/> </div> <?php } ?> </div> </div> </div> <?php if(!empty($links)){ ?> <div class="form-group row"> <div class="col-12"> <div class="pagination_item_block"> <nav> <?php echo $links; ?> </nav> </div> </div> </div> <?php } ?> </div> </div> </div> </div> </div> <script type="text/javascript"> // for multiple action $(document).ready(function (){ $('.select2').select2(); $('.datepicker').datepicker(); }); $(".actions").click(function(e){ e.preventDefault(); var _table='tbl_gf_users'; var href='<?= base_url($this->config->item('apanel_name').'/ecomm/functions/perform_multipe'); ?>'; var _ids = $.map($('.post_ids:checked'), function(c){return c.value; }); var _action=$(this).data("action"); if(_ids!='') { swal({ title: "Do you really want to perform?", type: "warning", showCancelButton: true, confirmButtonClass: "btn-danger btn_edit", cancelButtonClass: "btn-warning btn_edit", confirmButtonText: "Yes", cancelButtonText: "No", closeOnConfirm: false, closeOnCancel: false, showLoaderOnConfirm: true }, function(isConfirm) { if (isConfirm) { $.ajax({ type:'post', url:href, dataType:'json', data:{ids:_ids,for_action:_action,table:_table}, success:function(res){ console.log(res); if(res.status=='1'){ swal({ title: "Successfully", text: "You have successfully done", type: "success" },function() { location.reload(); }); } } }); }else{ swal.close(); } }); } else{ $('.notifyjs-corner').empty(); $.notify( 'No record selected !', { position:"top center",className: 'danger' } ); } }); $("#checkall").click(function () { $('.post_ids').not(this).prop('checked', this.checked); }); $(".enable_disable").on("click",function(e){ var href; var btn = this; var _id=$(this).data("id"); var _for=$(this).prop("checked"); if(_for==false){ href='<?= base_url($this->config->item('apanel_name').'/ecomm/users/deactive'); ?>/'+_id; }else{ href='<?= base_url($this->config->item('apanel_name').'/ecomm/users/active'); ?>/'+_id; } $.ajax({ type:'GET', url:href, success:function(res){ $('.notifyjs-corner').empty(); $.notify( $.trim(res), { position:"top center",className: 'success' } ); } }); }); // for delete users $(".btn_delete").click(function(e){ e.preventDefault(); var _id=$(this).data("id"); e.preventDefault(); var href='<?= base_url($this->config->item('apanel_name').'/ecomm/users/delete_address'); ?>/'+_id; var btn = this; swal({ title: "Are you sure to delete this user Address ?", type: "warning", showCancelButton: true, confirmButtonClass: "btn-danger btn_edit", cancelButtonClass: "btn-warning btn_edit", confirmButtonText: "Yes", cancelButtonText: "No", closeOnConfirm: false, closeOnCancel: false, showLoaderOnConfirm: true }, function(isConfirm) { if (isConfirm) { $.ajax({ type:'GET', url:href, success:function(res){ if($.trim(res)=='success'){ swal({ title: "Deleted", text: "User Address has been deleted", type: "success" },function() { $(btn).closest('.item_holder').fadeOut("200"); }); } else { //alert("Error"); } } }); }else{ swal.close(); } }); }); $("#category_id").on("change",function(e){ var href; var _id=$(this).val(); href='<?= base_url($this->config->item('apanel_name').'/ecomm/products/getCategoryProducts'); ?>'; $.ajax({ type:'POST', url:href, data:{category_id:_id}, success:function(res){ $('#product_id').html(res); } }); }); </script>