I want to create a Div in anypage so that I can use Jquery on it
This is my catalog/controller/module/test_products.php
class ControllerModuleTestProducts extends Controller {
public function index() {
$this->document->addScript('catalog/view/javascript/test.js');
$path = '/template/module/test_products.tpl';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . $path)) {
$this->template = $this->config->get('config_template') . $path;
} else {
$this->template = 'default'.$path;
}
return $this->load->view($this->template, $data);
//$this->render();
}
}
And this is my catalog/view/theme/default/template/module/test_products.tpl
<div id="test-notification" class="abc"></div>
But when I turn it on in Layouts, my DIV does not appear. What did I do wrong ? I think my controller is not working...