-
Notifications
You must be signed in to change notification settings - Fork 0
/
product-gallery.php
41 lines (40 loc) · 1.47 KB
/
product-gallery.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
<?php
require_once ("Product.php");
$product = new Product();
$productArray = $product->getAllProduct();
?>
<div id="product-grid">
<div class="txt-heading">Products<a id="btnEmpty" class="cart-action" onClick="checkout();"><img src="images/icon-empty.png" /> Check Out</a></div>
<?php
if (! empty($productArray)) {
foreach ($productArray as $k => $v) {
?>
<div class="product-item">
<form id="frmCart">
<div class="product-image">
<img src="<?php echo $productArray[$k]["image"]; ?>">
</div>
<div>
<div class="product-info">
<strong><?php echo $productArray[$k]["name"]; ?></strong>
</div>
<div class="product-info product-price"><?php echo "$".$productArray[$k]["price"]; ?></div>
<div class="product-info">
<button type="button"
id="add_<?php echo $productArray[$k]["code"]; ?>"
class="btnAddAction cart-action"
onClick="cartAction('add','<?php echo $productArray[$k]["code"]; ?>')">
<img src="images/add-to-cart.png" />
</button>
<input type="text"
id="qty_<?php echo $productArray[$k]["code"]; ?>"
name="quantity" value="1" size="2" />
</div>
</div>
</form>
</div>
<?php
}
}
?>
</div>