Sha256: eeb9999da1b4f3046bde5f50511703282a68eeea2563b036b0e04478c8e2a8b0

Contents?: true

Size: 754 Bytes

Versions: 4

Compression:

Stored size: 754 Bytes

Contents

<% if object.respond_to?(:piggybak_sellable) -%>
	<% if object.piggybak_sellable && object.piggybak_sellable.active -%>
		<% if object.piggybak_sellable.quantity > 0 || object.piggybak_sellable.unlimited_inventory -%>
			<%= form_tag piggybak.cart_add_url, locals[:options] do -%>
			<div id="sellable_details">
			<span id="title"><%= object.piggybak_sellable.description %></span>
			<span id="price"><%= number_to_currency object.piggybak_sellable.price %></span>
			</div>
			<label>Quantity</label>
			<%= text_field_tag :quantity, "1" %>
			<%= hidden_field_tag :sellable_id, object.piggybak_sellable.id %>
			<%= submit_tag "Add to Cart", :id => "submit" %>
			<% end -%>
			<% else -%>
			Sorry, out of stock.
		<% end -%>
	<% end -%>
<% end -%>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
piggybak-0.7.7 app/views/piggybak/cart/_form.html.erb
piggybak-0.7.6 app/views/piggybak/cart/_form.html.erb
piggybak-0.7.5 app/views/piggybak/cart/_form.html.erb
piggybak-0.7.4 app/views/piggybak/cart/_form.html.erb