test / sepet.php
canerky3636's picture
Upload 28 files
bdb1674
<?php
include 'include/menu.php';
$urunler = $_SESSION['urunler'];
$metakey=$db->prepare("SELECT * from meta where meta_id=11");
$metakey->execute(array(0));
$metakeyprint=$metakey->fetch(PDO::FETCH_ASSOC);
if ( isset( $_POST[ 'sepetbosalt' ] ) )
{
unset($_SESSION['urunler']);
if ( $update )
{
Header( "Location:sepet?status=ok" );
}
else
{
Header( "Location:sepet?status=ok" );
}
}
?>
<title><?php echo $metakeyprint['meta_title'] ?></title>
<meta name="description" content="<?php echo $metakeyprint['meta_descr'] ?>">
<meta name="keywords" content="<?php echo $metakeyprint['meta_keyword'] ?>">
</head>
<!-- Page title -->
<section class="p-t-100 p-b-50 text-light" id="page-title" data-parallax-image="admin/assets/img/genel/data.jpg">
<div id="particles-js" class="particles text-light"></div>
<div class="container">
<div class="breadcrumb">
<ul>
<li><a href="<?php echo $settingsprint['ayar_siteurl']; ?>">AnaSayfa</a> </li>
<li class="active">SEPET</li>
</ul>
</div>
<div class="page-title">
<h1>SEPET</h1>
</div>
</div>
</section>
<!-- end: Page title -->
<!-- SHOP CART -->
<section id="shop-cart">
<div class="container">
<div class="shop-cart">
<?php
$say = count($urunler);
if ($say==0) { ?> <tr><td class="cart-product-thumbnail"> <div class="heading-fancy heading-line text-center">
<h4>Sepetiniz Boş.</h4>
</div> </td></tr><div class="row">
<div class="col-md-4">
<div class="col-md-6 col-sm-6 col-xs-12 text-left">
<a href="urunler" type="button" class="btn btn-success">Ürünlere Gİt</a>
</div>
<div class="col-md-6 col-sm-6 col-xs-12 text-left">
<a href="paketler" type="button" class="btn btn-success">Paketlere Gİt</a>
</div>
</div><?php } else {
foreach($urunler as $urun) {
$toplam += $urun['fiyat'];
?>
<div class="table table-condensed table-striped table-responsive">
<table class="table">
<thead>
<tr>
<th class="cart-product-remove"></th>
<th class="cart-product-thumbnail">Ürün</th>
<th class="cart-product-price">Fiyat</th>
<th class="cart-product-quantity">Adet</th>
<th class="cart-product-subtotal">Toplam</th>
</tr>
</thead>
<tbody>
<tr>
<td class="cart-product-remove">
</td>
<td style="width: 70%;" class="cart-product-thumbnail">
<?php if ($urun['paket']==0) {
$resimsor=$db->prepare("SELECT * from resim where resim_urun=:resim_urun Limit 2");
$resimsor->execute(array(
'resim_urun' => $urun["id"]
));
$resimcek=$resimsor->fetch(PDO::FETCH_ASSOC);?>
<a href="#">
<img src="admin/<?php echo $resimcek['resim_link'] ?>" alt="Bolt Sweatshirt">
</a> <?php
} ?>
<div class="cart-product-thumbnail-name"><?php echo $urun["urun"]; ?></div>
</td>
<td style="width: 10%;" class="cart-product-price">
<span class="amount"><i class="fa fa-try"></i><?php echo $urun["fiyat"]; ?></span>
</td>
<td style="width: 10%;" class="cart-product-quantity">
<div class="quantity">
<input type="text" class="qty" value="<?php echo $urun["adet"]; ?>" readonly name="quantity">
</div>
</td>
<?php $toplam = $urun["adet"]*$urun["fiyat"]; ?>
<td style="width: 10%;" class="cart-product-subtotal">
<span class="amount"><i class="fa fa-try"></i><?php echo $toplam; ?></span>
</td>
</tr>
</tbody>
</table>
</div>
<?php
$geneltoplam += $toplam;
} }
if ($say==0) { } else { ?>
<!--deneem-->
<div class="col-md-12 p-r-10 ">
<div class="table-responsive">
<h4>Sepet Toplamı</h4>
<table class="table">
<tbody>
<tr>
<td class="cart-product-name">
<strong>Genel Toplam</strong>
</td>
<td class="cart-product-name text-right">
<span class="amount color lead"><strong><i class="fa fa-try"></i><?php echo $geneltoplam; ?></strong></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-md-2">
<a href="urunler" type="button" class="btn btn-success">ALIŞVERİŞE DEVAM ET</a>
</div>
<div class="col-md-4">
<form action="" method="POST" >
<div class="col-md-4 col-sm-4 col-xs-12 text-left">
<button type="submit" name="sepetbosalt" class="btn btn-danger">SEPETİ BOŞALT</button>
</div>
</form>
</div>
<div class="col-md-6 text-right">
<a href="satin-al" type="button" class="btn btn-success">Satın Al</a>
</div>
</div>
<!--deneem-->
<?php
}
?>
</div>
</div>
</section>
<!-- end: SHOP CART -->
<?php include 'include/footer.php'; ?>