I found a simple solution. It works like a charm.
Step 1
in the .tpl file. (You want this module. Featured.tpl, etc.)
<?php if ($module['position'] == 'content_bottom' || $module['position'] == 'content_top') { ?>
Step 2
add to the .php file (you want this module. featured.php, etc.)
$data['module'] = $setting;
Step 3 (if you are using OpenCart version 2.0.0.0)
directory / controller / shared / { content_top, content_bottom, content_right, content_left }. php
Find the code below
if (isset($part[1]) && isset($setting[$part[1]])) {
and add below code after
$setting[$part[1]]['position'] = basename(__FILE__, '.php');
Step 3 (if you are using OpenCart version 2.0.1.x.)
directory / controller / shared / { content_top, content_bottom, content_right, content_left }. php
Find the code below
$setting_info = $this->model_extension_module->getModule($part[1]);
and add below code after
$setting_info['position'] = basename(__FILE__, '.php');
source share