We can add the custom collection in the admin side and can add many products underneath it
and if we have to show that one in the homepage or in any other page we have to edit the template
Lets create a new collection named Featured and mouse hover on the created collection will indicate the
handle which we can call the custom collection in my case its “featured”

and the code to show the collections is

{% for product in collections.featured.products limit:1 %}
<form action="/cart/add" method="post" class="variants clearfix">   
<a href="{{product.url}}"> 
<div class="img1">
<img src="{{ product.featured_image | product_img_url: 'small' }}">
</div></a>
<div class="side">
<a href="{{product.url}}"> <h1>{{ product.title  | escape }}</h1></a>
<p>{{ product.description | truncatewords:  11 | strip_html }}</p>
{%if product.variants.size > 1 and product.options.size > 1 %}
{% comment %} show drop-down if we've only got 2 or more variants {% endcomment %} 
<select id="product-select" name="id">
{% for variant in product.variants %}
<option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
{% endfor %}
</select>
{% endif %}

</div>
<button type="submit">+cart</button>
<div class="price"><span>{{ product.price | money }}</span></div>
</form>{% endfor %}

2 Comments on “How to show custom collections on home page shopify

  1. Shafeeqsalman
    November 24, 2015

    Hi,

    I am fresher in shopify. Me from aluva. I have a request and help in Shopify. Could you please help me?
    My need is selected currency will checkout and payment
    Example :- My store default currency is INR(Rs). When i selected USD on frontend dropdown currency list. All product price will change to $ and i want make payment in this currency.

    Actually, there is no option in Shopify yet for this requirment. If can i use a middlewire? could you please guide me that coding?

    storefront pass : treeng

    Please help me….

    • navaneeth
      December 9, 2015

      Share me the storefront url, let me check we can sort this

Leave a Reply

Your email address will not be published. Required fields are marked *