<div id="product-listing">
  <h3><%= t("Products") %></h3>
  <ul class="product-listing">
    <% for product in @products %>
      <% if product.has_stock? %>
        <li class="product preview" id="product_<%= product.id %>">
          <%= link_to small_image(product), product %>
          <%= link_to product.name, product %>
          <b><%= number_to_currency(product.master_price) if product.master_price %></b>
        </li>
      <% end %>
    <% end %>
  </ul>
</div>
<%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? -%>

<div id="product-listing">
  <h3><%= t("Products") %></h3>
  <ul class="product-listing">
    <% for product in @products %>
      <% if Spree::Config[:allow_backorders] || product.has_stock? %>
        <li class="product preview" id="product_<%= product.id %>">
          <%= link_to small_image(product), product %>
          <%= link_to product.name, product %>
          <b><%= number_to_currency(product.master_price) if product.master_price %></b>
        </li>
      <% end %>
    <% end %>
  </ul>
</div>
<%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? -%>

Allow the option of displaying out of stock products in the product index view.
Allow the option of displaying out of stock products in the product index view.
