View Single Post
  #4  
Old 05-17-2018, 06:29 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Dealing with Complex Schema API

Quote:
Originally Posted by Soptareanu @Alex
I tested and it works very well. Now I have another issue. Because I have very much products and productvariants, sometimes I get an 500 error because the server takes much time to respond. I want to create a tool that pull products from API in batches but for that I need instead reciving all products, get only number of rows. Is there a posibility to do that ? By default convertModel() function fetching result for each rows of entity.

Did you try using _cnd[limit] in your request as explained here:
https://devs.x-cart.com/rest-api/#limiting-the-output-pagination

Just add something like _cnd[limit][0]=0&_cnd[limit][1]=100 to your request and it will pull batches of entities instead of all.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote