Sha256: d2de1a363d7d1d23d9d1e0df3148eb1cd129e3cef2512c8c17c7dcd389bb6d20

Contents?: true

Size: 768 Bytes

Versions: 14

Compression:

Stored size: 768 Bytes

Contents

<% if object.reflections.keys.include?(: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

14 entries across 14 versions & 1 rubygems

Version Path
piggybak-0.6.34 app/views/piggybak/cart/_form.html.erb
piggybak-0.7.3 app/views/piggybak/cart/_form.html.erb
piggybak-0.7.2 app/views/piggybak/cart/_form.html.erb
piggybak-0.7.1 app/views/piggybak/cart/_form.html.erb
piggybak-0.7.0 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.33 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.32 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.31 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.30 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.29 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.28 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.27 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.26 app/views/piggybak/cart/_form.html.erb
piggybak-0.6.25 app/views/piggybak/cart/_form.html.erb