Yohann
Yohann

Reputation: 275

Validate order in Prestashop regarding database

I'm currently wishing to validate my order in Prestashop. In fact, for the need of a module, I don't use validateOrder() function from the file PaymentModule.php

By doing it manually, the order process is OK (with statut 'Payment accepted') but my order are not validated.

In database, which tables are filled in regarding the order process ? I would like to check my results in the database.

Thanks

Upvotes: 1

Views: 3928

Answers (1)

Altaf Hussain
Altaf Hussain

Reputation: 5202

When an order is placed in Prestashop, the data in entered in a few database tables.

1) ps_orders : Has the data regarding to the order like cart id, customer id, addresses ids, language in which order is placed, module which is used for payment and total order amount etc etc.

2) ps_order_detail: This table has all the products for a particular order.

3) ps_order_history: This table has the order statuses history. Whenever order status is changed, an entry is made here.

The above are the most commonly used tables. Please note that in particular prestashop versions, some additional tables may be used (new tables may be added to new versions), so you should check the data base tables started with order_ and so on.

You can verify it also by placing a normal order, and then by taking its id, you can check that what data is placed in what tables. Then in your module, you can enter the data for an order in that particular tables. Hope this will help.

Thank you

Upvotes: 1

Related Questions