00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Bundle_Model_Product_Attribute_Source_Price_View extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
00036 {
00037 public function getAllOptions()
00038 {
00039 if (is_null($this->_options)) {
00040 $this->_options = array(
00041 array(
00042 'label' => Mage::helper('bundle')->__('As low as'),
00043 'value' => 1
00044 ),
00045 array(
00046 'label' => Mage::helper('bundle')->__('Price Range'),
00047 'value' => 0
00048 ),
00049 );
00050 }
00051 return $this->_options;
00052 }
00053
00054
00055
00056
00057
00058
00059
00060 public function getOptionText($value)
00061 {
00062 $options = $this->getAllOptions();
00063 foreach ($options as $option) {
00064 if ($option['value'] == $value) {
00065 return $option['label'];
00066 }
00067 }
00068 return false;
00069 }
00070
00071
00072
00073
00074
00075
00076 public function getFlatColums()
00077 {
00078 $columns = array();
00079 $columns[$this->getAttribute()->getAttributeCode()] = array(
00080 'type' => 'int',
00081 'unsigned' => false,
00082 'is_null' => true,
00083 'default' => null,
00084 'extra' => null
00085 );
00086 return $columns;
00087 }
00088
00089
00090
00091
00092
00093
00094
00095 public function getFlatUpdateSelect($store)
00096 {
00097 return Mage::getResourceModel('eav/entity_attribute_option')
00098 ->getFlatUpdateSelect($this->getAttribute(), $store, false);
00099 }
00100 }