Working with storenvy at first I was confused why I wasn’t seeing all the products on the front page of my store. Turns out this is a simple fix that should work with most stores. This is only a problem if you are using collections. Simplest fix is to have no collections but that doesn’t work for all stores.
Manage your collections
First create a new Collection titled All Products or All Items. Now add all your products to this collection. This should be simple. Just go to the collections editor and click each product to have it quickly added to the collection.
Now if you wanted to show just a particular collection on the front page then you can reorder the collections using drag and drop on the manage collections page in the admin section. Just order them as you please.
The required layout template edit
Now if you created an All Products collection follow these steps so you don’t have a duplicate collection link. Jump into the Admin page and go to the Design Tab. Edit Pages and click on the Layout page to use Custom HTML.
The current code for the list of collection nav bar in the default storenvy template looks like this:
{% if collections.all != empty %}
<ul id="nav">
{% for nav_item in collections.all %}
<li id="collection_{{nav_item.id}}_link" {% if nav_item == collection %} {% endif %}>
<a href="{{nav_item.url}}">
{{ nav_item.name }}
<span>({{ nav_item.product_count }})</span>
</a>
</li>
{% endfor %}
<li {% if collections.all == empty %}class="first" {% endif %}id="all_products_link">
<a href="{{products.url}}">
All products
<span>({{ products.count }})</span>
</a>
</li>
</ul>
{% endif %}
Simply make a quick change to remove the All Products link list item that is added after the list of Collections since we now have all our products in our own custom collection. Save it and off you go.
{% if collections.all != empty %}
<ul id="nav">
{% for nav_item in collections.all %}
<li id="collection_{{nav_item.id}}_link" {% if nav_item == collection %} {% endif %}>
<a href="{{nav_item.url}}">
{{ nav_item.name }}
<span>({{ nav_item.product_count }})</span>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
Comments are closed.