File size: 7,039 Bytes
bdb1674
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?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'; ?>