Skip to content

Commit

Permalink
Added additional check for ConfigurableSwatches status
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed Jan 2, 2015
1 parent 281be49 commit d890121
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions app/code/community/TM/CatalogConfigurableSwatches/Helper/Data.php
@@ -0,0 +1,10 @@
<?php

class TM_CatalogConfigurableSwatches_Helper_Data extends Mage_Core_Helper_Abstract
{
public function isEnabled()
{
return Mage::helper('core')->isModuleOutputEnabled('Mage_ConfigurableSwatches')
&& Mage::getStoreConfigFlag('configswatches/general/enabled');
}
}
10 changes: 8 additions & 2 deletions app/code/community/TM/CatalogConfigurableSwatches/etc/config.xml
Expand Up @@ -5,13 +5,19 @@
<version>1.0.0</version>
</TM_CatalogConfigurableSwatches>
</modules>
<global>
<helpers>
<catalogconfigurableswatches>
<class>TM_CatalogConfigurableSwatches_Helper</class>
</catalogconfigurableswatches>
</helpers>
</global>
<frontend>
<tm_layout>
<updates>
<catalogconfigurableswatches
module="TM_CatalogConfigurableSwatches"
condition="core/isModuleOutputEnabled"
args="Mage_ConfigurableSwatches"
condition="catalogconfigurableswatches/isEnabled"
>
<file>tm/configurableswatches.xml</file>
</catalogconfigurableswatches>
Expand Down

0 comments on commit d890121

Please sign in to comment.