I need to hide logo in product page. Logo is placed in header HTML.
So, I tried to add new variable $data['product_page_logo']
in header.php
controller before loading template like as:
$data['product_page_logo'] = false;
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
return $this->load->view($this->config->get('config_template') . '/template/common/header.tpl', $data);
} else {
return $this->load->view('default/template/common/header.tpl', $data);
}
After in header.tpl
I check this variable:
<? if(isset($data['product_page_logo']) && $data['product_page_logo'] == false) {
echo "Logo";
}?>
But it does not work, I get error undefined variable product_page_logo
You can use
route
, incatalog/controller/common/header.php
find:before or after it add:
tested on opencart 2.3.0.2