%
paginated_products = @searcher.retrieve_products if params.key?(:keywords)
paginated_products ||= products
%>
<% content_for :head do %>
<% if paginated_products.respond_to?(:total_pages) %>
<%= rel_next_prev_link_tags paginated_products %>
<% end %>
<% end %>
<% if products.empty? %>
<%= t('spree.no_products_found') %>
<% elsif params.key?(:keywords) %>
<%= t('spree.search_results', keywords: h(params[:keywords])) %>
<% end %>
<% if products.any? %>
<% products.each do |product| %>
<% url = spree.product_path(product, taxon_id: @taxon.try(:id)) %>
- " data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
<% cache(@taxon.present? ? [I18n.locale, current_pricing_options, @taxon, product] : [I18n.locale, current_pricing_options, product]) do %>
<%= link_to(render('spree/shared/image', image: product.gallery.images.first, size: :small, itemprop: "image"), url, itemprop: 'url') %>
<%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
<% if price = product.price_for(current_pricing_options) %>
<%= price.to_html %>
<% end %>
<% end %>
<% end %>
<% reset_cycle("classes") %>
<% end %>
<% if paginated_products.respond_to?(:total_pages) %>
<%= paginate paginated_products %>
<% end %>