1

I have created custom product attribute 'discount' from my custom module. This attribute displayed at Layered Navigation. Now, If I disable my custom module from Admin Panel System >> Configuration >> Advanced or from app/etc/modules/modulefile.xml still newly created attribute shows at frontend.

where I can check the condition to hide it from layered filter ?

Custom attribute installation script is here

$installer = $this;
        try{
            $productTypes = array(
                Mage_Catalog_Model_Product_Type::TYPE_SIMPLE,
                Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE

            );
            $productTypes = join(',', $productTypes);

            $installer->startSetup();

        $installer->addAttribute('catalog_product', 'discount', array(
            'group'             => 'Prices',
            'type'              => Varien_Db_Ddl_Table::TYPE_VARCHAR,
            'backend'           => '',
            'frontend'          => '',
            'label'             => 'Discount',
            'input'             => 'price',
            'class'             => '',
            'source'            => '',
            'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
            'visible'           => true,
            'required'          => false,
            'user_defined'      => true,
            'default'           => '',
            'searchable'        => false,
            'filterable'        => true,
            'comparable'        => false,
            //'visible_on_front'  => true,
            'unique'            => false,
            'apply_to'          => $productTypes,
            'is_configurable'   => false
        ));

        $installer->endSetup();
        }
        catch(Exception $ex){
            echo $ex->getMessage();
        }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.