Notice: Undefined variable: array4 in /****.com/html/app/code/community/Rockettheme/ProductView/Model/Attributelist.php on line 33
#0 /****.com/html/app/code/community/Rockettheme/ProductView/Model/Attributelist.php(33): mageCoreErrorHandler(8, 'Undefined varia...', '/chroot/home/ch...', 33, Array)
#1 /****.com/html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(421): Rockettheme_ProductView_Model_Attributelist->toOptionArray(false)
#2 /****.com/html/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(210): Mage_Adminhtml_Block_System_Config_Form->initFields(Object(Varien_Data_Form_Element_Fieldset), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
#3 /****.com/html/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php(92): Mage_Adminhtml_Block_System_Config_Form->initForm()
#4 /****.com/html/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(102): Mage_Adminhtml_Block_System_Config_Edit->initForm()
#5 /****.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_System_ConfigController->editAction()
#6 /****.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#7 /****.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /****.com/html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#9 /****.com/html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#10 /****.com/html/index.php(80): Mage::run('', 'store')
#11 {main}
<?php
/**
* @version ${project.version} ${build_date}
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - ${copyright_year} RocketTheme, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
class Rockettheme_ProductView_Model_Attributelist
{
public function toOptionArray()
{
$collection = Mage::getResourceModel('eav/entity_attribute_collection')
->setEntityTypeFilter( Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId() )
->load();
$array4 = array();
foreach ($collection as $attribute) {
if($attribute->getIsVisible() && $attribute->getFrontendInput() == 'text' OR $attribute->getIsVisible() && $attribute->getFrontendInput() == 'textarea'):
$array4[] = array(
'label' => $attribute->getFrontendLabel(),
'value' => 'ATT_'.$attribute->getAttributeCode()
);
endif;
$array1 = array('disabled'=>'Disabled');
$array2 = array('attributes'=>'-------- Attributes -------');
$array3 = array('additional'=>'Additional Information');
$array5 = array('cmsblocks'=>'-------- CMS Blocks -------');
$array6 = Mage::getModel('cms/block')->getCollection()->load()->toOptionArray();
$array7 = array_merge($array1, $array2, $array3, $array4, $array5, $array6);
}
return $array7;
}
}
Time to create page: 0.055 seconds