【问题标题】:Getting the following error in my console while trying to import products using CSV尝试使用 CSV 导入产品时在我的控制台中出现以下错误
【发布时间】:2013-03-06 13:44:43
【问题描述】:

致命错误:在 /home/magentosite/public_html/store/app/code/core/Mage/ImportExport/Model 中的非对象上调用成员函数 getName() /Import/Entity/Product.php 上线 390

我在 Magento 1.7.0.2 中使用 Magento 核心导入功能

我该如何解决这个问题?

【问题讨论】:

  • 您需要向我们提供您正在使用的代码。很明显,您正在尝试在不是对象的变量上调用 ->getName() 。为了弄清楚你为什么会得到它,我们需要知道你是如何试图提取你的收藏的。
  • 这个问题需要minimal reproducible example 才能解决。

标签: magento-1.7


【解决方案1】:

你必须先加载产品

$mageProduct = Mage::getModel('catalog/product')->loadByAttribute('sku',$SKU);

谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-09-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多