<%= product.title %>

<% if product.image_set_array.empty? %> <%# Display a single image placeholder if no images defined. %> <%= image_tag(product.image1.url(:medium), alt: 'product placeholder', class: "thumbnail") %> <%else%> <% product.image_set_array.each do |i| %> <%= link_to( image_tag(product.method("image#{i}").call.url(:medium), alt: "product picture#{i}", class: "thumbnail"), product.method("image#{i}").call.url(:large) ) %> <%end%> <%end%>
Vendor
<%= link_to product.vendor.displayname, profile_path(product.vendor) %>

Stock
<%= sprintf("%g", product.stock) %> <%= product.unitdesc %>

Category
<%= product.category.name %>
<% if product.fe_enabled %>

Escrow
No (Finalize early required)
<%end%>

Description

<%= simple_format h(product.description) %>

Prices

<%= render partial: 'products/unitprices', locals: {product: product, show_price_per_unit: true} %>

Shipping

<%= render partial: 'products/shippingoptions', locals: {product: product} %>

Ships from: <%= product.from_location.description %>

Ships to: <%= product.locations.order(:description).collect{|loc| loc.description}.join(', ') %>

Payment methods available

<%product.payment_methods.each do |pm|%> <%=image_tag("#{pm.name.downcase}.svg", alt: pm.name, class: "medium_logo")%> <%end%>