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

Return 10 porducts #252

Open
soheilsalimidev opened this issue Aug 31, 2018 · 2 comments
Open

Return 10 porducts #252

soheilsalimidev opened this issue Aug 31, 2018 · 2 comments

Comments

@soheilsalimidev
Copy link

I use this code to get 20 products but it doesn't working
$client->products->get(array( 'filter[limit]' => 20 ))
what i shoud to do??

@kornellvarga
Copy link

Hi, I am having the same issue, have you solved this?

@kornellvarga
Copy link

I think I have just found the solution... well at least for my purpose this is working!

        echo json_encode(
        	$client->products->get(
        		null,
        		array( 
            		'filter[limit]' => -1
                ),
        	)
        );

This means that the php returns a JSON of all products with all details, I think that you have to specify that the path is null to make it search through all and then -1 for the limit if you want all to be listed, or any number you want.. I know.. 4 years too late with this answer :D

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

No branches or pull requests

2 participants