Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/laciasmara.com/public_html/shop/application/views/admin/special_price/ |
Upload File : |
<div class="row"> <div class="col-sm-12"> <p><a href="<?= base_url('admin/special_price'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Kembali ke halaman special price</a></p><br> <h4><?= empty($resellers_special_price->id_resellers_special_price) ? 'Tambah special price baru' : 'Edit special price: ' . $resellers_special_price->resellers_special_price_name; ?></h4> <?= $this->session->flashdata('success'); //to display success message ?> <?= $this->session->flashdata('result'); //to display result message ?> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <?= form_open(); ?> <div class="row"> <div class="col-sm-3"> <p>Nama Special Price</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <p> <?php $data = array( 'name' => 'special_price_name', 'value' => $resellers_special_price->resellers_special_price_name, 'class' => 'form-control' ); echo form_input($data); ?> <?= form_error('special_price_name'); ?></p> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row"> <div class="col-sm-3"> <p>Tipe Special Price</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <p><strong>Promo Pembelian Pertama</strong>: Promo harga khusus, hanya untuk pembelian pertama sebuah produk oleh sebuah akun.</p> <p><strong>Promo Untuk Akun Tertentu</strong>: Promo harga khusus untuk akun tertentu. Harga produk yang di khususkan berbeda dari sesama Tier </p> <p><strong>Promo Untuk Akun Tertentu Brand</strong>: Promo harga khusus untuk akun tertentu. Harga produk yang di khususkan berbeda dari sesama Tier khusus untuk brand yg dipilih </p> <p><strong>Promo Untuk Produk Tertentu Dengan Waktu</strong>: Misal Promo Penjualan Tengah Malam. Promo ini akan berjalan ketika jam 00.00 s/d jam 02.00 saja.</p> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row"> <div class="col-sm-3"> <p>Tipe Special Price</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <?php $options = array( 'first purchase promo' => 'Promo pembelian pertama', 'retailer promo' => 'Promo Untuk akun Tertentu promo barang', 'retailer promo brand' => 'Promo untuk akun tertentu promo Brand', 'timed promo' => 'Promo Untuk produk tertentu dengan waktu', ); echo form_dropdown('special_price_type', $options, $resellers_special_price->resellers_special_price_type, 'class="form-control choosePromoType"'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row timedPromo"> <div class="col-sm-12"> <h4>Promo Untuk Produk Tertentu Dengan Waktu </h4> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <div class="row timedPromo"> <div class="col-sm-3"> <p>Pilih Produk</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="form-control" id="myInput2" type="text" placeholder="Search Produk..."><br> <div id="lol2" style="height: 200px; overflow-y: scroll; padding: 20px; border:1px solid #ccc;"> <ul class="list-group" id="myList"> <?php foreach ($products as $product) : ?> <li class="list-group-item"> <input class="form-check-input" style="position:relative; bottom:3px; margin-right: 10px;" type="checkbox" name="product_id[]" value="<?= $product->id_products ?>" <?= set_checkbox('product_id[]', $product->id_products); ?> <?php if (isset($chosen_products)) : ?> <?php //checked item foreach ($chosen_products as $key => $chosen_product) : ?> <?php if ($chosen_product == $product->id_products) : ?> checked <?php endif; ?> <?php endforeach; ?> <?php endif; ?>> <?= $product->title; ?><br /> </li> <?php endforeach; ?> </ul> </div> <?= form_error('category_id'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row timedPromo"> <div class="col-sm-3"> <p>Waktu mulai</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="datetimepicker form-control" type="text" name="promostart" value="<?= $resellers_special_price->promostart; ?>"> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row timedPromo"> <div class="col-sm-3"> <p>Akhir waktu</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="datetimepicker form-control" type="text" name="promoend" value="<?= $resellers_special_price->promoend; ?>"> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row brandPromo"> <div class="col-sm-12"> <h4>Promo Retailer Brand </h4> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <div class="row brandPromo"> <div class="col-sm-3"> <p>Pilih Merek</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="form-control" id="myInput" type="text" placeholder="Search Merek.."><br> <div id="lol" style="height: 200px; overflow-y: scroll; padding: 20px; border:1px solid #ccc;"> <ul class="list-group" id="myList"> <?php foreach ($brands as $brand) : ?> <li class="list-group-item"> <input class="form-check-input" style="position:relative; bottom:3px; margin-right: 10px;" type="checkbox" name="brand_id[]" value="<?= $brand->id_brands; ?>" <?= set_checkbox('brand_id[]', $brand->id_brands); ?> <?php if (isset($chosen_brands)) : ?> <?php //checked item foreach ($chosen_brands as $key => $chosen_brand) : ?> <?php if ($chosen_brand == $brand->id_brands) : ?> checked <?php endif; ?> <?php endforeach; ?> <?php endif; ?>> <?= ucfirst($brand->brand); ?><br /> </li> <?php endforeach; ?> </ul> </div> <?= form_error('category_id'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row brandPromo"> <div class="col-sm-3"> <p>Pilih Customer</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="form-control" id="myInput3" type="text" placeholder="Search Customer.."><br> <div id="lol3" style="height: 200px; overflow-y: scroll; padding: 20px; border:1px solid #ccc;"> <ul class="list-group" id="myList"> <?php foreach ($customers as $customer) : ?> <li class="list-group-item"> <input class="form-check-input" style="position:relative; bottom:3px; margin-right: 10px;" type="checkbox" name="customer_id[]" value="<?= $customer->id_customers; ?>" <?= set_checkbox('customer_id[]', $customer->id_customers); ?> <?php if (isset($chosen_customers)) : ?> <?php //checked item foreach ($chosen_customers as $key => $chosen_customer) : ?> <?php if ($chosen_customer == $customer->id_customers) : ?> checked <?php endif; ?> <?php endforeach; ?> <?php endif; ?>> <?= $customer->name; ?> (<?= $customer->email ?>)<br /> </li> <?php endforeach; ?> </ul> </div> <?= form_error('category_id'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row firstpurchasePromo"> <div class="col-sm-12"> <h4>Promo Pembelian Pertama </h4> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <div class="row firstpurchasePromo"> <div class="col-sm-3"> <p>Pilih Customer</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="form-control" id="myInput3" type="text" placeholder="Search Customer.."><br> <div id="lol3" style="height: 200px; overflow-y: scroll; padding: 20px; border:1px solid #ccc;"> <ul class="list-group" id="myList"> <?php foreach ($customers as $customer) : ?> <li class="list-group-item"> <input class="form-check-input" style="position:relative; bottom:3px; margin-right: 10px;" type="checkbox" name="customer_id[]" value="<?= $customer->id_customers; ?>" <?= set_checkbox('customer_id[]', $customer->id_customers); ?> <?php if (isset($chosen_customers)) : ?> <?php //checked item foreach ($chosen_customers as $key => $chosen_customer) : ?> <?php if ($chosen_customer == $customer->id_customers) : ?> checked <?php endif; ?> <?php endforeach; ?> <?php endif; ?>> <?= $customer->name; ?> (<?= $customer->email ?>)<br /> </li> <?php endforeach; ?> </ul> </div> <?= form_error('category_id'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row firstpurchasePromo"> <div class="col-sm-3"> <p>Pilih Produk</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="form-control" id="myInput2" type="text" placeholder="Search Produk..."><br> <div id="lol2" style="height: 200px; overflow-y: scroll; padding: 20px; border:1px solid #ccc;"> <ul class="list-group" id="myList"> <?php foreach ($products as $product) : ?> <li class="list-group-item"> <input class="form-check-input" style="position:relative; bottom:3px; margin-right: 10px;" type="checkbox" name="product_id[]" value="<?= $product->id_products ?>" <?= set_checkbox('product_id[]', $product->id_products); ?> <?php if (isset($chosen_products)) : ?> <?php //checked item foreach ($chosen_products as $key => $chosen_product) : ?> <?php if ($chosen_product == $product->id_products) : ?> checked <?php endif; ?> <?php endforeach; ?> <?php endif; ?>> <?= $product->title; ?><br /> </li> <?php endforeach; ?> </ul> </div> <?= form_error('category_id'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row timedPromo"> <div class="col-sm-12"> <h4>Promo Untuk Akun Tertentu </h4> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <div class="row retailerPromo"> <div class="col-sm-12"> <h4>Promo Retailer Barang </h4> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <div class="row retailerPromo"> <div class="col-sm-3"> <p>Pilih Customer</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="form-control" id="myInput3" type="text" placeholder="Search Customer.."><br> <div id="lol3" style="height: 200px; overflow-y: scroll; padding: 20px; border:1px solid #ccc;"> <ul class="list-group" id="myList"> <?php foreach ($customers as $customer) : ?> <li class="list-group-item"> <input class="form-check-input" style="position:relative; bottom:3px; margin-right: 10px;" type="checkbox" name="customer_id[]" value="<?= $customer->id_customers; ?>" <?= set_checkbox('customer_id[]', $customer->id_customers); ?> <?php if (isset($chosen_customers)) : ?> <?php //checked item foreach ($chosen_customers as $key => $chosen_customer) : ?> <?php if ($chosen_customer == $customer->id_customers) : ?> checked <?php endif; ?> <?php endforeach; ?> <?php endif; ?>> <?= $customer->name; ?> (<?= $customer->email ?>)<br /> </li> <?php endforeach; ?> </ul> </div> <?= form_error('category_id'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row retailerPromo"> <div class="col-sm-3"> <p>Pilih Produk</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <input class="form-control" id="myInput2" type="text" placeholder="Search Produk..."><br> <div id="lol2" style="height: 200px; overflow-y: scroll; padding: 20px; border:1px solid #ccc;"> <ul class="list-group" id="myList"> <?php foreach ($products as $product) : ?> <li class="list-group-item"> <input class="form-check-input" style="position:relative; bottom:3px; margin-right: 10px;" type="checkbox" name="product_id[]" value="<?= $product->id_products ?>" <?= set_checkbox('product_id[]', $product->id_products); ?> <?php if (isset($chosen_products)) : ?> <?php //checked item foreach ($chosen_products as $key => $chosen_product) : ?> <?php if ($chosen_product == $product->id_products) : ?> checked <?php endif; ?> <?php endforeach; ?> <?php endif; ?>> <?= $product->title; ?><br /> </li> <?php endforeach; ?> </ul> </div> <?= form_error('category_id'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <script> $(document).ready(function() { $("#myInput").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#lol li").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); $("#myInput2").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#lol2 li").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); $("#myInput3").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#lol3 li").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); }); </script> <script> $(function() { $('.timedPromo').hide(); $('.retailerPromo').hide(); $('.firstpurchasePromo').hide(); $('.brandPromo').hide(); //initial state if ($('.choosePromoType').val() == 'timed promo') { $('.timedPromo').show(); } else { $('.timedPromo').hide(); } if ($('.choosePromoType').val() == 'retailer promo') { $('.retailerPromo').show(); } else { $('.retailerPromo').hide(); } if ($('.choosePromoType').val() == 'first purchase promo') { $('.firstpurchasePromo').show(); } else { $('.firstpurchasePromo').hide(); } if ($('.choosePromoType').val() == 'retailer promo brand') { $('.brandPromo').show(); } else { $('.brandPromo').hide(); } //change select for category product $('.choosePromoType').change(function() { if ($('.choosePromoType').val() == 'timed promo') { $('.timedPromo').show(); } else { $('.timedPromo').hide(); } if ($('.choosePromoType').val() == 'retailer promo') { $('.retailerPromo').show(); } else { $('.retailerPromo').hide(); } if ($('.choosePromoType').val() == 'first purchase promo') { $('.firstpurchasePromo').show(); } else { $('.firstpurchasePromo').hide(); } if ($('.choosePromoType').val() == 'retailer promo brand') { $('.brandPromo').show(); } else { $('.brandPromo').hide(); } }); }); </script> <div class="row"> <div class="col-sm-3"> <p>Masukan Harga Khusus<br> (Contoh: 1200000) <br> <br> Untuk "Promo Brand" masukan berapa % dari harga MSRP <br> (Contoh:40)</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <?= form_input('discount_value', set_value('discount_value', $resellers_special_price->discount_value), 'class="form-control"'); ?> <?= form_error('discount_value'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row"> <div class="col-sm-3"> <p>Tanggal kadaluarsa<br> (Biarkan kosong untuk waktu tak terbatas)</p> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <?php if (empty($resellers_special_price->expired_date)) { $trim_expired_date = ''; } else { $expired_date = $resellers_special_price->expired_date; $trim_expired_date = date('d-m-Y', strtotime($expired_date)); } $data = array( 'name' => 'expired_date', 'value' => $trim_expired_date, 'class' => 'datepicker form-control' ); echo form_input($data); ?> <?= form_error('expired_date'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <div class="row"> <div class="col-sm-3"> </div><!-- end class="col-sm-3" --> <div class="col-sm-9"> <?= form_submit('submit', 'Update', 'class="btn btn-primary btn-success button-brown"'); ?> <?= anchor('admin/vouchers', 'Batal'); ?> </div><!-- end class="col-sm-9" --> </div> <!-- end row --> <?= form_close(); ?> <link rel="stylesheet" type="text/css" href="<?= base_url('assets/admin/css/jquery.datetimepicker.min.css'); ?>" /> <script src="<?= base_url('assets/admin/js/jquery.datetimepicker.full.min.js'); ?>"></script> <script> $(document).ready(function() { $('.datetimepicker').datetimepicker({ format: 'Y-m-d H:i' }); }); </script>