Post by yakideo » Tue Jan 03, 2012 8:26 am

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


Posts

Joined
Tue Jan 03, 2012 8:22 am

Post by Qphoria » Tue Jan 03, 2012 9:37 pm

You check the same way as you do from any location

Code: Select all

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

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yakideo » Wed Jan 04, 2012 11:08 am

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.


Posts

Joined
Tue Jan 03, 2012 8:22 am