Add new column in mshop_order table and manage in admin

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
LorenzoM
Posts: 6
Joined: 22 Aug 2018, 10:51

Add new column in mshop_order table and manage in admin

Post by LorenzoM » 24 Aug 2018, 14:52

- 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

User avatar
aimeos
Administrator
Posts: 3611
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 26 Aug 2018, 17:29

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

LorenzoM
Posts: 6
Joined: 22 Aug 2018, 10:51

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

Post by LorenzoM » 27 Aug 2018, 09:16

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!

Post Reply