I am trying to make a module to hide product types when tryng to create a new product.
I have created the files as follows:
app\etc\modules\Grando_Producttype.xml
<?xml version="1.0"?>
<Grando_Producttype>
<active>true</active>
<codePool>local</codePool>
</Grando_Producttype>
app\code\local\Grando\Producttype\etc\config.xml
<?xml version="1.0"?>
<config>
<modules>
<Grando_Producttype>
<version>1.0</version>
</Grando_Producttype>
</modules>
<global>
<models>
<catalog>
<rewrite>
<product_type>Grando_Producttype_Model_Product_Type</product_type>
</rewrite>
</catalog>
</models>
</global>
</config>
app\code\local\Grando\Producttype\Model\Product\Type.php
<?php
class Grando_Producttype_Model_Product_Type extends Mage_Catalog_Model_Product_Type
{
static public function getOptionArray()
{
$options = array();
foreach(self::getTypes() as $typeId=>$type) {
if($typeId == 'virtual'):
$options[$typeId] = Mage::helper('catalog')->__($type['label']);
endif;
}
return $options;
}
}
This should be working good I think, but for some reason it is not loading and all products still show up and I have no idea why and can't find the reason.
I am quite new to Magento. Is there any configuration I might be missing?
I've already tryed to change my class name to Grando_Producttype_Model_Product_Type
and no success...
Cache is not activated,
Any help will be appreciated! Thanks