Skip to content

Instantly share code, notes, and snippets.

@gabidavila
Created April 13, 2013 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabidavila/5376326 to your computer and use it in GitHub Desktop.
Save gabidavila/5376326 to your computer and use it in GitHub Desktop.
Source model customized Magento
<?php
class Namespace_Module_Model_Customfield extends Mage_Core_Model_Abstract {
protected function _construct() {
$this->_init('namespace/customfield');
}
public function toOptionArray() {
$options = array(
0 => array('value' => 'SP', 'label' => 'São Paulo'),
1 => array('value' => 'MG', 'label' => 'Minas Gerais'),
2 => array('value' => 'RJ', 'label' => 'Rio de Janeiro'),
3 => array('value' => 'ES', 'label' => 'Espírito Santo'),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment