作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已在 Magento 1.7.0.2 商店上安装并配置了 Mage_GoogleShopping 模块。尝试将产品添加到 Google 购物时,/var/log/system.log 显示以下错误:
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePrice.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePrice.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePrice.php' for inclusion (include_path='/path/to/shop/httpdocs/app/code/local:/path/to/shop/httpdocs/app/code/community:/path/to/shop/httpdocs/app/code/core:/path/to/shop/httpdocs/lib:.:') in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateFrom.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateFrom.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateFrom.php' for inclusion (include_path='/path/to/shop/httpdocs/app/code/local:/path/to/shop/httpdocs/app/code/community:/path/to/shop/httpdocs/app/code/core:/path/to/shop/httpdocs/lib:.:') in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateTo.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateTo.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/SalePriceEffectiveDateTo.php' for inclusion (include_path='/path/to/shop/httpdocs/app/code/local:/path/to/shop/httpdocs/app/code/community:/path/to/shop/httpdocs/app/code/core:/path/to/shop/httpdocs/lib:.:') in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Name.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Name.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/Name.php' for inclusion (include_path='/path/to/shop/httpdocs/app/code/local:/path/to/shop/httpdocs/app/code/community:/path/to/shop/httpdocs/app/code/core:/path/to/shop/httpdocs/lib:.:') in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Description.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(Mage/GoogleShopping/Model/Attribute/Description.php): failed to open stream: No such file or directory in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
2012-09-12T12:31:27+00:00 ERR (3): Warning: include(): Failed opening 'Mage/GoogleShopping/Model/Attribute/Description.php' for inclusion (include_path='/path/to/shop/httpdocs/app/code/local:/path/to/shop/httpdocs/app/code/community:/path/to/shop/httpdocs/app/code/core:/path/to/shop/httpdocs/lib:.:') in /path/to/shop/httpdocs/lib/Varien/Autoload.php on line 93
该问题已在 Magento 论坛中多次报告,但我尚未找到解决方案。
权限肯定没有问题。文件不存在。
最佳答案
GoogleShopping-Module 尝试“即时”加载所有所需属性的属性模型。如果 Mage/GoogleShopping/Model/Attributes/... 中不存在此模型,则会发生错误...
要覆盖“Mage_GoogleShopping_Model_Type”类中的“_createAttribute”方法,请帮我修复它:
/**
* Create attribute instance using attribute's name
*
* @param string $name
* @return Mage_GoogleShopping_Model_Attribute
*/
protected function _createAttribute($name)
{
$modelName = 'googleshopping/attribute_' . $this->_prepareModelName($name);
$useDefault = false;
$className = Mage::app()->getConfig()->getModelClassName($modelName);
if (class_exists($className)) {
$attributeModel = Mage::getModel($modelName);
$useDefault = !$attributeModel;
} else {
$useDefault = true;
}
if ($useDefault) {
$attributeModel = Mage::getModel('googleshopping/attribute_default');
}
$attributeModel->setName($name);
return $attributeModel;
}
关于magento - GoogleShopping Magento 错误 :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12388352/
我已在 Magento 1.7.0.2 商店上安装并配置了 Mage_GoogleShopping 模块。尝试将产品添加到 Google 购物时,/var/log/system.log 显示以下错误:
我是一名优秀的程序员,十分优秀!