This commit is contained in:
@@ -2,18 +2,18 @@
|
||||
|
||||
function product_card($product)
|
||||
{
|
||||
$card = '
|
||||
<a class="card column center full_width padding" href="product.php?id=' . $product['id'] . '">
|
||||
$card = '
|
||||
<a class="card column center full_width padding shadow" href="product.php?id=' . $product['id'] . '">
|
||||
<div class="img_container">
|
||||
<img src="img/' . $product['image'] . '">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<h4>' . $product['name'] . '</h4>
|
||||
<h5>' . $product['price'] . '</h5>
|
||||
<div class="column">
|
||||
<h5>' . $product['name'] . '</h5>
|
||||
<p>' . format_money($product['price']) . '</p>
|
||||
</div>
|
||||
</a>
|
||||
';
|
||||
|
||||
return $card;
|
||||
return $card;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
function catalog_grid($products)
|
||||
{
|
||||
$grid = '
|
||||
<div class="grid center">
|
||||
<div class="grid center glass padding-top padding-bottom padding-left">
|
||||
';
|
||||
|
||||
foreach ($products as $p)
|
||||
|
||||
@@ -2,25 +2,26 @@
|
||||
function product_page($product)
|
||||
{
|
||||
$page = '
|
||||
<div class="product_page_card column center full_width padding">
|
||||
<div class="product_page_card glass column center full_width padding margin-top">
|
||||
<div class="img_container">
|
||||
<img src="img/' . $product['image'] . '">
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="column card full_width padding margin-top shadow" style="height: auto;">
|
||||
<div class="row space_between">
|
||||
<h3>' . $product['name'] . '</h3>
|
||||
<h3>' . $product['price'] . '</h3>
|
||||
<h3>' . format_money($product['price']) . '</h3>
|
||||
</div>
|
||||
|
||||
<p>' . $product['description'] . '</p>
|
||||
<form class="row" id="add_to_cart">
|
||||
<input type="hidden" name="is_logged_in" value="' . (isset($_SESSION['id']) ? 'true' : 'false') . '">
|
||||
<div class="column margin">
|
||||
<form class="row space_between" id="add_to_cart">
|
||||
<input type="hidden" name="is_logged_in" value="' . (isset($_SESSION['id']) ? 'true' : 'false') . '" id="is_logged_in">
|
||||
<input type="hidden" name="product_id" value="' . $product['id'] . '" id="product_id">
|
||||
<div class="column margin center_children">
|
||||
<label for="quantity">Quantity:</label>
|
||||
<input type="number" value="1" id="quantity" name="quantity" min="1">
|
||||
<input type="number" value="1" id="quantity" name="quantity" min="1" class="md_width">
|
||||
</div>
|
||||
|
||||
<input type="submit" value="Add to Cart" class="margin">
|
||||
<input type="submit" class="margin" id="add_to_cart_btn" value="Add to Cart">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user