0
Welcome Guest! Login
0 items Join Now

Re: Problem with RokMage ProductView Configuration

    • Chi's Avatar
    • Chi
    • Newbie
    • Posts: 2
    • Thanks: 0

    Re: Problem with RokMage ProductView Configuration

    Posted 12 years 1 month ago
    • Hi folks,

      We've been using RokMage for a while now and today when I went to go change a few things in the configuration of ProductView I got an undefined variable in array 4 error. I can't seem to debug where the error is coming from. The full error message is below:
      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}

      I checked the attribute list within Magento and attempted to look for them in SQL via PHPAdmin but I'm lost as to what's causing this problem.

      Oddily enough, our development site (which is several updates behind) does not have an issue but only has about 2/3rds of the attributes on our live site.

      Any help would be greatly appreciated.
    • Sam Mahoney's Avatar
    • Sam Mahoney
    • Preeminent Rocketeer
    • Posts: 7420
    • Thanks: 222

    Re: Re: Problem with RokMage ProductView Configuration

    Posted 12 years 1 month ago
    • Replace the contents of the app/code/community/Rockettheme/ProductView/Model/Attributelist.php file with this:
       
      <?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;
       
          }
       }
       
    • STEP 1 IN MAGENTO DEVELOPMENT - DISABLE YOUR CACHE OR YOU WON'T SEE ANY CHANGES.
      Use the new "secure" tab when replying for privately sharing links.
      Check the "Useful Snippets" post for tips.

Time to create page: 0.056 seconds