/** * Set attribute default value if value empty * * @param Varien_Object $object */ public function beforeSave($object) { if ($object->hasData($this->getAttribute()->getAttributeCode()) && $object->getData($this->getAttribute()->getAttributeCode()) == $this->getDefaultValue()) { $object->unsData($this->getAttribute()->getAttributeCode()); } }