Public Member Functions | |
beforeSave ($object) |
Definition at line 28 of file Region.php.
beforeSave | ( | $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 31 of file Region.php.
00032 { 00033 if (is_numeric($object->getRegion())) { 00034 $region = Mage::getModel('directory/region')->load((int)$object->getRegion()); 00035 if ($region) { 00036 $object->setRegionId($region->getId()); 00037 $object->setRegion($region->getCode()); 00038 } 00039 } 00040 }