<%# no need for thumbnails unless there is more than one image %>
<% if (@product.images + @product.variant_images).uniq.size > 1 %>
  <ul id="product-thumbnails" class="thumbnails inline" data-hook>
    <% @product.images.each do |i| %>
      <li class='tmb-all' id='tmb-<%= i.id %>'>
        <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product), :class => 'tmb-all', :id => "tmb-#{i.id}") %>
      </li>
    <% end %>

    <% if @product.has_variants? %>
      <% @product_variant.images.each do |i| %>
        <% next if @product.images.include?(i) %>
        <li class='vtmb-<%= v.id %> vtmb' id='tmb-<%= i.id %>'>
          <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>
        </li>
      <% end %>
    <% end %>
  </ul>
<% end %>

<%# no need for thumbnails unless there is more than one image %>
<% if (@product.images + @product.variant_images).uniq.size > 1 %>
  <ul id="product-thumbnails" class="thumbnails inline" data-hook>
    <% @product.images.each do |i| %>
      <li class='tmb-all' id='tmb-<%= i.id %>'>
        <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product), :class => 'tmb-all', :id => "tmb-#{i.id}") %>
      </li>
    <% end %>

    <% if @product.has_variants? %>
      <% @product.variant_images.each do |i| %>
        <% next if @product.images.include?(i) %>
        <li class='vtmb-<%= v.id %> vtmb' id='tmb-<%= i.id %>'>
          <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>
        </li>
      <% end %>
    <% end %>
  </ul>
<% end %>

Fix incorrect syntax in products/_thumbnails for @product.variant_images
Fix incorrect syntax in products/_thumbnails for @product.variant_images
