Page 1 of 1

How can i remove module name from module list in Layout page

Posted: Thu Jan 08, 2015 2:24 pm
by harnishdesign
I have using OpenCart version 2.0.1.1 and, I have added one custom module.

but, I want to remove module name from module list in Layout page.

is it possible?

(admin > System > Design > Layouts)

Image

Re: How can i remove module name from module list in Layout

Posted: Mon Feb 29, 2016 9:06 pm
by ThePath
Did you manage to work this one out? I'm having the same issue.

O0

Re: How can i remove module name from module list in Layout

Posted: Mon Feb 29, 2016 9:31 pm
by ThePath
Ahh just worked this out. If you look in admin\controller\design\layout.php you will see the following:

Code: Select all

if ($this->config->has($code . '_status') || $module_data) {
So if your extension has a variable with its name then "_status" its automagically added.

I think thats it anyway, about to test it now.

Re: How can i remove module name from module list in Layout

Posted: Mon Feb 29, 2016 11:13 pm
by ocart777
admin/model/extension/extension.php

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "extension WHERE `type` = '" . $this->db->escape($type) . "' ORDER BY code");
modify those line using vqmod or ocmod to look like this as example

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "extension WHERE `type` = '" . $this->db->escape($type) . "' AND code NOT LIKE '%module_code%' ORDER BY code");
this module_code you can find them at oc_extension
notes: if your module code is like 123123module_code123123, then it will not take this to layout also