Skip to content

Commit fbfc4ab

Browse files
committed
Price type added
1 parent 22b9ea4 commit fbfc4ab

File tree

2 files changed

+10
-1
lines changed
  • app/code/community/Pimgento/Attribute

2 files changed

+10
-1
lines changed

app/code/community/Pimgento/Attribute/Block/Adminhtml/Source/Type.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ public function getOptions()
2323
/* @var $input Mage_Eav_Model_Adminhtml_System_Config_Source_Inputtype */
2424
$input = Mage::getModel('eav/adminhtml_system_config_source_inputtype');
2525

26-
return $input->toOptionArray();
26+
$types = $input->toOptionArray();
27+
$types[] = array('value' => 'price', 'label' => Mage::helper('pimgento_attribute')->__('Price'));
28+
29+
return $types;
2730
}
2831

2932
}

app/code/community/Pimgento/Attribute/Helper/Data.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ protected function _types($type)
8383
'backend_model' => NULL,
8484
'source_model' => 'eav/entity_attribute_source_table',
8585
),
86+
'price' => array(
87+
'backend_type' => 'decimal',
88+
'frontend_input' => 'price',
89+
'backend_model' => 'catalog/product_attribute_backend_price',
90+
'source_model' => NULL,
91+
),
8692
'default' => array(
8793
'backend_type' => 'varchar',
8894
'frontend_input' => 'text',

0 commit comments

Comments
 (0)