get all the homepage products. but is i get an error:
undefined method `empty?' for nil:NilClass
but the partial is going to the core gem, right? and its works perfectly
without adding the spree_fancy theme.
<div id="welcome-message">
<div class="container span12">
<h1>
Welcome to our amazing store!
<br>
Choose <a href="/products">anything</a> you wish, we’ll ship it <a
href="/products">anywhere!</a>
</h1>
</div>
</div>
<div class="container">
<div class="span4">
</div>
<div class="span8">
<% if @featured_products %>
<div id="featured-products" class="row">
<h3>Featured Products</h3>
<hr>
<ul class="carousel">
<% @featured_products.each do |product| %>
<%= render 'product', :product => product %>
<% end %>
</ul>
</div>
<% end %>
<% if @latest_products %>
<div id="latest-products" class="row">
<h3>Latest Products</h3>
<hr>
<ul class="carousel">
<% @latest_products.each do |product| %>
<%= render 'product', :product => product %>
<% end %>
</ul>
</div>
<% end %>
<div data-hook="homepage_products">
<%= render :partial => 'spree/shared/products', :locals => { :products =>
@products } %>
</div>
</div>
</div>
--
Don't miss SpreeConf on May 20-21: http://spreeconf.com
Spree is hiring: http://spreecommerce.com/careers