forked from birny/shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
product.php
98 lines (78 loc) · 3.97 KB
/
product.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
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
<?php
include_once 'header.php';
if (empty($_GET['id'])) {
header('Location: index.php');
exit();
}
$id = intval($_GET['id']);
$query = $db->prepare('SELECT * FROM products WHERE id = :id');
$query->bindValue('id', $id, PDO::PARAM_INT);
$query->execute();
$full_product = $query->fetch();
?>
<div class="row">
<?php include 'sidebar-product.php' ?>
<div class="col-md-9">
<div class="product-full">
<div class="thumbnail">
<img class="img-responsive" src="<?= getProductPicture($full_product['picture']) ?>" alt="">
<div class="caption-full">
<h4 class="pull-right"><?= $full_product['price'] ?> €</h4>
<h4><?= $full_product['name'] ?></h4>
<?= nl2br($full_product['description']) ?>
</div>
<div class="ratings">
<?= getProductRating($full_product['rating']) ?>
</div>
<div class="btns text-center clearfix">
<a class="btn btn-success" href=""><span class="glyphicon glyphicon-shopping-cart"></span> Add to cart</a>
</div>
</div><!-- /.thumbnail -->
</div><!-- /.product-full -->
<div class="well">
<div class="text-right">
<a class="btn btn-primary">Leave a Review</a>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star-empty"></span>
Anonymous
<span class="pull-right">10 days ago</span>
<p>This product was great in terms of quality. I would definitely buy another!</p>
</div>
</div><!-- /.row -->
<hr>
<div class="row">
<div class="col-md-12">
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star-empty"></span>
Anonymous
<span class="pull-right">12 days ago</span>
<p>I've alredy ordered another one!</p>
</div>
</div><!-- /.row -->
<hr>
<div class="row">
<div class="col-md-12">
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star-empty"></span>
Anonymous
<span class="pull-right">15 days ago</span>
<p>I've seen some better than this, but not at this price. I definitely recommend this item.</p>
</div>
</div><!-- /.row -->
</div><!-- /.well -->
</div><!-- /.col-md-9 -->
</div><!-- /.row -->
<?php include_once 'footer.php' ?>