Limits on CustomCollection calls?

Shopify Expert
3984 13 313

Hi,

The products method on CustomCollection is limited to returning 50 products.

 class CustomCollection < Base
    include Events
    include Metafields

    def products
      Product.find(:all, :params => {:collection_id => self.id})
    end

The ActiveResource call should return all products in a collection but is pinned to returning only 50. We can get a count of available products in the collection, say 420, but we have no easy way of actually getting all those products. Do you have any suggestions for improving this other than overriding that products method with one that deals with paging? 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Highlighted
Shopify Staff
Shopify Staff
591 0 45

Sounds like the Shopify API client needs a patch such that query params can be passed in. If you want to submit a patch that would be super awesome, otherwise I can take care of it.

0 Likes
Shopify Expert
3984 13 313

I am trying to work in my code for that. When I forked the Shopify/shopify_api gem and subsequently examined what I got, it was the version pinned at 2.2? 

How come Github is forking me at that ancient version? Most confusing... 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Expert
3984 13 313

No response to this repository issue? Surely someone knows why I am forking to version 2.2 and not 3.2.5 or whatever master currently is. Is this my lack of Github chops at work or is something misconfigured in the universe?

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Staff
Shopify Staff
591 0 45

Have you pulled the latest changes from shopify/shopify_api into your fork? Your fork is probably just super out of date.

Add shopify/shopify_api as another source to your local git repository

git remote add mainline git@github.com:Shopify/shopify_api.git
git checkout master
git pull mainline master
git push origin master

This of course assumes you have not made any changes to your master branch. If you do, things might get a little bit weird.

0 Likes
Shopify Expert
3984 13 313

Thanks! perfect... never occurred to me I forked at 2.2... long ago... my mistake not picking up on that ... duh... doh...

 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes