Page 1 of 1

Add new column in mshop_order table and manage in admin

Posted: 24 Aug 2018, 14:52
by LorenzoM
- Symfony 3.4.14
- Aimeos installed last week
- PHP 5.5.9
- Ubuntu 4.23

Hi everybody!

I need to insert a field in the mshop_order table containing the order tracking number.
This field must be visible only in admin and valued with a data entered in the order details and then sent by email.
Do you have any suggestions?

Many thanks!
Lorenzo

Re: Add new column in mshop_order table and manage in admin

Posted: 26 Aug 2018, 17:29
by aimeos
The easiest way would be to use the mshop_order_base_service_attr table (type/key/value triples) which we already use for tracking numbers. If you use the type "hidden" they won't be shown.

If you want to do it the hard way and add that property to the mshop_order table, you have to extend the order item/manager and order admin class/template in your own extension.

Re: Add new column in mshop_order table and manage in admin

Posted: 27 Aug 2018, 09:16
by LorenzoM
Thanks for your answare, could you write me an example or a link to an online help?
My target is to send an email automaticaly to the customer when I put into this field the tracking number.

Thanks!