spree/spree — Issue #1196: [Thumbnails] logical error?
Author: fu-media
Created: 2012-02-26 08:33:11+00:00
State: open

In the default source, product variants would not be display, if you have only one Product Image.

This is in my eyes a wrong logical thing, it should be "if there is a image and variants, display the images and variants"

````erb

<% if product.images.size > 1 || @product.has_variants? %>

<%-#if product.images.size > 1 %>
<% product.images.each do |i| %>

<%= link_to image_tag(i.attachment.url(:mini)), i.attachment.url(:product) %>

<% end %>
<%-# end %>

<% if @product.has_variants?
@variants.each do |v|
if v.available?
v.images.each do |i| %>

<%= link_to image_tag(i.attachment.url(:mini)), i.attachment.url(:product) %>

<%
end
end
end
end
%>

<% end %>
````