<% size = (digital_links.size > 3 ? 4 : digital_links.size) %>
<% group_size, col_size = [size, 12/size] %>

<% digital_links.in_groups_of(group_size, false).each do |dls| %>
  <div class="row">
    <% dls.each do |digital_link| %>
      <div class='digital-link text-center <%= "col-sm-#{col_size}" %>'>
        <div class='digital-link-image'>
          <%= image_or_noimage_tag(digital_link.variant.product.images.first , {size: :small}) %>
        </div>
        <%= link_to t(:download), spree.digital_url(secret: digital_link.secret), class: 'btn btn-primary digital-link-download' %>
      </div>
    <% end %>
  </div>
<% end %>  

<% size = (digital_links.size > 3 ? 4 : digital_links.size) %>
<% group_size, col_size = [size, 12/size] %>

<% digital_links.in_groups_of(group_size, false).each do |dls| %>
  <div class="row">
    <% dls.each do |digital_link| %>
      <div class='digital-link text-center <%= "col-sm-#{col_size}" %>'>
        <div class='digital-link-image'>
          <%= link_to spree.product_url(digital_link.variant.try(:product)) do %>
            <%= image_or_noimage_tag(digital_link.variant.product.images.first , {size: :small}) %>
          <% end %>
        </div>
        <%= link_to t(:download), spree.digital_url(secret: digital_link.secret), class: 'btn btn-primary digital-link-download' %>
      </div>
    <% end %>
  </div>
<% end %>  

Add link to product show in order/digital_links
Add link to product show in order/digital_links
