Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All data fetch issue #4

Closed
KalpeshjagannathMahajan opened this issue Jul 10, 2023 · 2 comments
Closed

All data fetch issue #4

KalpeshjagannathMahajan opened this issue Jul 10, 2023 · 2 comments
Assignees

Comments

@KalpeshjagannathMahajan
Copy link

KalpeshjagannathMahajan commented Jul 10, 2023

I am trying to get all categories.
In that my Magento's default max limit to fetch data is 300
It means I have to fetch data in batch of 300.
But there is not provision of batch, there is page_size in get_paginated function, but it is getting overwritten by limit that I send
If i don't send any limit then Magento throws error "Maximum SearchCriteria pageSize is 300"
And if I send limit then due to "if is_limited and count >= limit" this condition I am only getting that much records only
Even if I try to maintain current_page through query it is getting overwritten in code
I think there is a mix match of page_size and limit over here.
Can you please help me understand if there is any way where I can fetch all the records?

@bfontaine
Copy link
Member

Hello,
You can override the page size with the following code:

client = Magento(...)
client.PAGE_SIZE = 300

Then use client as usual.

@bfontaine bfontaine self-assigned this Jul 11, 2023
@bfontaine
Copy link
Member

Starting with 1.7.4, you can also use Magento(batch_page_size=300).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants