Jump to content

How to manage a custom table related to orders?


Recommended Posts

Hi all,

I'd like to add a custom table related to an order: ps_order_mydata.

 

The entry of this table should be created during the order generation phase with fixed data.

When the order is generated  I should edit the data of this table with a view from the administration console.

 

Is there a standard way to do this?

 

Thank you very much

 

Claudio

Link to comment
Share on other sites

You should create a module which would:

- create your db table

- hook into "actionValidateOrder" and "displayAdminOrder"

 

for "actionValidateOrder" you'll have $params['order'] with an order object so you have everything you need. "displayAdminOrder" is for displaying your datas in back-office while editing specific order, you have access to id_order by "Tools::getValue('id_order')" so you can based on that.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...