Sha256: d7d6b0cf6fe141d71567df7f22690fd15f3b98960bf31e091ec9f390986e9190

Contents?: true

Size: 740 Bytes

Versions: 5

Compression:

Stored size: 740 Bytes

Contents

<% if object.reflections.keys.include?(:piggybak_variant) -%>
	<% if object.piggybak_variant && object.piggybak_variant.active -%>
		<% if object.piggybak_variant.quantity > 0 || object.piggybak_variant.unlimited_inventory -%>
			<%= form_tag piggybak.cart_add_url do -%>
			<div id="variant_details">
			<span id="title"><%= object.piggybak_variant.description %></span>
			<span id="price"><%= number_to_currency object.piggybak_variant.price %></span>
			</div>
			<label>Quantity</label>
			<%= text_field_tag :quantity, "1" %>
			<%= hidden_field_tag :variant_id, object.piggybak_variant.id %>
			<%= submit_tag "Add to Cart", :id => "submit" %>
			<% end -%>
			<% else -%>
			Sorry, out of stock.
		<% end -%>
	<% end -%>
<% end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
piggybak-0.5.5 app/views/piggybak/cart/_form.html.erb
piggybak-0.5.4 app/views/piggybak/cart/_form.html.erb
piggybak-0.5.3 app/views/piggybak/cart/_form.html.erb
piggybak-0.5.2 app/views/piggybak/cart/_form.html.erb
piggybak-0.5.1 app/views/piggybak/cart/_form.html.erb