|
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/indolok.id/application/views/ |
Upload File : |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<style>
#spinnerName img, #spinnerPhone img, #spinnerAddress img, #spinnerPostcode img, #spinnerKota img, #spinnerKurir img {width:40px}
.tk_line{
float: right;
width: 70%;
border-top: 1px solid black;
}
@media screen and (max-width: 768px) {
.tk_line{
width: 100%;
}
}
.btn-buy{
width:250px;
float: right;
margin-right: 0px;
margin-top: 0px;
}
#internal_po {
padding:10px 20px;
}
#spinnerName, #spinnerPhone, #spinnerAddress, #spinnerKota, #spinnerPostcode, #spinnerKurir, #spinnerSalesID, #spinnerVoucher, #penawaranHarga {
/* display:none; */
}
</style>
<div class="w-grid">
<div class="container">
<div class="myCart">
<br>
<h3>DATA PENGIRIMAN</h3>
<?php
// echo '<pre>';
// print_r($this->session->userdata('shipping_cart'));
// echo '</pre>';
?>
<?php if ($this->session->userdata('shipping_cart')): ?>
<div class="shipping" style="padding-top: 20px;">
<div class="col-sm-2">
<p>Nama Penerima<sup>*</sup></p>
</div>
<div class="col-sm-8">
<input id="shippingName" type="text" name="shipping_name" required style="border-radius: 0;" value="<?= ucwords($shipping->shipping_name); ?>" class="form-control" placeholder="Tulis Nama...">
<span id="spinnerName"><img src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
</div>
<div class="shipping" style="padding-top: 20px;">
<div class="col-sm-2">
<p>Handphone<sup>*</sup></p>
</div>
<div class="col-sm-8">
<?php
$data = array(
'name' => 'shipping_handphone',
'class' => 'form-control',
'id' => 'shippingPhone',
'required' => 'required',
'type' => 'number',
'placeholder' => '081xxxxxxxxx',
'style' => 'border-radius: 0;',
'value' => $shipping->shipping_handphone
);
echo form_input($data);
echo '<span style="font-size:12px;">' . form_error('phone') . '</span>';
?>
<span id="spinnerPhone"><img width="40" height="40" src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
</div>
<div class="shipping" style="padding-top: 20px;">
<div class="col-sm-2">
<p>Alamat Lengkap<sup>*</sup></p>
</div>
<div class="col-sm-8">
<textarea id="completeAddress" required style="border-radius: 0;" class="form-control" placeholder="Tulis alamat lengkap..."><?php if(!empty($shipping->shipping_address)) : ?><?= ucfirst($shipping->shipping_address); ?><?php endif; ?></textarea>
<span id="spinnerAddress"><img width="40" height="40" src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
</div>
<p><span id="addressMessage" style="color: red;"></span></p>
<div class="shipping">
<div class="col-sm-2">
<p>Kota - Provinsi<sup>*</sup></p>
</div>
<?php
$attributes = array(
'id' => 'form_shipping'
);
?>
<?= form_open('shipping/save_shipping', $attributes); ?>
<div class="col-sm-8">
<select style="border-radius: 0;" required id="indah_cargo_id" name="indah_cargo_id" class="form-control" style="color:#4BB8B3;">
<option value="">Pilih Kota - Provinsi...</option>
<?php foreach($indahcargo_cities as $city) : ?>
<option value="<?= $city->id; ?>"
<?php if($shipping->indah_cargo_id == $city->id) : ?>
selected
<?php endif; ?>
><?= ucwords($city->destination_city); ?> - <?= ucwords($city->destination_province); ?></option>
<?php endforeach; ?>
</select>
<span id="spinnerKota"><img src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
<?= form_close(); ?>
</div>
<?php
$attributes = array(
'id' => 'form_postcode'
);
?>
<?= form_open('shipping/save_postcode', $attributes); ?>
<div class="shipping" style="padding-top: 20px;">
<div class="col-sm-2">
<p>Kode Pos<sup>*</sup></p>
</div>
<div class="col-sm-8">
<?php
$data = array(
'name' => 'shipping_postcode',
'class' => 'form-control',
'id' => 'shippingPostcode',
'required' => 'required',
'type' => 'number',
'placeholder' => 'Isi kodepos untuk menghitung ongkir...',
'style' => 'border-radius: 0;',
'value' => $shipping->postcode
);
echo form_input($data);
echo '<span style="font-size:12px;">' . form_error('shipping_postcode') . '</span>';
?>
<span id="spinnerPostcode"><img src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
</div>
<?= form_close(); ?>
<br>
<h3>KURIR PENGIRIMAN</h3>
<p><span id="addressMessage" style="color: red;"></span></p>
<div class="shipping">
<div class="col-sm-2">
<p>Pilih Kurir Pengiriman<sup>*</sup></p>
</div>
<?php
$attributes = array(
'id' => 'form_kurir'
);
?>
<?= form_open('shipping/save_kurir', $attributes); ?>
<div class="col-sm-8">
<select style="border-radius: 0;" required id="choosekurir" name="choosekurir" class="form-control" style="color:#4BB8B3;">
<option value="">Pilih Jenis Kurir...</option>
<option
<?php if($this->session->userdata('rex_service_name') == 'REX-10') : ?>
selected
<?php endif; ?>
value="REX-10">Rex-10 (10-20 hari)</option>
<option
<?php if($this->session->userdata('rex_service_name') == 'REGULAR') : ?>
selected
<?php endif; ?>
value="REGULAR">Rex Regular (2 hari)</option>
<option
<?php if($this->session->userdata('rex_service_name') == 'REX-1') : ?>
selected
<?php endif; ?>
value="REX-1">Rex Rex-1 (1 hari)</option>
<option
<?php if($this->session->userdata('rex_service_name') == 'EXPRESS') : ?>
selected
<?php endif; ?>
value="EXPRESS">Rex Express (1-2 hari)</option>
</select>
<p style="font-size:13px;">Biaya Pengiriman belum termasuk biaya pemasangan</p>
<span id="spinnerKurir"><img src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
<?= form_close(); ?>
</div>
<div class="row" style="padding-top: 20px; display: none;">
<div class="col-sm-2">
<p>Note</p>
</div>
<div class="col-sm-8">
<textarea id="note" required style="border-radius: 0;" class="form-control" placeholder="Tulis Note..."><?php if(!empty($shipping->shipping_postcode)) : ?><?= ucfirst($shipping->shipping_postcode); ?><?php endif; ?></textarea>
</div>
</div>
<br><br>
<div class="table-responsive">
<table class="table" style="border-top:1px solid #999999; border-bottom:1px solid #999999; width: 100%;">
<thead>
<tr>
<th style="text-align: left;">No.</th>
<th style="text-align: left;">Nama Produk</th>
<th style="text-align: left;">Kuantitas</th>
<th style="text-align: left;">Harga</th>
<th style="text-align: left;">Sub Total</th>
<th style="text-align: left;">Dikirim dari</th>
</tr>
</thead>
<tbody>
<?php $count = 0; ?>
<?php $grand_total = 0; ?>
<?php $total_discount = 0; ?>
<?php $total_shipping_fee = 0; ?>
<?php foreach ($this->session->userdata('shipping_cart') as $rowid => $item): ?>
<?php $count = $count + 1; ?>
<?php
$real_rowid = null;
foreach ($this->cart->contents() as $real_key) {
if ((int)$real_key['id'] == (int)$item['id']) {
$real_rowid = $real_key['rowid'];
}
}
?>
<tr>
<td><?= $count; ?></td>
<td><?= strtoupper($item['name']); ?></td>
<td><?= $item['qty']; ?> Pcs</td>
<td >IDR <?= number_format($item['price']); ?></td>
<td>IDR <span id="subTotal<?= $count; ?>"><?php echo number_format(($item['subtotal'])); ?></span></td>
<td>
<?= $item['warehouse_name']; ?>
<?php if($item['is_backorder'] == 'yes') : ?>
<br><span style="font-size:12px;">Indent</span>
<?php else : ?>
<br><span style="font-size:12px;">Ready Stock</span>
<?php endif; ?>
</td>
</tr>
<?php $grand_total = $grand_total + ($item['price'] * $item['qty']); ?>
<?php endforeach; ?>
</form>
</tbody>
</table>
</div>
<div class="result" style="padding-top:1rem;">
<div class="col-sm-6" style="padding-bottom: 15px;">
<?php
$attributes = array(
'id' => 'redeem_voucher'
);
?>
<div class="voucher">
<div class="col-sm-6 col-6">
<input type="text" id="voucher" placeholder="VOUCHER">
<p id="error_voucher" style="color: red"></p>
</div>
<div class="col-sm-6 col-6">
<a class="btn btn-primary btn-buy" id="redeemVoucher" style="width: 150px;float: none;">REDEEM</a>
<span id="spinnerVoucher" style="position: absolute;"><img src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
</div>
<?php if($this->session->userdata('customer')['customer_id']) : ?>
<?php
//get current customer type. if corporate/reseller then show sales_id check
if($this->session->userdata('customer')['customer_id']) {
//get customer type
$this->db->select('type')->from('customers')->where('id_customers', $this->session->userdata('customer')['customer_id']);
$customer_type = $this->db->get()->row()->type;
}
?>
<?php if($customer_type == 'corporate' || $customer_type == 'dealer') : ?>
<div class="voucher">
<div class="col-sm-6 col-6">
<input class="form-control" type="text" id="sales_id" placeholder="SALES ID">
<p id="error_sales_id" style="color: blue"></p>
</div>
<div class="col-sm-6 col-6">
<a class="btn btn-primary btn-buy" id="redeemSalesID" style="width: 150px;float: none;">CHECK ID</a>
<span id="spinnerSalesID" style="position: absolute;"><img width="40" height="40" src="<?= base_url('uploads/spinner.gif'); ?>"></span>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="row">
<div class="col-sm-6 col-6">
<br>
<a id="penawaranHarga" class="btn btn-success" target="_blank" href="<?= base_url('shipping/generate_penawaran_pdf'); ?>" style="font-size: 16px;"><i class="fa fa-file-pdf"></i> BUAT PENAWARAN HARGA</a>
</div>
</div>
<input type="hidden" id="voucherprice_input">
<input type="hidden" id="pointrewards_input">
</div>
<div>
<div class="priceResult" style="min-height: 25px;">
<div class="col-md-8 col-sm-6 col-6" style="text-align: right;">
<p><span>Total Produk :</span></p>
</div>
<div class="col-md-4 col-sm-6 col-6" style="text-align: right;">
<p><span>IDR </span><span id="totalItemAmount"><?= number_format($grand_total); ?></span></p>
</div>
</div>
<?php if(isset($birthday_promo_percentage)) : ?>
<?php
$total_discount = $total_discount + $birthday_promo_amount;
$grand_total = $grand_total - ($grand_total * $birthday_promo_percentage/100);
?>
<div id="birthdayPromoBlock" class="priceResult" style="min-height: 25px;">
<div class="col-md-8 col-sm-6 col-6" style="text-align: right;">
<p><span>Birthday Promo (<?= $birthday_promo_percentage; ?>%)</span>
</p>
</div>
<div class="col-md-4 col-sm-6 col-6" style="text-align: right;">
<p><span>IDR </span><span id="birthdayPromoPrice"><?= number_format($birthday_promo_amount); ?></span></p>
</div>
</div>
<?php endif; ?>
<div id="voucherPriceBlock" class="priceResult" style="min-height: 25px;">
<div class="col-md-8 col-sm-6 col-6" style="text-align: right;">
<p><span>Voucher</span>
<span id="voucherdiscount"></span>:</span></p>
</div>
<div class="col-md-4 col-sm-6 col-6" style="text-align: right;">
<p><span>IDR </span><span id="voucherprice"><?= number_format($total_discount); ?></span></p>
</div>
</div>
<div class="priceResult" style="min-height: 25px;">
<div class="col-md-8 col-sm-6 col-6" style="text-align: right;padding-top: 5px">
<p><span>Biaya Pengiriman :</span></p>
</div>
<div class="col-md-4 col-sm-6 col-6" style="text-align: right;">
<?php if($final_total_shipping_fee <= 0) : ?>
<p><span>Free</span></p>
<?php else : ?>
<p><span>IDR </span><span id="totalShippingFee"><?= number_format($final_total_shipping_fee); ?></span></p>
<?php endif; ?>
<?php $grand_total = $grand_total + $final_total_shipping_fee; ?>
</div>
</div>
<div class="priceResult" style="min-height: 25px;">
<div class="col-md-8 col-sm-6 col-6" style="text-align: right;padding-top: 5px">
<p style="font-weight:bold"><span>Grand Total :</span></p>
</div>
<div class="col-md-4 col-sm-6 col-6" style="text-align: right;">
<p style="font-weight:bold"><span style="font-size:100%;">IDR <span id="grandTotal"><?= number_format($grand_total); ?></span></p>
</div>
</div>
<div class="row" style="height: 5px;">
<div class="col-sm-12">
<hr class="tk_line">
</div>
</div>
<?php if($this->session->userdata('rex_tariff_exist') == 'yes') : ?>
<p style="margin-top: 25px; margin-bottom: 20px; font-size: 15px; font-weight: bold; text-align:right" class="clearfix">
<a style="margin-top:20px;" href="<?= base_url('payment'); ?>" class="btn btn-primary buyButton btn-buy">LANJUT KE PEMBAYARAN <i class="fa fa-chevron-right" aria-hidden="true"></i></a>
</p>
<script>
jQuery('.buyButton').on('click', function(e) {
if(jQuery('#indah_cargo_id').val() == '') {
alert('Kota belum di isi. Mohon diisi sebelum melanjutkan.');
jQuery('#indah_cargo_id').focus();
e.preventDefault();
}
});
</script>
<?php else : ?>
<p>Ongkir belum tersedia. Silahkan mengisi kodepos Anda.</p>
<?php endif; ?>
<?php if($customer_type == 'corporate' || $customer_type == 'dealer') : ?>
<?php if($this->session->userdata('penawaran_harga_to_shipping')) : ?>
<script>
jQuery(document).ready(function() {
jQuery('#lanjutSebagaiPO').show();
});
</script>
<?php endif; ?>
<div class="row" id="lanjutSebagaiPO">
<div class="col-sm-12" style="margin-bottom: 15px;">
Lanjut Sebagai PO
</div>
<?php
$attributes = array(
'id' => 'payment_as_po'
);
?>
<?= form_open('payment/payment_as_po', $attributes);?>
<div class="col-sm-6">
<p>
<?php
$data = array(
'name' => 'internal_po',
'placeholder' => 'Input Internal PO',
'required' => 'required',
'class' => 'form-control',
'id' => 'internal_po',
);
echo form_input($data);
?>
</p>
</div>
<div class="col-sm-6">
<p style="font-size: 15px; font-weight: bold;" class="clearfix">
<style>
.btn-buy{
width:250px;
float: right;
margin-right: 0px;
margin-top: 0px;
}
</style>
<input type="submit" class="btn btn-primary buyButton btn-buy buyButtonAsPo" value="LANJUT SEBAGAI PO">
</p>
</div>
<?= form_close();?>
<script>
jQuery('.buyButtonAsPo').on('click', function(e) {
if(jQuery('#internal_po').val() == '') {
alert('No PO belum diisi');
e.preventDefault();
} else {
if(confirm("Dengan ini Anda menyatakan bahwa Nomer Purchase Order (No PO) ini adalah nomor yang benar dan sah digunakan sebagai referensi dan lampiran dokumen penagihan atas pemesanan barang Anda.")) {
jQuery("#payment_as_po").submit();
} else {
e.preventDefault();
}
}
});
</script>
</div>
<?php endif; ?>
</div>
</div>
<?php else : ?>
<!--- cart no content-->
<p>KERANJANG ANDA KOSONG.</p>
<?php endif; ?>
</div><!-- end myCart -->
</div>
</div>
<br><br>
<script>
//store address into database after 1 second input text
$('#spinnerName').hide();
var typingTimer; //timer identifier
var doneTypingInterval = 1000; //time in ms, 5 second for example
//on keyup, start the countdown
$('#shippingName').on('keyup', function () {
$('#spinnerName').show();
$('.buyButton').hide();
clearTimeout(typingTimer);
typingTimer = setTimeout(doneTypingName, doneTypingInterval);
});
//on keydown, clear the countdown
$('#shippingName').on('keydown', function () {
clearTimeout(typingTimer);
});
//user is "finished typing," do something
function doneTypingName () {
//add text to ajax
$.ajax({
'url' : '<?= base_url(); ?>' + 'ajax/update_shipping_name',
'type' : 'POST',
'data' : {
'shipping_name' : $('#shippingName').val(),
'customer_id' : <?= $shipping->id_customers; ?>,
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(data) {
if (data) {
$('#spinnerName').hide();
$('.buyButton').show();
};
}
});
}
//store phone into database after 1 second input text
$('#spinnerPhone').hide();
var typingTimer; //timer identifier
var doneTypingInterval = 1000; //time in ms, 5 second for example
//on keyup, start the countdown
$('#shippingPhone').on('keyup', function () {
$('#spinnerPhone').show();
$('.buyButton').hide();
clearTimeout(typingTimer);
typingTimer = setTimeout(doneTypingPhone, doneTypingInterval);
});
//on keydown, clear the countdown
$('#shippingPhone').on('keydown', function () {
clearTimeout(typingTimer);
});
//user is "finished typing," do something
function doneTypingPhone () {
//add text to ajax
$.ajax({
'url' : '<?= base_url(); ?>' + 'ajax/update_shipping_handphone',
'type' : 'POST',
'data' : {
'shipping_phone' : $('#shippingPhone').val(),
'customer_id' : <?= $shipping->id_customers; ?>,
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(data) {
if (data) {
$('#spinnerPhone').hide();
$('.buyButton').show();
};
}
});
}
//store address into database after 1 second input text
$('#spinnerAddress').hide();
var typingTimer; //timer identifier
var doneTypingInterval = 1000; //time in ms, 5 second for example
//on keyup, start the countdown
$('#completeAddress').on('keyup', function () {
$('#spinnerAddress').show();
$('.buyButton').hide();
clearTimeout(typingTimer);
typingTimer = setTimeout(doneTyping, doneTypingInterval);
});
//on keydown, clear the countdown
$('#completeAddress').on('keydown', function () {
clearTimeout(typingTimer);
});
//user is "finished typing," do something
function doneTyping () {
//add text to ajax
$.ajax({
'url' : '<?= base_url(); ?>' + 'ajax/update_shipping_address',
'type' : 'POST',
'data' : {
'shipping_address' : $('#completeAddress').val(),
'customer_id' : <?= $shipping->id_customers; ?>,
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(data) {
if (data) {
$('#spinnerAddress').hide();
$('.buyButton').show();
};
}
});
}
$('#spinnerKota').hide();
$('#indah_cargo_id').on('change', function () {
$('#spinnerKota').show();
$('.buyButton').hide();
$('#form_shipping').submit();
});
$('#spinnerPostcode').hide();
if($('#shippingPostcode').val() === '') {
$('.buyButton').hide();
} else {
$('.buyButton').show();
}
//store postcode into database after 1 second input text
var typingTimer; //timer identifier
var doneTypingInterval = 1000; //time in ms, 5 second for example
//on keyup, start the countdown
$('#shippingPostcode').on('keyup', function () {
$('#spinnerPostcode').show();
$('.buyButton').hide();
clearTimeout(typingTimer);
typingTimer = setTimeout(doneTypingPostcode, doneTypingInterval);
});
//on keydown, clear the countdown
$('#shippingPostcode').on('keydown', function () {
clearTimeout(typingTimer);
});
//user is "finished typing," do something
function doneTypingPostcode () {
$('#form_postcode').submit();
}
$('#spinnerKurir').hide();
$('#choosekurir').on('change', function () {
$('#spinnerKurir').show();
$('.buyButton').hide();
$('#form_kurir').submit();
});
//Initial script
$(document).ready(function() {
$('#voucherPriceBlock').hide();
$('#lanjutSebagaiPO').hide();
$('#penawaranHarga').hide();
$('#spinnerVoucher').hide();
$('#spinnerPoint').hide();
$('#spinnerSalesID').hide();
$("#redeemSalesID").click(function(){
$('#spinnerSalesID').show();
var sales_id = $("#sales_id").val();
if(sales_id == ''){
$('#error_sales_id').html('Insert Sales ID First !!!');
$('#spinnerSalesID').hide();
}
else{
$('.buyButton').attr('disabled', true);
ajax_set_sales_id(sales_id);
}
});
});
function ajax_set_sales_id(sales_id) {
$.ajax({
'url' : '<?= base_url(); ?>' + 'ajax/ajax_set_sales_id',
'type' : 'POST',
'data' : {
'sales_id' : sales_id,
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(data) {
if (data) {
var result = JSON.parse(data);
$('#error_sales_id').html(result.sales_name)
$('#spinnerSalesID').hide();
$('.buyButton').attr('disabled', false);
if(result.allowed == 'true') {
console.log('allowed is true');
$('#penawaranHarga').show();
$('#lanjutSebagaiPO').show();
} else {
console.log('allowed is false');
$('#penawaranHarga').hide();
$('#lanjutSebagaiPO').hide();
}
};
}
});
}
$("#redeemVoucher").click(function(){
$('#spinnerVoucher').show();
var voucher = $("#voucher").val();
<?php
if (isset($final_total_shipping_fee))
{
?>
var final_total_shipping_fee = <?= $final_total_shipping_fee; ?>;
<?php
}else{
?>
var final_total_shipping_fee = 0;
<?php
}
?>
if(voucher == ''){
$('#error_voucher').html('Insert Voucher First !');
$('#spinnerVoucher').hide();
}
else{
var pointprice = $('#pointrewards_input').val();
if(pointprice == ''){
pointprice = 0;
}
else{
pointprice = pointprice;
}
var id_customer = <?= $shipping->id_customers; ?>;
var province = $('#indah_cargo_id').val();
var subdistrict = $('#shipping_subdistrict').val();
$('.buyButton').attr('disabled', true);
ajax_set_voucher(voucher,pointprice,id_customer,province,subdistrict,final_total_shipping_fee);
}
});
function ajax_set_voucher(voucher,pointprice,id_customer,province,subdistrict,final_total_shipping_fee) {
$.ajax({
'url' : '<?= base_url(); ?>' + 'ajax/ajax_set_voucher',
'type' : 'POST',
'data' : {
'voucher' : voucher,
'pointprice' : pointprice,
'id_customer' : id_customer,
'province' : province,
'subdistrict' : subdistrict,
'final_total_shipping_fee' : final_total_shipping_fee,
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(data) {
if (data) {
$('#voucherPriceBlock').show();
var total = JSON.parse(data);
$('#voucherdiscount').html(total.voucher_discount)
$('#voucherprice').html(total.voucherprice);
$('#voucherprice_input').val(total.voucherprice_input);
$('#grandTotal').html(total.grand_total);
$('#error_voucher').html(total.alert);
$('#spinnerVoucher').hide();
$('.buyButton').attr('disabled', false);
};
}
});
}
// $(document).ready(function() {
// if (window.matchMedia('only screen and (min-device-width : 320px) and (max-device-width : 568px)').matches) {
// $('div.myCart').removeClass('myCart');
// $("table tr td.hidden-xs-down, table tr th.hidden-xs-down").removeClass('hidden-xs-down');
// $("table.table").css({
// 'max-width':'558px',
// 'width':'558px',
// });
// }
// })
</script>