Skip to content

Commit

Permalink
Categories working
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshShah1997 committed Aug 12, 2016
1 parent d0a88cb commit 9c2084e
Show file tree
Hide file tree
Showing 13 changed files with 283 additions and 187 deletions.
Binary file modified database.db
Binary file not shown.
399 changes: 213 additions & 186 deletions main.py

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/uploads/Untitled_0026_by_Mike_Sinko.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/uploads/Untitled_7019_by_Mike_Sinko.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/uploads/Untitled_by_Aaron_Burden.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/uploads/Untitled_by_Troy_Jarrell.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/uploads/Yellow_Jacket_by_Manuel_Frei.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions templates/displayCategory.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Category: {{categoryName}}</title>
<link rel="stylesheet" href={{ url_for('static', filename='css/home.css') }} />
<link rel="stylesheet" href={{ url_for('static', filename='css/topStyle.css') }} />
</head>
<body>
<div id="title">
<a href="/">
<img id="logo" src= {{ url_for('static', filename='images/logo.png') }} />
</a>
<form>
<input id="searchBox" type="text" name="searchQuery">
<input id="searchButton" type="submit" value="Search">
</form>

{% if not loggedIn %}
<div id="signInButton">
<a class="link" href="/loginForm">Sign In</a>
</div>
{% else %}
<div id="displayUserId">Hello, <br>{{firstName}}</div>
<div id="signInButton">
<a class="link" href="/logout">Sign Out</a>
</div>
{% endif %}
<div id="kart">
<a class="link" href="/cart">
<img src={{url_for('static', filename='images/shoppingCart.png')}} id="cartIcon" />
CART {{noOfItems}}
</a>
</div>
</div>

<div>
<h2>Showing all products of Category {{categoryName}}:</h2>
{% for itemData in data %}
<table>
<tr id="productName">
{% for row in itemData %}
<td>
{{row[1]}}
</td>
{% endfor %}
</tr>
<tr id="productImage">
{% for row in itemData %}
<td>
<a href="/productDescription?productId={{row[0]}}">
<img src={{ url_for('static', filename='uploads/' + row[3]) }} id="itemImage" />
</a>
</td>
{% endfor %}
</tr>
<tr id="productPrice">
{% for row in itemData %}
<td>
${{row[2]}}
</td>
{% endfor %}
</tr>
</table>
{% endfor %}
</div>
</body>
</html>
2 changes: 2 additions & 0 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ <h2>Shop by Category: </h2>
</div>
<div>
<h2>Items</h2>
{% for data in itemData %}
<table>
<tr id="productName">
{% for row in data %}
Expand All @@ -68,6 +69,7 @@ <h2>Items</h2>
{% endfor %}
</tr>
</table>
{% endfor %}
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<p>Email: <input type="text" name="email"></p>
<p>Password: <input type="password" name="password"></p>
<p><input type="submit"></p>
<a href="/register.html">Register here</a>
<a href="/registerationForm">Register here</a>
</form>

</body>
Expand Down

0 comments on commit 9c2084e

Please sign in to comment.