Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
2013-09-29 11:10
513 查看
出现的错误:
当点击商品,进入商品详细页面时出现如下错误:
解决方法:
找到错误所在的地方
替换为:
即可。
或者参考下这里:http://www.magentocommerce.com/boards/viewthread/53871/
当点击商品,进入商品详细页面时出现如下错误:
解决方法:
找到错误所在的地方
public function getAttributeText($attributeCode) { return $this->getResource() ->getAttribute($attributeCode) ->getSource() ->getOptionText($this->getData($attributeCode)); }
替换为:
public function getAttributeText($attributeCode) { if ($attribute = $this->getResource()->getAttribute($attributeCode)) { return $attribute->getSource() ->getOptionText($this->getData($attributeCode)); } else { //Mage::log(\'attributes-errors.log\',$attributeCode); return false; } }
即可。
或者参考下这里:http://www.magentocommerce.com/boards/viewthread/53871/
相关文章推荐
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function fetch_array() on a non-object in E:\wamp\www\shop\index.php
- Fatal error: Call to a member function fetch_row() on a non-object in C:\wamp\www\baicaotang\admin\m
- Fatal error: Call to a member function getData() on a non-object in /data/php/framework/exts/zii/wid
- ECmall错误:Call to a member function get_users_count() on a non-object in /home/dmg/wwwroot/includes/ecapp.base.php