-
Notifications
You must be signed in to change notification settings - Fork 0
/
shop-checkout1.php
52 lines (52 loc) · 1.76 KB
/
shop-checkout1.php
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
<?php require_once('init.php') ?>
<!DOCTYPE html>
<?php
$islogged = isset($_SESSION['in']);
$nocookies = empty(json_decode(DevHelper::getCookies("cart")));
$nodatabase;
if(!$islogged){
if($nocookies)header('location: shop-basket.php');
}else{
$items = [];
$cid = $_SESSION['id'];
$res = DevHelper::select("SELECT `id` from `cart` where `userID` = '$cid'");
if($res){
$cart_id = $res[0]['id'];
$res1 = DevHelper::select("SELECT * from `cart_product` where `cartID` = '$cart_id'");
if($res1!=0){
for($i=0; $i<count($res1); $i++){
$items[$i]['id'] = $res1[$i]['productID'];
$items[$i]['quantity'] = $res1[$i]['quantity'];
}
}else{
header('location: shop-basket.php');
}
}
}
?>
<html>
<?php require_once('inc/head.php');?>
<body>
<div class="wide" id="all">
<?php require_once('inc/topbar.php');?>
<?php require_once('system/modals/login_modal.php'); ?>
<?php require_once('inc/navbar.php')?>
<!-- CHECKOUT STEP 1 SECTION-->
<section class="py-5">
<div class="container py-4">
<div class="row gy-5">
<div class="col-lg-9">
<?php require_once('inc/checkout1.php'); ?>
<?php require_once('inc/checkout2.php'); ?>
<?php require_once('inc/checkout3.php'); ?>
<?php require_once('inc/checkout4.php'); ?>
</div>
</div>
</div>
</section>
<script src = 'system/js/order.js'> </script>
<?php require_once('inc/footer.php'); ?>
</div>
<?php require_once ('inc/load_last.php'); ?>
</body>
</html>