Structure table of prestashop

6.2k Views Asked by At

Do you know which table I can find users purchases (with its id) and the id of the producers?

I'm trying but your help would speed my work.

1

There are 1 best solutions below

0
On BEST ANSWER

For a detailed overview of the prestashop Database schema i suggest to check these two pages: https://www.prestashop.com/blog/en/a-new-physical-data-model-available-for-prestashop/ http://doc.prestashop.com/display/PS14/Database+Structure

The first link contains a png/mysql workbench image of the whole prestashop db structure, and the second one contains a list of all the tables, with their description and primary keys.

N.B. both of the link show the structure for the old 1.4.* prestashop, but while the schema evolved overtime, most of the tables and ids are still the same in the 1.6.*.

To answer directly your question:

For the purchases list you should check the table with suffix "orders" (if you haven't put any particular prefix while installing prestashop it should be named "ps_orders"). The primary key it's the id_order, and the table contains reference to all the basic information of the purchase, if you also need the list of product bought with an order check the ps_order_details.

For the producers(manufacturer?) you should instead check ps_manufacturer for the list of producers, and the field id_manufacturer inside the ps_product to see the relationship between a product and its producer.