Opencart - 当我在Layouts中选择它时,模块不会出现

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...

As i think that you have mentioned $data on return, but there is no code under $data variable. so either you will remove $data variable or assign value on it.

return $this->load->view($this->template, $data);

I think it will help you.

Thanks, with regards.