Skip to content

Instantly share code, notes, and snippets.

@deniscsz
Created August 19, 2012 02:37
Show Gist options
  • Save deniscsz/3391177 to your computer and use it in GitHub Desktop.
Save deniscsz/3391177 to your computer and use it in GitHub Desktop.
Novoatributo\Model\Entity\Tipopessoa.php
<?php
class Alexbraga_Novoatributo_Model_Entity_Tipopessoa extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
{
public function getAllOptions()
{
if ($this->_options === null) {
$this->_options = array();
$this->_options[] = array(
'value' => '',
'label' => 'Escolha a opco..'
);
$this->_options[] = array(
'value' => 1,
'label' => 'Fisica'
);
$this->_options[] = array(
'value' => 2,
'label' => 'Juridica'
);
$this->_options[] = array(
'value' => 3,
'label' => 'Outro'
);
}
return $this->_options;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment