Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Ben Cox commented on 500 Error when loading the app for a shop with many products

$
0
0

Shopify will only return a maximum of 250 products per call (and the default is only 50). To get 250 at a time and also work with pagination your call would look like this:

@products = ShopifyAPI::Product.find(:all, :params => {:limit => 250, :page => 2})

You can also call ShopifyAPI::Product.count to find out how many total products there are so you can determine ahead of time how many pages of 250 there will be. 
 


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>