I was used below condition of Custom Box Content Display Only for HomePage in OpenCart 1.5.6. & this is working fine.
I was used this in header.tpl
file.
<?php if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home') {?>
/////////////////////////
/ /
/ /
/ /
/ Box Content /
/ /
/ /
/ /
/ /
/////////////////////////
<?php } ?>
but, this is not working in OpenCart 2.0.
How can the same thing be achieved in Opencart 2.0?
I have found Perfect Solution. This is perfect work .
catalog/controller/common/header.php
add
if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home'){
$data['ishome']=1;
}
then in your header.tpl
<?php if (isset($ishome)) {?>
Our Box Content
<?php } ?>