[RESOLVED] Display Collection on Product Page

Juliux
Tourist
8 0 2

Hi @Alex135 ,

It's been old, but I'm looking for the same thing and I don't know where in my code should I put your code !

Thank you (if you reading me)

0 Likes
munawarali80
New Member
1 0 1
{%- if product.collections.size > 0  -%}
<h3>Checkout Entire Collection for {{ product.title }} in Dubai, UAE</h3>
                                <ul class="tags-list">
                             
                              {% for collection in product.collections limit:10 -%}
                                <li>
                                {{ collection.title | link_to: collection.url }}
</li>                                          
                                {%- endfor -%}
                                </ul>
                                {%- endif -%}
Juliux
Tourist
8 0 2

Hi @munawarali80 

Thank you very much. Where in the code am I supposed to put this code ?

0 Likes
TrueloveSeeds
New Member
2 0 0

Hi @Juliux,

You place the code into your product template file.

Go to: Online Store > Themes > Actions > Edit code. Find your product template and add the code where you want it to show up on your product page.

For example, my product template is called "product-template.liquid" and is located under Sections. I want my collections list to show up under my product description, so I located the product description code in the file and placed the new code right before the </div> that ends the product description.

Hope that helps!

0 Likes