For developers

How to extend any MODX table

This is translation of russian topic.

Once again it was necessary to change the site table, which can not be changed.

What do people usually do in such cases? As a usual, they edit a kernel or the necessary component, and lose the possibility of their updating. But this is wrong, and you can solve the problem differently.

We write the usual plugin, mark the OnMODXInit event for it and change the model for the required classes of the system or add-ons. For example, I added the manager id to the miniShop2 order:
Василий Наумкин
27 august 2017, 01:54
1
999
+1