Public Member Functions | |
beforeSave ($object) |
Definition at line 36 of file Startdate.php.
beforeSave | ( | $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Datetime.
Definition at line 38 of file Startdate.php.
00039 { 00040 $attributeName = $this->getAttribute()->getName(); 00041 00042 $startDate = $object->getData($attributeName); 00043 00044 if ($startDate=='' && $object->getSpecialPrice()) { 00045 $startDate = Mage::app()->getLocale()->date(); 00046 // $startDate = Mage::getModel('core/date')->gmtDate(''); 00047 } 00048 00049 $object->setData($attributeName, $startDate); 00050 00051 parent::beforeSave($object); 00052 00053 return $this; 00054 }