7

我安装了没有示例数据的 Magento 1.9.1.0,但在管理员中,添加或编辑类别页面没有缩略图字段。如何在管理员中显示类别的缩略图? 在此处输入图像描述

4

3 回答 3

3

我通过在我的 phpMyAdmin 中运行以下查询来解决此问题,

1)

 INSERT INTO `eav_attribute` (`attribute_id`, `entity_type_id`, `attribute_code`, 
`attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, 
`frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_required`, 
`is_user_defined`, `default_value`, `is_unique`, `note`) VALUES(140, 3, 'thumbnail', NULL, 
 'catalog/category_attribute_backend_image', 'varchar', NULL, NULL, 'image', 'Thumbnail
 Image', NULL, NULL, 0, 0, NULL, 0, NULL);

2)

 INSERT INTO `catalog_eav_attribute` (`attribute_id`, `frontend_input_renderer`, 
`is_global`, `is_visible`, `is_searchable`, `is_filterable`, `is_comparable`, 
`is_visible_on_front`, `is_html_allowed_on_front`, `is_used_for_price_rules`, 
`is_filterable_in_search`, `used_in_product_listing`, `used_for_sort_by`, 
`is_configurable`, `apply_to`, `is_visible_in_advanced_search`, `position`, 
`is_wysiwyg_enabled`, `is_used_for_promo_rules`) VALUES 
 (140, NULL, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL, 0, 0, 0, 0);

3)

INSERT INTO `eav_entity_attribute` (`entity_attribute_id`, `entity_type_id`,  
`attribute_set_id`, `attribute_group_id`, `attribute_id`, `sort_order`) 
VALUES (337, 3, 3, 4, 140, 3);

这里我使用 attribute_id 作为 140,在这些查询中使用一个唯一值的 id

于 2015-01-14T09:03:19.527 回答
3

最简单的解决方案是激活 Mage_XmlConnect 模块,从 1.9.1.0 开始,该模块默认处于非活动状态。您可以通过修改来激活此模块

应用程序/etc/modules/Mage_XmlConnect.xml

<active>将标签的值从false更改为true

于 2015-03-24T12:16:30.267 回答
1

与 1.9 有相同的问题,但设法通过手动将属性直接插入数据库来解决它。检查以下 3 个表eav_attributecatalog_eav_attributeeav_entity_attributeimage属性(我的 id 为 45)并相应地将其复制到缩略图。希望这会有所帮助。

于 2015-01-10T17:01:24.057 回答