'Fetch Eager Prestashop 1.7 Webservice

i'm doing an app using the prestashop webservice. For some ressource it could be really long to get all the details of items; for instance, when i want to get all the product list and detail we have to :

  1. retrieve all the id for the resource "products"
  2. foreach prodct ask again the webservice to get the detail of each one
  3. if we need the combination we have to loop again on each product association to get the combinations and ask again each time the webservice

I found a trick to de less request :

  1. i get all the combinations
  2. for each combination i get the details of each combination
  3. for each combination i get the product details (if i doesn't get it once)

But finally it costs a lot in terms of requests.

Does anyone has a solution to override the webservice in prestashop to add a fetch type eager and get all the data at once for selected resources ?

Thank you !



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source