/** * Before save * * @param Varien_Object $object * @return Mage_Catalog_Model_Resource_Product_Attribute_Backend_Urlkey */ public function beforeSave($object) { $attributeName = $this->getAttribute()->getName(); $urlKey = $object->getData($attributeName); if ($urlKey == '') { $urlKey = $object->getName(); } $object->setData($attributeName, $object->formatUrlKey($urlKey)); return $this; }