slince / shopify-api-php

:rocket: Shopify API Client for PHP
MIT License
128 stars 48 forks source link

products findAll method #9

Closed nestorsng closed 6 years ago

nestorsng commented 6 years ago

Hi there!

I'm starting to use your library, quite great by the way, but I've encountered that the findAll method from products doesn't get "All" products. Is it because of the shopify limitations (250 elements per page)? Is there a method to get "All the products" for real? I've made some scripts myself and the procedure for getting all the products was to get the total count of products, divide per 250 (limit per page) to get the total number of pages and then get the 250 products per page until you get all the pages. Is the same in this case?

Thanks in advance and thanks for the library!!

slince commented 6 years ago

yeah.

findAll means "find many"; the default value of limit is 250; there is no way to get all products; if you want, you can get toatal numer with method total()

nestorsng commented 6 years ago

Nice, thanks!!