Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

cant save any configurable product or view it in backend
 
itmunltd
Jr. Member
 
Total Posts:  5
Joined:  2011-05-08
 

Hey Guys,

i am getting the following error when trying to save a newly created conf. product:

Invalid method Mage_Customer_Model_Attribute::isScopeGlobal(Array
(
)
)

Trace:
#0 /app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php(83): Varien_Object->__call(\'isScopeGlobal\', Array)
#1 /app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php(83): Mage_Customer_Model_Attribute->isScopeGlobal()
#2 /app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php(123): Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element->canDisplayUseDefault()
#3 /app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml(33): Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element->checkFieldDisable()
#4/app/code/core/Mage/Core/Block/Template.php(241): include(\'/www/htdocs/w00...\')
#5 /app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(\'adminhtml/defau...\')
#6/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#7 /app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#8 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#9/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php(52): Mage_Core_Block_Abstract->toHtml()
#10 /lib/Varien/Data/Form/Element/Abstract.php(223): Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element->render(Object(Varien_Data_Form_Element_Multiline))
#11 /lib/Varien/Data/Form/Element/Abstract.php(233): Varien_Data_Form_Element_Abstract->getHtml()
#12 /lib/Varien/Data/Form/Element/Fieldset.php(90): Varien_Data_Form_Element_Abstract->toHtml()
#13/app/design/adminhtml/default/default/template/widget/form/renderer/fieldset.phtml(49): Varien_Data_Form_Element_Fieldset->getChildrenHtml()
#14 /app/code/core/Mage/Core/Block/Template.php(241): include(\'/www/htdocs/w00...\')
#15 /app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(\'adminhtml/defau...\')
#16 /app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#17 /app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#18 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#19 /app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php(51): Mage_Core_Block_Abstract->toHtml()
#20/lib/Varien/Data/Form/Element/Abstract.php(223): Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset->render(Object(Varien_Data_Form_Element_Fieldset))
#21 /lib/Varien/Data/Form/Element/Abstract.php(233): Varien_Data_Form_Element_Abstract->getHtml()
#22 /lib/Varien/Data/Form.php(244): Varien_Data_Form_Element_Abstract->toHtml()
#23 /app/design/adminhtml/default/default/template/productlocator/catalog/product/edit/tab.phtml(35): Varien_Data_Form->toHtml()
#24 /app/code/core/Mage/Core/Block/Template.php(241): include(\'/www/htdocs/w00...\')
#25/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(\'adminhtml/defau...\')
#26/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#27 /app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#28 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#29 /app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php(303): Mage_Core_Block_Abstract->toHtml()
#30 /app/design/adminhtml/default/default/template/widget/tabs.phtml(38): Mage_Adminhtml_Block_Widget_Tabs->getTabContent(Object(Scand_ProductLocator_Block_Adminhtml_Catalog_Product_Edit_Tab_Productlocator))
#31 /app/code/core/Mage/Core/Block/Template.php(241): include(\'/www/htdocs/w00...\')
#32 /app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(\'adminhtml/defau...\')
#33/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#34/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#35 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#36 /app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#37/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#38/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#39 /app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml(\'left\', true)
#40 /app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml(\'left\')
#41 /app/code/core/Mage/Core/Block/Template.php(241): include(\'/www/htdocs/w00...\')
#42 /app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView(\'adminhtml/defau...\')
#43 /app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#44 /app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#45 /app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#46 /app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#47 /app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#48 /app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(269): Mage_Core_Controller_Varien_Action->renderLayout()
#49 /app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Catalog_ProductController->editAction()
#50 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(\'edit\')
#51 app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#52 /app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#53 /app/Mage.php(683): Mage_Core_Model_App->run(Array)
#54 /index.php(87): Mage::run(\'\', \'store\')
#55 {main}

also i cannot view that product after trying to save it. If i recall correctly I havent really messed with core data unless it was an accident. I have added a custom Product type though.
The attributes are set to global. Any Ideas on how to solve this issue would be appreciated. Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
itmunltd
Jr. Member
 
Total Posts:  5
Joined:  2011-05-08
 

Thank you this already helps a little. but i am not sure where to put the code exactly or what to change. so far i have only produced more errors.

public function saveAction()
    
{
        $storeId        
$this->getRequest()->getParam('store');
        
$redirectBack   $this->getRequest()->getParam('back'false);
        
$productId      $this->getRequest()->getParam('id');
        
$isEdit         = (int)($this->getRequest()->getParam('id') != null);

        
$data $this->getRequest()->getPost();
        if (
$data{
            $this
->_filterStockData($data['product']['stock_data']);

            
$product $this->_initProductSave();

            try 
{
                $product
->save();
                
$productId $product->getId();

                
/**
                 * Do copying data to stores
                 */
                
if (isset($data['copy_to_stores'])) {
                    
foreach ($data['copy_to_stores'as $storeTo=>$storeFrom{
                        $newProduct 
Mage::getModel('catalog/product')
                            ->
setStoreId($storeFrom)
                             
/*This is where I added the code*/  ->setWebsiteIds(array(Mage::app()->getStore(true)->getWebsite()->getId()))
                            ->
load($productId)
                            ->
setStoreId($storeTo)
                            ->
save();
                    
}
                }

                Mage
::getModel('catalogrule/rule')->applyAllRulesToProduct($productId);

                
$this->_getSession()->addSuccess($this->__('The product has been saved.'));
            
catch (Mage_Core_Exception $e{
                $this
->_getSession()->addError($e->getMessage())
                    ->
setProductData($data);
                
$redirectBack true;
            
catch (Exception $e{
                Mage
::logException($e);
                
$this->_getSession()->addError($e->getMessage());
                
$redirectBack true;
            
}
        }
 
Magento Community Magento Community
Magento Community
Magento Community
 
itmunltd
Jr. Member
 
Total Posts:  5
Joined:  2011-05-08
 

ok so the error seems to be caused by the product locator module which is kind of important to me. deactivating solves the issue

 
Magento Community Magento Community
Magento Community
Magento Community
 
SCAND
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2012-11-29
 

We have updated the package to version 0.5.0.
It should fix issue with creation of configurable products.
Thanks for your interest to our package.

 
Magento Community Magento Community
Magento Community
Magento Community
 
itmunltd
Jr. Member
 
Total Posts:  5
Joined:  2011-05-08
 

Thanks a lot! It seems to work now smile Nice to see that there is still some decent support

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top