By using the third party module, There is a option in admin configuration side to select the number of columns for the catalog page. I want to add an additional column option in the admin configuration side.
In third party module Model/Columncount.php
<?php class Third_Party_Model_Columncount
{
public function toOptionArray()
{
return array(
array('value'=>'3', 'label'=>Mage::helper('ThemeConfig')->__('3 Column Grid')),
array('value'=>'4', 'label'=>Mage::helper('ThemeConfig')->__('4 Column Grid')),
array('value'=>'5', 'label'=>Mage::helper('ThemeConfig')->__('5 Column Grid'))
);
}
?>
I need to add one more option with it,
For that I made an module to rewrite model as below
My_Module.xml
<config>
<modules>
<My_Module>
<active>true</active>
<codePool>local</codePool>
<depends><Third_Party/></depends>
</My_Module>
</modules>
</config>
in the My/Module/etc/config.xml
<config>
<modules>
<My_Module>
<version>0.1.0</version>
</My_Module>
</modules>
<global>
<models>
<module>
<class>My_Module_Model</class>
</module>
<party>
<rewrite>
<columncount>My_Module_Model_Columncount</columncount>
</rewrite>
</party>
</models>
</global>
</config>
and in My/Module/Model/Columncount.php
<?php class My_Module_Model_Columncount extends Third_Party_Model_Columncount
{
public function toOptionArray()
{
return array(
array('value'=>'3', 'label'=>Mage::helper('ThemeConfig')->__('3 Column Grid')),
array('value'=>'4', 'label'=>Mage::helper('ThemeConfig')->__('4 Column Grid')),
array('value'=>'5', 'label'=>Mage::helper('ThemeConfig')->__('5 Column Grid')),
array('value'=>'6', 'label'=>Mage::helper('ThemeConfig')->__('6 Column Grid'));
}
}?>
But it is not getting rewritten, why? Can anyone help here.