1
A
回答
0
我通过我的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通过独特的价值
显示在前端这张图片,我们可以使用
<?php $thumbnail = $_category->getThumbnail(); ?>
<?php if($thumbnail): ?>
<img src ="<?php echo Mage::getBaseUrl('media').'catalog' . DS . 'category' . DS.$thumbnail; ?>" alt="<?php echo $this->escapeHtml($_category->getName()) ?>" class="img-responsive" />
<?php endif; ?>
相关问题
- 1. Magento的类别缩略图
- 2. 在带有图像缩略图的Magento导航菜单中显示子类别描述
- 3. Magento不会更改现有类别中的类别照片/缩略图
- 4. Magento类别缩略图字段未在管理员中显示
- 5. Magento 1.7所有类别和各自的缩略图
- 6. Magento导航菜单栏与缩略图图片
- 7. Randomise&limit在主页上的类别缩略图magento
- 8. 将菜单中的类别图像制作为缩略图,OpenCart 2.0.x
- 9. 子类别下拉菜单在Magento
- 10. 与产品缩略图导航菜单的Magento
- 11. Magento - 类别缩略图 - 如何使用SVG?
- 12. Magento的同一类产品缩略图
- 13. Magento类别下拉菜单 - 子菜单在2列
- 14. 取消在WooCommerce中设置所有产品类别缩略图
- 15. Prestashop菜单没有子类别
- 16. Magento - 在顶部类别菜单名称旁边放置图像
- 17. 如何将类别图像/缩略图添加到Magento中导航> 1.7
- 18. Magento缩略图问题getProductThumbnail()
- 19. 带缩略图的css下拉菜单
- 20. 目标C,滚动菜单缩略图
- 21. Magento Admin中没有显示菜单
- 22. 仅列出来自magento中所有商店的活动根类别和类别缩略图
- 23. 如何使用Magento中的getThumbnailUrl()从类别中显示缩略图
- 24. Magento - 列出所有子类别仅包括导航菜单有
- 25. Magento - 在销售/订单屏幕中显示缩略图
- 26. 检查类别有子类别或没有在Magento
- 27. 缩略图类别的不同样式
- 28. 后缩略图WordPress的类别
- 29. 获取Woocommerce类别缩略图
- 30. opencart额外的缩略图到类别
只是样本数据和安装然后截断产品,类别,订单和属性表。通过此数据删除和缩略图字段保持可见。这是一种方法,如果你得到另一个请让我们知道。我也有同样的错误 – Shin
嗨Shijin,你是什么意思只是安装一个示例数据?我是否需要使用产品填充我的网站?那么类别中的缩略图将显示?让我知道。谢谢, –
我发布了一个答案,我会尝试,请检查一下,但请注意attribute_id – Shin