在Magento 1.5.1.0的vanilla安装中,我创建了简单的产品COLOR-RED,COLOR-BLUE并创建了一个可配置的产品COLOR,其中包含与之相关的产品 . 这一切都很好,除了相关产品的名称没有显示在可配置产品的“超级产品属性配置”表的后端 . 我在htdocs / app / design / adminhtml / default / default / template / widget / grid.phtml中添加了一个简单的调试语句,以便在显示之前显示项目的数据 . 见下文,name属性不存在 . 有人知道为什么吗?它是Magento中的一个错误,还是其他错误?
Array
(
[entity_id] => 1
[entity_type_id] => 4
[attribute_set_id] => 9
[type_id] => simple
[sku] => COLOR-RED
[has_options] => 0
[required_options] => 0
[created_at] => 2011-12-13 15:08:36
[updated_at] => 2011-12-13 15:08:36
[is_saleable] => 0
[inventory_in_stock] => 0
[color] => 3
[price] => 12.0000
[stock_item] => Varien_Object Object
(
[_data:protected] => Array
(
[is_in_stock] =>
)
[_hasDataChanges:protected] =>
[_origData:protected] =>
[_idFieldName:protected] =>
[_isDeleted:protected] =>
)
)
1 回答
您可能正在使用Simple Configurable Products模块 . 在文件app / code / community / OrganicInternet / SimpleConfigurableProducts / Adminhtml / Block / Catalog / Product / Edit / Tab / Super / Config / Grid.php中,Organic Internet的开发人员留下了一个不错的小提示;
我认为1.3.1中使用的代码已经过时,因此如果您使用的是> 1.3.1,则此文件将过时 . 所以我只看了核心文件app / code / core / Mage / Adminhtml / Block / Catalog / Product / Edit / Tab / Super / Config / Grid.php的内容,寻找差异,找到了罪魁祸首 .
你所要做的就是添加这一行;
这两条线之间;
你们都准备好了!