Page 1 of 1

How to check if a module is active from template

Posted: Tue Jan 03, 2012 8:26 am
by yakideo
Hello,

I was wondering if there is a way to detect if an template is active or inactive from a template. For example there is no need to show the affiliate link if the affiliate module is disabled.

opencart 1.5.1.3

Re: How to check if a module is active from template

Posted: Tue Jan 03, 2012 9:37 pm
by Qphoria
You check the same way as you do from any location

Code: Select all

<?php if ($this->config->get('modulename_status')) { ?>
   ....do something
<?php } ?>

Re: How to check if a module is active from template

Posted: Wed Jan 04, 2012 11:08 am
by yakideo
Qphoria wrote:You check the same way as you do from any location

Code: Select all

<?php if ($this->config->get('modulename_status')) { ?>
   ....do something
<?php } ?>
Where can one find the name of the module?
I tried

Code: Select all

$this->config->get('affiliate_status')
but it returned NULL.

Re: How to check if a module is active from template

Posted: Sun Dec 31, 2023 5:34 am
by oguzhansari
Database > oc_extension table > code column