错误描述
Fatal error: Call to a member function getSku() on a non-object in
/path/on/server/app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php on line 221.
或
Fatal error: Call to a member function getSku() on a non-object in
app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php on line 710
或
Fatal error: Call to a member function getSku() on a non-object in ...
解决办法
添加如下文档
/app/code/local/Mage/Catalog/Model/Product/Type/Select.php
或
/app/code/local/Mage/Catalog/Model/Product/Type/Configurable.php
找到出错位置,进行如下修改
$o= $simpleOption->getProduct($product); $simple_sku = is_object($o) ? $o->getSku() : null;
清除缓存,问题解决!