- Notifications
You must be signed in to change notification settings - Fork3
Implementation of Twig template system for OpenCart 2.x
License
NotificationsYou must be signed in to change notification settings
BurdaPraha/oc_twig
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Because default template system sux.Inspired by existing but deprecated solution:vanderson139/opencart-twig - thanks buddy!
- composer require burdapraha/oc_twig master-dev
composer require burdapraha/oc_twig dev-master
- Add this code to your composer.json project file:
"scripts": { "post-install-cmd": [ "php -r \"copy('vendor/burdapraha/oc_twig/vqmod/xml/twig.xml', 'upload/vqmod/xml/twig.xml');\"" ], "post-update-cmd": [ "php -r \"copy('vendor/burdapraha/oc_twig/vqmod/xml/twig.xml', 'upload/vqmod/xml/twig.xml');\"" ] }
It will move vqmod xml file to correct folder. If you are using another folder than "upload" for your document root, change these commands.
- add constant
define('TWIG_CACHE', true);
to your config.php, /admin/config.php - optionally you can add row to your
.gitignore
file with path to tracy.xml (example: upload/vqmod/xml/twig.xml) - celebrate!