I'm not finding a lot of documentation on the specifics of extension best practices in opencart 4. So I'm wondering the 'opencart' way of using external libraries?
What I have been able to work out is that they seem to drop such files in a folder like
Code: Select all
myextension/system/library/myextension
so that's where I'm locating a composer.json file. But it's not clear if that will automatically result in composer install running or if I need to add something in a admin/model/myextension->install() function or something. It's also unclear how the vendor/autoload.php is included.
What is the best-practices/opencart way of including such an external library when installing/uninstalling and then have those files included when calling on the extension?
SW