<%= render :partial => 'image' -%>
<%= render :partial => 'thumbnails', :locals => {:product => @product} -%>
<% form_for :product, :url => {:controller => :cart, :action => :add} do |f| %> <% if @product.variants? %> <% else %> /> <% end%> <% end %>
<%= @product.name %>
<%= @product.description %>
Price: <%= @product.price %>
Variants:
    <% @product.variants.each do |v| %> <% next if v.option_values.empty? %>
  • /> <%= variant_options v%>
  • <% end%>
<%= submit_tag 'Add To Cart' %>