Skip to content
Browse files

Added basic cart form to item detail

  • Loading branch information...
1 parent 1dfaf98 commit ec1aa04980358cb0dec3a394f2b5c36058c20c0f @quirkey quirkey committed Jan 1, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 templates/item_detail.template
View
10 templates/item_detail.template
@@ -4,6 +4,16 @@
<div class="item-artist"><%= item.artist %></div>
<div class="item-title"><%= item.title %></div>
<div class="item-price">$<%= item.price %></div>
+ <div class="item-form">
+ <form action="#/cart" method="post">
+ <input type="hidden" name="item_id" value="<%= params['id'] %>" />
+ <p>
+ <label>Quantity:</label>
+ <input type="text" size="2" name="quantity" value="1" />
+ </p>
+ <p><input type="submit" value="Add to Cart" /></p>
+ </form>
+ </div>
<div class="item-link"><a href="<%= item.url %>">Buy this item on Amazon</a></div>
<div class="back-link"><a href="#/">&laquo; Back to Items</a></div>
</div>

0 comments on commit ec1aa04

Please sign in to comment.
Something went wrong with that request. Please try again.