Page 1 of 1
switch to .tpl on 4.0.2.3
Posted: Tue Dec 17, 2024 3:42 am
by Rembo
Hi guys. Can anybody explain how to return to old good .tpl templates from twig.
Re: switch to .tpl on 4.0.2.3
Posted: Tue Dec 17, 2024 3:49 am
by JNeuhoff
You can't. OpenCart 4 is still subject to development and bugfixes. If you want a stable version for a live site, use OpenCart 3.0.4.0. And for the latter there is an extension which supports tpl, too:
https://www.opencart.com/index.php?rout ... n_id=31589
Re: switch to .tpl on 4.0.2.3
Posted: Wed Dec 18, 2024 1:00 am
by paulfeakins
Rembo wrote: ↑Tue Dec 17, 2024 3:42 am
switch to .tpl on 4.0.2.3
At this point most top developers still recommend 3.0.4.0.
Re: switch to .tpl on 4.0.2.3
Posted: Wed Dec 18, 2024 1:55 am
by Rembo
ok. but 3.0.4.0 uses twig too
Re: switch to .tpl on 4.0.2.3
Posted: Wed Dec 18, 2024 1:59 am
by khnaz35
What is the reason to use `.tpl`?
There’s no denying that Twig is a modern, safer, and more flexible templating system compared to the older `.tpl` implementation.
Re: switch to .tpl on 4.0.2.3
Posted: Wed Dec 18, 2024 2:49 am
by by mona
Rembo wrote: ↑Wed Dec 18, 2024 1:55 am
ok. but 3.0.4.0 uses twig too
"the latter" - means OC3.0.4.0
So OC
3.0.4.0 has an extensions that supports the continued use of tpl and OC4 does not have an extension that supports the continued use of tpl
Re: switch to .tpl on 4.0.2.3
Posted: Wed Dec 18, 2024 8:09 pm
by paulfeakins
Rembo wrote: ↑Wed Dec 18, 2024 1:55 am
ok. but 3.0.4.0 uses twig too
It does, but really it's best to stick with it and learn it.
Re: switch to .tpl on 4.0.2.3
Posted: Wed Dec 25, 2024 1:48 pm
by noramila
The extension for OpenCart 3.0.4.0 mentioned earlier could be a good option. But as others have suggested, learning Twig might be worth it since it’s more secure and future-proof for newer OpenCart versions.