-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCheesecakes.php
More file actions
175 lines (154 loc) · 5.27 KB
/
Cheesecakes.php
File metadata and controls
175 lines (154 loc) · 5.27 KB
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
<?php
include_once("header.php");
include('hms/include/config.php');
?>
<!-- Section -->
<section class="hero5">
<a href="./index.php">HOME</a>/<a href="">SHOP</a>
<h2>Cheese Cakes</h2>
</section>
<div class="sel">
<div class="container">
<div class="row">
<?php
$procat='cheesecake';
$sql=mysqli_query($con,"select * from product where procat='$procat'");
while($row=mysqli_fetch_array($sql))
{
?>
<div class="col-xs-12 col-md-12 col-ds-3 col-lg-3">
<div class="card bs">
<img src="hms/images/<?php echo $row['proimg'];?>" class="card-img-top" alt="..." height="200px">
<div class="card-body">
<h5 class="card-title"><?php echo $row['proname'];?></h5>
<b>Rs. <?php echo $row['proprice'];?></b>
<a href="desc.php?id=<?php echo $row['id']; ?>"><button>Make Order</button></a>
<form class="form-submit">
<input type="hidden" class="pname" value="<?php echo $row['proname'];?>">
<input type="hidden" class="pprice" value="<?php echo $row['proprice'];?>">
<input type="hidden" class="pimage" value="<?php echo $row['proimg'];?>">
<input type="hidden" class="pcode" value="<?php echo $row['id'];?>">
<button id="addItem" class="btn-success btn button">Add To Cart</button>
<div class="alert-message"></div>
</form>
</div>
</div>
</div>
<!-- <div class="col-xs-12 col-md-12 col-ds-3 col-lg-3">
<div class="card bs">
<img src="Images/CheesecakeJapanese.jpeg" class="card-img-top" alt="..." height="200px">
<div class="card-body">
<h5 class="card-title">Japanese Cheesecake</h5>
<b>Rs. 1,150.00</b>
<a href=""><button>Add To Cart</button></a>
<a href="./Japanese-Cheesecake.php"><button>Make Order</button></a>
</div>
</div>
</div>
<div class="col-xs-12 col-md-12 col-ds-3 col-lg-3">
<div class="card bs">
<img src="Images/CheesecakeNewyork.jpeg" class="card-img-top" alt="..." height="200px">
<div class="card-body">
<h5 class="card-title">Newyork Cheescake</h5>
<b>Rs. 1,400.00</b>
<a href=""><button>Add To Cart</button></a>
<a href="./Newyork-Cheescake.php"><button>Make Order</button></a>
</div>
</div>
</div>
<div class="col-xs-12 col-md-12 col-ds-3 col-lg-3">
<div class="card bs">
<img src="Images/CheesecakeBasque.jpeg" class="card-img-top" alt="..." height="200px">
<div class="card-body">
<h5 class="card-title">Basque Cheescake</h5>
<b>Rs. 1,150.00</b>
<a href=""><button>Add To Cart</button></a>
<a href="./Basque-Cheescake.php"><button>Make Order</button></a>
</div>
</div>
</div> -->
<?php } ?>
</div>
</div>
</div>
<?php
include_once("footer.php");
?>
<!-- <script>
$(document).ready(function(){
$(document).on('click','#addItem',function(e){
e.preventDefault();
var form=$(this).closest(".form-submit");
var pcode=form.find('.pcode').val();
var pname=form.find('.pname').val();
var pimage=form.find('.pimage').val();
var pprice=form.find('.pprice').val();
//var $this = $(this);
var alertmsg=form.find('.alert-message');
$.ajax({
url:'action.php',
method:'post',
data:{pcode:pcode,pname:pname,pimage:pimage,pprice:pprice},
success:function(response){
console.log(response);
alertmsg.html(response);
// $this.closest('.alert-message').html(response)
//$(this).closest('.alert-message').html(response);
//alertmsg.html(response);
//window.scrollto(0,0);
load_cart_item_number();
}
});
});
load_cart_item_number();
function load_cart_item_number(){
$.ajax({
url:'action.php',
method:'get',
data:{cartItem:"cart_item"},
success:function(response){
$("#cart-item").html(response);
}
});
}
});
</script> -->
<script>
$(document).ready(function(){
$(document).on('click','#addItem',function(e){
e.preventDefault();
var form=$(this).closest(".form-submit");
var pcode=form.find('.pcode').val();
var pname=form.find('.pname').val();
var pimage=form.find('.pimage').val();
var pprice=form.find('.pprice').val();
//var $this = $(this);
var alertmsg=form.find('.alert-message');
$.ajax({
url:'action.php',
method:'post',
data:{pcode:pcode,pname:pname,pimage:pimage,pprice:pprice},
success:function(response){
console.log(response);
alertmsg.html(response);
// $this.closest('.alert-message').html(response)
//$(this).closest('.alert-message').html(response);
//alertmsg.html(response);
//window.scrollto(0,0);
load_cart_item_number();
}
});
});
load_cart_item_number();
function load_cart_item_number(){
$.ajax({
url:'action.php',
method:'get',
data:{cartItem:"cart_item"},
success:function(response){
$("#cart-item").html(response);
}
});
}
});
</script>