| Server IP : 103.48.194.25 / Your IP : 216.73.216.74 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/namduongmarket.com-bk/public_html/site/components/khuyenmai/views/ |
Upload File : |
<style type="text/css">
.regis ul {
margin-left:0;
}
.main_order ul li {
list-style:none;
}
.main_order ul li input, .main_order ul li textarea {
width:100%;
padding:5px 10px
}
.main_order fieldset {
border:none;
padding:15px 0;
}
.main_order fieldset legend {
font-weight: bold;
}
.main_order ul li input[type=radio] {
float: left;
width: auto;
margin-right: 10px;
margin-top: 4px;
}
.main_order ul li {
text-align:left;
}
.main_order .cartinfo li {
text-align:right !important;
font-weight:bold;
}
.main_order .cartinfo li span {
color:#F00;
}
.btnthanhtoan {
text-align:right;
}
.btnthanhtoan a {
font-size: 24px;
margin-right: 15px;
color: #0845fb;
}
.btnthanhtoan span {}
select#town_name {
width: 100% !important;
padding: 5px 15px;
}
@media only screen and (min-width: 960px) and (max-width: 1920px) {
.clear {
clear:both;
}
@media only screen and (min-width: 480px) and (max-width: 767px) {
.pd-left10 {
padding-left: 0;
}
.main_order fieldset {
border:none;
padding:15px 0;
}
.option {
padding-left:0;
}
.btnthanhtoan {
padding-left:0;
}
}
@media only screen and (max-width: 479px){
.col-right {
padding-left:0;
}
/*.pd-left10 {
padding-left:0 !important;
}
.main_order fieldset {
border:none;
padding:15px 0;
}
.option {
padding-left:0;
}
.btnthanhtoan {
padding-left:0;
}*/
}
</style>
<section id="breadcrumb-wrapper">
<div class="breadcrumb-content">
<div class="wrapper">
<div class="inner">
<div class="breadcrumb-small"> <a href="<?=site?>" title="Kho máy văn phòng">Trang chủ</a> <span aria-hidden="true">/</span><span>Thanh toán</span> </div>
</div>
</div>
</div>
</section>
<div id="PageContainer" class="is-moved-by-drawer">
<main class="main-content" role="main">
<section id="page-wrapper">
<div class="wrapper" style="background:#FFF">
<div class="inner">
<h1>Thông tin đặt hàng</h1>
<form action="<?=site?>dat-hang.html" method="post" id="frmthanhtoan" name="frmthanhtoan">
<div class="main_order">
<div class="grid__item large--one-half medium--one-whole small--one-whole" style="padding-left:0">
<fieldset class="t_info"><legend>Thông tin khách hàng và thông tin xuất hóa đơn</legend>
<div class="regis">
<ul>
<li class="lf_dk">Tên công ty<!--<span>*</span>--></li>
<li class="lr_dk">
<input type="text" id="company" name="company" value="" size="55">
</li>
</ul>
<ul>
<li class="lf_dk">Họ Tên<!--<span>*</span>--></li>
<li class="lr_dk">
<input type="text" id="fullname" name="fullname" value="" size="55">
</li>
</ul>
<ul>
<li class="lf_dk">Mã số thuế<!--<span>*</span>--></li>
<li class="lr_dk">
<input type="text" id="taxcode" name="taxcode" value="" size="55">
</li>
</ul>
<ul>
<li class="lf_dk">Địa chỉ xuất hóa đơn<!--<span>*</span>--></li>
<li class="lr_dk">
<input type="text" id="address" name="address" value="" size="55">
</li>
</ul>
<ul>
<li class="lf_dk">Email<!--<span>*</span>--></li>
<li class="lr_dk">
<input type="text" id="email" name="email" value="" size="55">
</li>
</ul>
<ul>
<li class="lf_dk">Điện thoại<!--<span>*</span>--></li>
<li class="lr_dk">
<input type="text" id="phone" name="phone" value="" size="55">
</li>
</ul>
<ul>
<li class="lf_dk">Thông tin thêm</li>
<li class="lr_dk"><textarea name="note" id="note" cols="42" rows="4"></textarea></li>
</ul>
<p class="option"><span>*</span>Thông tin bắt buộc</p>
<div class="clear"></div>
</div>
</fieldset>
</div>
<div class="grid__item large--one-half medium--one-whole small--one-whole col-right">
<fieldset class="t_info"><legend>Địa chỉ giao hàng</legend>
<div class="regis">
<ul class="check">
<li class="lf_dk">Địa chỉ chi tiết</li>
<li class="lr_dk"><input type="text" id="bl_address" name="bl_address" value="" size="55"></li>
</ul>
<ul class="check">
<li class="lf_dk">Tỉnh/thành phố</li>
<li class="lr_dk"><select name="town_name" id="town_name" onChange="count_total()"><?php include ROOT_SITE."cache/op_town.php";?></select></li>
</ul>
<div class="clear"></div>
</div>
</fieldset>
<div class="main_order">
<h3>Phương thức thanh toán</h3>
<ul>
<li><input type="radio" id="tttm" name="payment_type" value="tm" checked> Thanh toán khi nhận hàng</li>
<li><input type="radio" id="ttol" name="payment_type" value="ol"> Chuyển khoản ATM</li>
</ul>
<?php
$total = 0;
$ses_cart = get_ses_cart();
if($ses_cart):
?>
<h3>Thông tin đơn hàng</h3>
<ul class="cartinfo">
<?php foreach($ses_cart as $cart):
$subtotal = (to_number($cart['pro_price']) * to_number($cart['nb_order'])) ;
$total = $total + $subtotal;
?>
<li>
<?=$cart['pro_name']?> x <?=$cart['nb_order']?>: <span class="price"><?=$subtotal?></span> vnđ
<input type="hidden" name="pro_<?=$cart['proid']?>" id="pro_<?=$cart['proid']?>" class="subtotal" value="<?=to_number($subtotal)?>" />
</li>
<?php endforeach; ?>
<li>Phí giao hàng : <span id="vanchuyen" class="price">500000</span> vnđ</li>
<li>Tổng cộng : <span id="total_str" class="price"><?=$total+500000?></span> vnđ</li>
<li style="font-style:italic; font-weight:normal">Giá trên chưa bao gồm 10% VAT</li>
<li style="font-style:italic; font-weight:normal">Phí giao hàng tạm tính, vui lòng liên hệ để biết chi tiết</li>
</ul>
<?
endif;
?>
<input type="hidden" name="towncost" id="towncost" value="500000" />
<input type="hidden" name="total" id="total" value="<?=$total+500000?>" />
<div class="btnthanhtoan">
<a href="<?=site?>san-pham.html"> << Quay trở về trang giỏ hàng</a>
<span><input type="submit" name="bt_submit" value="Đặt hàng" class="btndathang" /></span>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</form>
</div><!--end inner-->
</div> <!--end wrapper-->
</section>
</main>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
<script src="<?=skin?>js/jquery.formatCurrencyVN.js" type="text/javascript"></script>
<script src="<?=skin?>js/jquery.validate.min.js" type="text/javascript"></script>
<script language="javascript">
/*function mkselected(id, value)
{
var loca = $("#"+id +" option") ;
for(var i=0;i<loca.length;i++){
if(loca[i].value == value)
loca[i].selected = true ;
}
}*/
function to_number(str){
//var number = str.replace(/[^\d]/g, "");
var obj = numeral(str);
var number = obj.value();
return parseInt(number) ;
}
function count_total()
{
var total = 0;
var sub_total = 0;
var towncost = $("#town_name").val();
$("#vanchuyen").html(towncost);
$("#towncost").val(towncost);
$(".subtotal").each(function(){
sub_total = sub_total + to_number($(this).val());
});
total = to_number(towncost) + to_number(sub_total) ;
$("#total_str").html(total);
$("#total").val(total);
$('.price').formatCurrency();
}
$(document).ready(function(e) {
$('#frmthanhtoan').validate({
rules :{
fullname: "required",
address: "required",
phone: "required"
},
messages: {
fullname: "Vui lòng nhập tên của bạn",
address: "Vui lòng nhập địa chỉ",
phone: "Vui lòng nhập số điện thoại"
}
});
//mkselected('town_name',0);
count_total();
$('.price').formatCurrency();
});
</script>