📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
b2be-ticaretscripti.demodesign.com.tr
/
ninico
📝
sepet.php
← Geri Dön
<title>Alışveriş Sepetim</title> <meta name="keywords" content="<?php echo $ayar['sitekey']; ?>"> <meta name="description" content="<?php echo $ayar['sitedesc']; ?>"> <meta property="og:url" content="<?php echo $url; ?>"/> <meta property="og:title" content="Alışveriş Sepetim"/> <meta property="og:description" content="<?php echo $ayar['sitedesc']; ?>"/> <?php if (isset($_POST['sepetupdate'])) { $urunid = temizle($_POST['urunid']); $adet = temizle($_POST['adet']); $sepetid = temizle($_POST['sepetid']); $sepeturunid = $ozy->query("select * from urunler where id='$urunid'")->fetch(PDO::FETCH_ASSOC); if ($sepeturunid['alode'] == '1' and $_POST['adet'] >= $sepeturunid['al']) { $sonadet = temizle($_POST['adet']); $alodedurum = "1"; $yeniadet = $sonadet / $sepeturunid['al']; $adet = ceil($yeniadet * $sepeturunid['ode']); $alodedurum = "1"; $kazanc = $sonadet - $adet; $alodemetin = "" . $kazanc . " ADET ÜRÜN HEDİYE"; $alodeadet = $kazanc; } else { $adet = temizle($_POST['adet']); $alodedurum = "0"; $alodemetin = ""; $alodeadet = ""; } $stok = $sepeturunid['stok']; if ($system['sinirsizstok'] != '1') { if ($adet > $stok) { echo '<script type="text/javascript">$(document).ready(function(){toastr["error"]("' . $sepeturunid['adi'] . ' isimli üründen en fazla ' . $stok . ' adet alabilirsiniz.", "Başarısız");});</script>'; } else { $sepguncelle = $ozy->prepare("update sepet set adet=?, alodedurum=?, alodemetin=?, alodeadet=? where id=?"); $sepguncelle->execute([$adet, $alodedurum, $alodemetin, $alodeadet, $sepetid]); if ($sepguncelle) { header("Location:" . $url . "/sepet/"); } } } else { $sepguncelle = $ozy->prepare("update sepet set adet=?, alodedurum=?, alodemetin=?, alodeadet=? where id=?"); $sepguncelle->execute([$adet, $alodedurum, $alodemetin, $alodeadet, $sepetid]); if ($sepguncelle) { header("Location:" . $url . "/sepet/"); } } } if (isset($_POST['deletex'])) { $sepetkaldiralim = temizle($_POST['sepetid']); $sil = $ozy->prepare("DELETE FROM sepet WHERE id=?"); $sil->execute([$sepetkaldiralim]); header("Location: " . $url . "/sepet/"); } ?> <style> @media screen and (max-width: 600px) { .cart-page { display: block !important; } .cart-page div { width: 100% !important; } .cart-page .cart-bottom { width: 100% !important; } } .nice-select { float: unset !important; width: 100% !important; padding-left: 15px !important; padding-top: 0px !important; } </style> <main> <section class="breadcrumb__area pt-60 pb-60 tp-breadcrumb__bg" data-background="<?php echo $sitetemasi; ?>/img/banner/breadcrumb-01.jpg"> <div class="container"> <div class="row align-items-center"> <div class="col-xl-7 col-lg-12 col-md-12 col-12"> <div class="tp-breadcrumb"> <div class="tp-breadcrumb__link mb-10"> <span class="breadcrumb-item-active"><a href="<?php echo $url;?>">AnaSayfa</a></span> <span>Sepetim</span> </div> <h2 class="tp-breadcrumb__title">Sepetim</h2> </div> </div> </div> </div> </section> <section class="cart-area pt-80 pb-80 wow fadeInUp" data-wow-duration=".8s" data-wow-delay=".2s"> <div class="container"> <div class="row"> <?php if($sepetsayi<='0'){?> <div class="col-md-12"> <div class="card-body cart"> <div class="col-sm-12 empty-cart-cls text-center" style="text-align: center;"> <img style="margin: auto !important;width: 200px;" src="<?php echo $sitetemasi;?>/user/sepetbos.png" width="100" height="100" class="img-fluid mb-4 mr-3"> <h5><strong>Alışverişiz Sepetiniz Boş</strong></h5> <h5>Biraz Gezinmeye Ne Dersin :)</h5> <a href="<?php echo $url;?>" style="background: <?php echo $tema['t16'];?>;border: none;" class="btn btn-primary cart-btn-transform m-3" data-abc="true">hadi gezinelim :)</a> </div> </div> </div> <?php } else { ?> <div class="col-12"> <?php if($uyebilgileri['bayi']=='1'){?> <div class="col-lg-12" style="padding-top:20px !important;padding: 10px;background: #f1eded;margin-bottom: 20px;"> <div class="col-lg-12" style="text-align: center;"> Hoşgeldiniz Sayın, <b><?php echo $uyebilgileri['isim'];?></b> </br> İndirim oranınız : <b>(%<?php echo $oranbayi['oran'];?>)</b> </br> Minimun Sepet Bedeli : <b> <?php echo sfiyatgoster($oranbayi['sepetlimit']);?></b> </br> </div> <div class="col-lg-12" style="background: white; padding: 10px;text-align: center; margin-top: 20px;margin-bottom: 20px;"> Toplam Sepet Tutarı : <b><?php echo $ctoplamtutari;?></b> </br> Sonra Ödenecek Tutar : <b><?php echo $caritutari;?></b> </br> <?php if($caritutar!='0'){?> Ödeme Tarihi : <b><?php echo $caritarih['caritarih'];?></b></br> <?php } ?> Şimdi Ödenecek Sipariş Tutarı : <b><?php echo $toplamtutari;?></b> </br> <?php if($caritutar!='0'){?> </br><a style="font-size: 12px;background: #dd1616a8;color: white;padding: 10px;" href="sepet/?carisil">Cari Hesap Tutarını Sil</a> <?php } ?> </br> </br> <form method="POST" action=""> <div class="form-group" style=" width: 100%;"> <label><b>Siparişinizin bir kısmını cari hesabınızla sonra ödeyebilirsiniz.</b></label> <input style="margin-right: 2%;margin-bottom:5px;" type="text" class="form-control" name="caritutar" placeholder="Sonra ödemek istediğiniz tutarı giriniz. (<?php echo $sembol;?> Bazında Düşüm Olacaktır.)" required> <input style="margin-right: 2%;margin-bottom:5px;" type="date" class="form-control" name="caritarih" placeholder="Ödeme yapacağınız tarihi giriniz" required> <span class="input-group-append"> <button class="tp-btn tp-color-btn banner-animation" type="submit" name="cariguncelle" style="width: 100%; margin-block-start: 10px;">Cari Ödeme Uygula</button> </span> </div> </form> </div> </div> <?php } ?> </div> <div class="col-12"> <div class="table-content table-responsive"> <table class="table"> <thead> <tr> <th class="product-thumbnail">Resim</th> <th class="cart-product-name">Ürün Adı</th> <th class="product-price">Ürün Kodu</th> <th class="product-quantity">Adet</th> <th class="product-subtotal">Birim Fiyatı</th> <th class="product-subtotal">Tutarı</th> </tr> </thead> <tbody> <?php if (isset($_GET['bayino'])) { $sepetimdekikim = $_GET['bayino']; } else { $sepetimdekikim = temizle($_SESSION['uyeid']); } $sepetebak = $ozy->prepare("SELECT * FROM sepet WHERE gelenkim=?"); $sepetebak->execute([$sepetimdekikim]); if ($sepetebak->rowCount()) { $uyesepeti = $ozy->prepare("SELECT * FROM urunler INNER JOIN sepet ON urunler.id = sepet.urunid WHERE sepet.gelenkim=? ORDER BY sepet.id DESC"); $uyesepeti->execute([$sepetimdekikim]); foreach ($uyesepeti as $sepet) { ?> <tr> <td class="product-thumbnail"> <a href="urun/<?php echo $sepet['seo']; ?>"> <img src="resimler/urunler/<?php echo $sepet['resim']; ?>" alt=""> </a> </td> <td class="product-name"> <a href="urun/<?php echo $sepet['seo']; ?>"> <?php echo $sepet['adi']; ?> <small> <?php if ($sepet['kargo'] == '1') { ?> <br> <span class="badge1"> <i class="fa fa-truck"></i> ÜCRETSİZ KARGO </span> <?php } ?> <?php if ($sepet['alodedurum'] == '1') { ?> <br> <br> <span class="badge2"> <i class="fa fa-gift"></i> <?php echo $sepet['alodemetin']; ?> </span> <?php } ?> </small> <br /> <small><?php echo $sepet['ekurun']; ?></small> </a> </td> <td class="product-name"> <a href="urun/<?php echo $sepet['seo']; ?>"><?php echo $sepet['urunkodu']; ?></a> </td> <td class="product-quantity"> <form action="" method="POST"> <div style="margin-bottom: 15px;"> <input type="hidden" name="sepetid" value="<?php echo $sepet['id']; ?>"/> <input type="hidden" name="urunid" value="<?php echo $sepet['urunid']; ?>"/> <span class="cart-minus" id="AdetAzalt<?php echo $sepet['id']; ?>">-</span> <?php if ($sepet['alodedurum'] == '1') { ?> <?php $newstok = $sepet['adet'] + $sepet['alodeadet']; ?> <?php } else { ?> <?php $newstok = $sepet['adet']; ?> <?php } ?> <?php if ($system['sinirsizstok'] != '1') { ?> <input type="text" data-type="number" pattern="[0-9]*" id="NormalAdeti<?php echo $sepet['id']; ?>" onchange="this.form.submit()" name="adet" value="<?php echo $newstok; ?>" min="1" max="<?php echo $sepet['stok']; ?>" size="2" class="cart-input"> <?php } else { ?> <input type="text" data-type="number" pattern="[0-9]*" id="NormalAdeti<?php echo $sepet['id']; ?>" onchange="this.form.submit()" name="adet" value="<?php echo $newstok; ?>" min="1" max="9999999999999999999" class="cart-input"> <?php } ?> <span class="cart-plus" id="AdetArttir<?php echo $sepet['id']; ?>">+</span> </div> <span class="input-group-btn"> <button type="submit" name="sepetupdate" class="btn btn-update" style="border: 1px solid;"><i class="fas fa-sync-alt"></i></button> <button type="submit" name="deletex" class="btn btn-remove" style="border: 1px solid;"><i class="fas fa-trash-alt"></i></button> </span> </form> </td> <td class="product-price"> <span class="amount"><?php echo fiyatgoster($sepet['fiyat'] * 1); ?></span> </td> <td class="product-subtotal"> <span class="amount"><?php echo fiyatgoster($sepet['fiyat'] * $sepet['adet']); ?></span> </td> </tr> <?php } ?> <?php } ?> </tbody> </table> </div> <div class="row"> <div class="col-6"> <form method="POST" action=""> <div class="coupon-all"> <div class="coupon"> <input id="coupon_code" class="input-text" name="kuponadi" value="" placeholder="Kupon Kodunuz" type="text"> <button class="tp-btn tp-color-btn banner-animation" name="kuponguncelle" type="submit">Kuponu Kullan</button> </div> </div> </form> </div> <div class="col-md-6"> <div class="cart-page-total"> <ul class="mb-20"> <li style="height: 63px;"> Hediye Çeki <span> <select name="kuponadi" class="form-control" style="background: #f9f9f9;margin-bottom: 10px;font-weight: 400;height: 50px;" onchange='this.form.submit()'> <option value="0">Aktif Hediye Çeklerim</option> <?php $uyeepostamiz = temizle($uyebilgileri['email']); $cekoku = $ozy->query("select * from kuponlar where durum='1' and sekil='1' and epostalar like '%$uyeepostamiz%' and gtarih>='$buguntarihim' and kullanildi not like '%$uyeepostamiz%' order by id DESC")->fetchAll(PDO::FETCH_ASSOC); foreach ($cekoku as $hediyecek) { ?> <option value="<?php echo $hediyecek['adi']; ?>"><?php echo $hediyecek['adi']; ?></option> <?php } ?> </select> <input type="hidden" name="cekguncelle"> </span> </li> <li> Ara Tutar : <span class="text-right"><?php echo $aratutari; ?></span> </li> <li> KDV : <span class="text-right"><?php echo sfiyatgoster($kdvtutari); ?></span> </li> <li> Kargo Bedeli : <span class="text-right"><?php echo $kargometni; ?></span> </li> <?php if ($kuponindirim != '0') { ?> <li> İndirim Bedeli : <span class="text-right" style="color: red !important;">- <?php echo sfiyatgoster($kuponindirim); ?> <a style="font-size: 19px;" href="sepet/?kuponsil">X</a></span> </li> <?php } ?> <?php if ($cekindirim != '0') { ?> <li> Çek İndirimi : <span class="text-right" style="color: red !important;">- <?php echo sfiyatgoster($cekindirim); ?> <a style="font-size: 19px;" href="sepet/?ceksil">X</a></span> </li> <?php } ?> <?php if ($caritutar != '0') { ?> <li> Sonra Ödenecek Tutar : <span class="text-right" style="color: red !important;">- <?php echo $caritutari; ?> <a style="font-size: 19px;" href="sepet/?carisil">x</a></span> </li> <?php } ?> <li> Ödenecek Tutar : <span class="text-right" style="font-weight: bold; color: #0d0d0d;" class="cart-summary-total-price"><?php echo $toplamtutari; ?></span> </li> <?php if ($para == 'USD' or $para == 'EUR') { ?> <li style="background: #eeebeb;"> <?php echo $toplamtutari; ?> = <span class="text-right" style="font-weight: bold; color: #f75b5b;padding: 5px;" class="cart-summary-total-price"> <?php echo $sontoplamtutarim; ?> TL </span> </li> <?php } ?> </ul> <?php if ($toplamtutarim >= $oranbayi['sepetlimit']) { ?> <a class="tp-btn tp-color-btn banner-animation" href="odeme/" style="width: 100%; text-align: center;"> Sepeti Onayla <i class="fa fa-arrow-right"></i></a> <?php } else { ?> <a class="tp-btn tp-color-btn banner-animation" style="width: 100%; text-align: center;">MİN SEPET TUTARINI AŞMALISINIZ <i class="fa fa-arrow-right"></i></a> <?php } ?> </div> </div> </div> </div> <?php } ?> </div> </div> </section> </main> <script src="<?php echo $sitetemasi; ?>/user/jquery.min.js"></script> <script src="<?php echo $sitetemasi; ?>/user/bootstrap-input-spinner.js"></script> <?php if (isset($_GET['bayino'])) { $sepetimdekikim = $_GET['bayino']; } else { $sepetimdekikim = temizle($_SESSION['uyeid']); } $sepetebak = $ozy->prepare("SELECT * FROM sepet WHERE gelenkim=?"); $sepetebak->execute([$sepetimdekikim]); if ($sepetebak->rowCount()) { $uyesepeti = $ozy->prepare("SELECT * FROM urunler INNER JOIN sepet ON urunler.id = sepet.urunid WHERE sepet.gelenkim=? ORDER BY sepet.id DESC"); $uyesepeti->execute([$sepetimdekikim]); foreach ($uyesepeti as $sepet) { ?> <script type="text/javascript"> jQuery(document).ready(function ($) { $("#AdetArttir<?php echo $sepet['id']; ?>").on("click", function () { var adet = $("#NormalAdeti<?php echo $sepet['id']; ?>").val(); if (adet < 8) { adet++; $("#NormalAdeti<?php echo $sepet['id']; ?>").val(adet); } }); $("#AdetAzalt<?php echo $sepet['id']; ?>").on("click", function () { var adet = $("#NormalAdeti<?php echo $sepet['id']; ?>").val(); if (adet > 0) { adet--; $("#NormalAdeti<?php echo $sepet['id']; ?>").val(adet); } }); $("#NormalAdeti<?php echo $sepet['id']; ?>").keypress(function (e) { var regex = new RegExp("^[0-9]"); var str = String.fromCharCode(!e.charCode ? e.which : e.charCode); if (regex.test(str)) { return true; } e.preventDefault(); return false; }); }); </script> <?php } } ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula