Fetching more than 20 products in collection js-buy-sdk

katherine2
Tourist
11 1 0

So currently if a collection has more than 20 products, there doesn't seem to be a way to fetch the remaining products after 20

In the source there doesn't seem to be any way to set values to the number of products to grab

https://github.com/Shopify/js-buy-sdk/blob/master/src/collection-resource.js#L81

Another person seems to have the same problem 

I'm looking at the other availble methods in the API like fetchAllWithProducts, but we have a lot of collections 120+, and asking to return 20+ products per collection when we only use 10 collections seems like overkill

 

Thanks

 

Replies 2 (2)
katherine2
Tourist
11 1 0

Nevemind, calling client.fetchNextProducts() works 

 

 

shivaji007
New Member
1 0 0

how to fetch previous products please suggest....