Sha256: 6fcbadd977060bd9ffdb377a07086bee27f1e957e6914b8d9ac0327154686a81

Contents?: true

Size: 1.06 KB

Versions: 11

Compression:

Stored size: 1.06 KB

Contents

<% if object.reflections.keys.include?(:variants) -%>
	<%= javascript_include_tag "piggybak_variants/piggybak_variants" %>

	<script type="text/javascript">
		var variant_map = <%= raw variant_map(object) %>;
	</script>

	<div class="variant_options">
		<% options_for_klass(object.class).each do |option| -%>
		<div class="option" id="option_<%= option.id %>">
		<h4><%= option.name %></h4>
		<% option.option_values.ordered.each do |option_value| -%>
			<input type="radio" name="option_<%= option.id %>" value="<%= option_value.id %>" />
			<%= option_value.name %><br />
		<% end -%>
		<br />
		</div>
		<% end -%>
		<span class="all_selected">You must select an choice from each option.</span>
		<span class="unavailable">This combination is not available.</span>
		<%= form_tag piggybak.cart_add_url do -%>
		<input type="hidden" id="sellable_id" name="sellable_id" />
		<div id="variant_price">Price: <span></span></div>
		<label for="quantity">Quantity</label>
		<%= text_field_tag :quantity, 1 %>
		<%= submit_tag "Add to Cart", :id => "submit" %>
		<% end -%>
	</div>
<% end -%>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
piggybak_variants-0.0.17 app/views/piggybak_variants/cart/_radio_buttons_form.html.erb
piggybak_variants-0.0.15 app/views/piggybak_variants/cart/_radio_buttons_form.html.erb
piggybak_variants-0.0.14 app/views/piggybak_variants/cart/_radio_buttons_form.html.erb
piggybak_variants-0.0.13 app/views/piggybak_variants/cart/_form.html.erb
piggybak_variants-0.0.12 app/views/piggybak_variants/cart/_form.html.erb
piggybak_variants-0.0.11 app/views/piggybak_variants/cart/_form.html.erb
piggybak_variants-0.0.10 app/views/piggybak_variants/cart/_form.html.erb
piggybak_variants-0.0.9 app/views/piggybak_variants/cart/_form.html.erb
piggybak_variants-0.0.8 app/views/piggybak_variants/cart/_form.html.erb
piggybak_variants-0.0.7 app/views/piggybak_variants/cart/_form.html.erb
piggybak_variants-0.0.6 app/views/piggybak_variants/cart/_form.html.erb