Eric T
Eric T

Reputation: 1026

Prestashop Web Service(CRUD/REST) Api Query Mutiple table

I had gone through the tutorial in Prestashop at http://forge.prestashop.com:8081/display/PS14/Using+the+REST+webservice but it doesn't guide on how to do query on multiple table.

How should I perform it?

Upvotes: 1

Views: 3642

Answers (1)

MrGomez
MrGomez

Reputation: 23886

The trouble with per-table RESTful web services is they only provide terse access to your data layer. For multi-table joins and subqueries, you're left to either query multiple REST endpoints and perform the reconciliation on the client side or to perform the desired query in SQL and expose it directly through your web service.

From this post:

While importing products is a built-in feature in PrestaShop, unfortunately, exporting products is not. There are quite a few modules available for PrestaShop that offer this feature, but finding a free one is definitely a challenge. Most likely this is due to the intricacies of the PrestaShop database table structure. Product data is stored in multiple tables, which means the query to extract that data is not easy to create.

If you are comfortable running SQL queries, you can use the SQL tab of phpMyAdmin in your cPanel to query the database tables for the product information you want to retrieve. However, for most people, this will not be a workable solution.

You might want to look at the code they provide. It may give you some idea of how to do this in a way that plays nicely with PrestaShop.

Upvotes: 3

Related Questions