OpenCart Events
Posted: Wed Dec 16, 2020 10:23 pm
Since OpenCart Version 2.x there is a new way to add and edit already existing code (see array $data and string $route).
And as well the already parsed HTML $output when used with after.
This is called events and the core princip is explained here: https://github.com/opencart/opencart/wiki/Events-System
Events should replace the so well used VQMod and OCMod system.
Files using those 2, are based on xml-files and the manipulated files are stored as flat files.
While files affected by events are stored in the database only.
This thread here should be a place where everybody should post the experience with events.
And also a place where everybody can ask and add ideas, solutions and samples.
Extensions and Developers should prefer to use events rather the old VQ- & OCMod-system.
Events are constantly developed and extended and will provide a future proof solution.
The more OpenCart 4.x is in sight ..
Here are a few links which explain what Events are and how they work and can be used:
https://www.opencart.com/blog?blog_id=174
https://www.opencart.com/blog?page=7&blog_id=215
https://stackoverflow.com/questions/264 ... art-events
https://extensioncart.com/posts/writing ... ith-events
How to modify .twig template files: viewtopic.php?f=144&t=221533#p807608
And as well the already parsed HTML $output when used with after.
This is called events and the core princip is explained here: https://github.com/opencart/opencart/wiki/Events-System
Events should replace the so well used VQMod and OCMod system.
Files using those 2, are based on xml-files and the manipulated files are stored as flat files.
While files affected by events are stored in the database only.
This thread here should be a place where everybody should post the experience with events.
And also a place where everybody can ask and add ideas, solutions and samples.
Extensions and Developers should prefer to use events rather the old VQ- & OCMod-system.
Events are constantly developed and extended and will provide a future proof solution.
The more OpenCart 4.x is in sight ..
Here are a few links which explain what Events are and how they work and can be used:
https://www.opencart.com/blog?blog_id=174
https://www.opencart.com/blog?page=7&blog_id=215
https://stackoverflow.com/questions/264 ... art-events
https://extensioncart.com/posts/writing ... ith-events
How to modify .twig template files: viewtopic.php?f=144&t=221533#p807608