I’m developing a module for OpenCart 2.2.0.0 and I need to add a custom field to the orders.
Almost all the tutorials say you have to edit de Order class and add a new attribute there (and a lot of other things).
My question is, if I add a custom field modifying the Order class and in the future another module modify the Order class too, would my module stop working?
How can I achieve that ensuring the correctness of my module?
You must design your module using vqmod/ocmod. So core files will not be changed. And you will be able to upgrade.
Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com
Another suggested alternative way would be to use your own developed controller files by adding Ajax Request with jQuery from either new or modified template files in order to obtain the desired custom fields without having to use VQMod (if not using already existing core files). Then, even perhaps to add your order module into the API so that future upgrades wouldn't affect your development. 

Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 9 guests