Closed gdinko closed 5 years ago
Hi, I think that this is not a bug, the library works in the same way as an API, where limit = 50 by default. To get all products use page argument and iterate over all collection, until the query returns a non-empty result.
For example:
$productManager = $client->getProductManager();
$page = 1;
$limit = 250;
do {
$products = $productManager->findAll(['limit' => $limit, 'page' => $page]);
foreach ($products as $product) {
// process product
}
$page++;
} while (count($products) == $limit);
Благодаря Максим! Thanks Maxim!
Hi, I am not sure if this is a bug, but $client->getProductManager()->findAll() return only 50 products. If I set $client->getProductManager()->findAll(['limit' => 250]); it returns 250 products. Is this normal ? How can i get all products?
Thanks