Skip to content

Commit

Permalink
Suggestions by justing, adding color also for products attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Jan 19, 2023
1 parent ad626dc commit 1fd0e08
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions app/code/core/Mage/Catalog/Helper/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,14 @@ public function getAttributeInputTypes($inputType = null)
* @todo specify there all relations for properties depending on input type
*/
$inputTypes = [
'multiselect' => [
'backend_model' => 'eav/entity_attribute_backend_array'
],
'boolean' => [
'source_model' => 'eav/entity_attribute_source_boolean'
],
'color' => [
'backend_model' => 'eav/entity_attribute_backend_color'
],
'multiselect' => [
'backend_model' => 'eav/entity_attribute_backend_array'
]
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public function toOptionArray()
['value' => 'date', 'label' => Mage::helper('eav')->__('Date')],
['value' => 'boolean', 'label' => Mage::helper('eav')->__('Yes/No')],
['value' => 'multiselect', 'label' => Mage::helper('eav')->__('Multiple Select')],
['value' => 'select', 'label' => Mage::helper('eav')->__('Dropdown')]
['value' => 'select', 'label' => Mage::helper('eav')->__('Dropdown')],
['value' => 'color', 'label' => Mage::helper('eav')->__('Color')]
];
}
}
1 change: 1 addition & 0 deletions app/code/core/Mage/Eav/Model/Entity/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ public function getBackendTypeByInput($type)
case 'text':
case 'gallery':
case 'media_image':
case 'color':
$field = 'varchar';
break;

Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Eav/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
<boolean>boolean</boolean>
<multiselect>multiselect</multiselect>
<select>select</select>
<color>color</color>
</input_types>
</validator_data>
</general>
Expand Down

0 comments on commit 1fd0e08

Please sign in to comment.