Skip to content

Attribute Types

Marius edited this page Aug 22, 2014 · 2 revisions

Attribute Types

For each entity you can choose from the following list of attribute types:

  • Text
    • Decimal - Will add a simple text input. Attributes with this attribute type can behave as name. The table field or attribute will have the decimal(12,4) type.
    • Int - Will add a simple text input. Attributes with this attribute type can behave as name. The table field or attribute will have the int(11) type.
    • Text - Will add a simple text input. Attributes with this attribute type can behave as name. The table field or attribute will have the varchar(255) type.
    • Textarea - Will add a simple text input. Attributes with this attribute type can not behave as name. The table field or attribute will have the varchar(255) type. For textarea attributes you have WYSIWYG support if you enable it.
  • Dropdown
    • Country - Will add a dropdown with all the available countries magento has. The table column or attribute will have the type varchar(2) and it will store the country ISO2 code.
    • Dropdown - Will add a dropdown. The options of the dropdown depend on the later configuration. See the Entity Attributes page for more details. The column or attribute type is in most of the cases int(11) but in case you use a product/category/customer attribute as source it will take that attribute type.
    • Multiselect - Will add a multiselect. The options of the dropdown depend on the later configuration. See the Entity Attributes page for more details. The column or attribute type will be varchar(255).
  • File
    • File - will add a file upload input. The table column or attribute type will be varchar(255). In the frontend these attributes will be rendered as a link to download the uploaded file. These attribute types cannot be set as required and cannot be added to the entity admin grid.
    • Image - will add a file upload input. The table column or attribute type will be varchar(255). In the frontend these attributes will be rendered as image tags. If an entity contains at least one image attribute an image helper file will be generated that will allow you to resize and cache the images, just like the product image helper works. Mage::helper('[module]/[entity]_image')->init($entity, 'image')->resize(200);. These attribute types cannot be set as required and cannot be added to the entity admin grid.
  • Date
    • Date - Will add a date input complete with calendar. The table column or attribute type will be datetime.
Clone this wiki locally