需要有关产品属性的帮助!
更准确地说,我不知道如何向setup script
选项 Product Information
卡Images
添加另一列checkbox-сов
(例如标准列Exclude
或Remove
)。
是不是这样:
$imageAttributeCode = 'own_gallery_attribute';
$dataImageAttribute = array (
'group' => 'Images',
'type' => 'varchar',
'frontend' => 'catalog/product_attribute_frontend_image',
'label' => 'Own Gallery',
'input' => 'media_image',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'default' => '',
'class' => '',
'source' => ''
);
$install->addAttribute('catalog_product', $imageAttributeCode, $dataImageAttribute);
结果:
添加,一切都很好,但只是添加了radiobutton
!这是可以理解的,因为'input' => 'media_image'
但是如果你这样做'input' => 'checkbox'
-checkbox
页面底部会添加一个!
需要提示:
我究竟做错了什么?我错过了什么或分享错了什么?
你只需要重新定义这个模板
app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml
里面类推这个
自己的属性渲染类型列