문제

Ok So I've managed to add a custom attribute to my customers currently only view-able on the admin panel side. Its listing out all the options from another module into the multi selects options as well as the default options at the top of multi select.

Now after I made this I decided that it wasn't quite as user friendly as I would like, so I'm wondering about changing this into a checkbox.

I made an update and changed the attribute as follows:

$installer->addAttribute("customer", "brands",  array(
"type"     => "text",
"backend"  => "",
"label"    => "Brands",
"input"    => "checkbox",
"source"   => "registration/eav_entity_attribute_source_customeroptions13632635690",
"visible"  => true,
"required" => false,
"default" => "",
"frontend" => "",
"unique"     => false,
"note"       => ""

));

This however did not work, So I was wondering if check-box is actually a option for making magento attributes (for customers specifically).

If checkboxes aren't an option, would it be possible to customize the front end to display a check-box list instead of the multi select or would this create problems?

도움이 되었습니까?

해결책

You are right, there is no support for multiple checkboxes as an attribute display in Magento. While you cold go the painful way of doing a full implementation on this one, I recommend http://www.1stwebdesigns.com/blog/development/multiple-select-with-checkboxes-and-jquery . This plugin will transform a multiple select list into multiple checkboxes via javascript.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top