In Opencart 2.2.0.0 view file i.e .tpl file loading is different from Opencart 2.1.x.x, So we will learn that how Opencart load view file at front end . Before going to Version 2.2.0.0 just look at the Version 2.1.x.x view file loading ,In 2.1.x.x we usually uses full path of the tpl file in the first parameter of the view function which presents in the loader.php file under library.
view function of loader.php file
But in Version 2.2.0.0 we have to use only the path which starts after template folder to the file as a parameter named “route” of view function which presents inside the loader.php library file
And inside the view function a object of template class to call the render function of basic.php file by making a object of “basic” class through template class to load the view file. And in the render function codes are same as version 2.1.x.x view function code.
Template class constructor
render function of basic class
Be the first to comment.