Let's say we separate the product list into a file named productlist.tpl. This because we are lazy and don't want to write/modify the same code into category.tpl, manufacturer_info.tpl, search.tpl and special.tpl

Then we normally would just do:
        require_once('productlist.tpl');


But then if there is modifications added to it, it would not load the modified version from system folder. Thus I wonder if this is the best way, or is it any better I don't know:
        if (file_exists(DIR_MODIFICATION . '/catalog/view/theme/' . $this->config->get('config_template') .'/template/product/productlist.tpl')) {
require_once(DIR_MODIFICATION . '/catalog/view/theme/' . $this->config->get('config_template') .'/template/product/productlist.tpl');
} else {
require_once('productlist.tpl');
}
In Themes
Friday, October 06 2017, 11:31 PM
Share this post:
Responses (0)
  • There are no replies here yet.
Your Reply