How to get the list of products in a current collection page????

How to get the list of products in a current collection page????

milu_balan
Shopify Partner
60 0 4

Hi ,

Can anyone help me with getting the list of products in a current collection page? i.e; If the collection page displays 20 products in the first page I need to get the list of those 20 products.The next 20 products will be in the second paginated page.

This is for the purpose of schema in paginated collections. I want to return the position,product name and product url in the schema .I couldn't manage to get the list for only current page.

Any suggestions would be greatly appreciated.

 

Thanks in advance.

Replies 3 (3)

Dbuglabpvtltd
Shopify Partner
705 75 118

Hi @milu_balan 
This could be done using custom code.
It will take 2-3 Hours.

You have to hire a shopify developer for this task

I can do this for you. Please contact me.

banned
milu_balan
Shopify Partner
60 0 4

Hi @Dbuglabpvtltd 

I'm a developer but not a pro ! Just a beginner .It would be appreciable if you could suggest a possible way for tackling this as the community discussion is for helping each others!

 

Also I would like to add up a doubt of mine in this thread:

 

{% for product in collection.products %}

/* code*/

{% endfor %}

 

Why is it the above code fetches only the 50 products in a collection? Is there any liquid variable for fetching all the products in a particular collection?

 

Thanks

Milu

Vijendra
Shopify Partner
8 1 1

You can use pagination to get the 1000 products of a collection