Public Member Functions | |
beforeSave ($object) | |
afterSave ($object) |
Definition at line 34 of file Billing.php.
afterSave | ( | $ | object | ) |
post_index set in customer save action for address this is $_POST array index for address
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 44 of file Billing.php.
00045 { 00046 if ($defaultBilling = $object->getDefaultBilling()) 00047 { 00048 $addressId = false; 00049 /** 00050 * post_index set in customer save action for address 00051 * this is $_POST array index for address 00052 */ 00053 foreach ($object->getAddresses() as $address) { 00054 if ($address->getPostIndex() == $defaultBilling) { 00055 $addressId = $address->getId(); 00056 } 00057 } 00058 if ($addressId) { 00059 $object->setDefaultBilling($addressId); 00060 $this->getAttribute()->getEntity() 00061 ->saveAttribute($object, $this->getAttribute()->getAttributeCode()); 00062 } 00063 } 00064 }
beforeSave | ( | $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 36 of file Billing.php.
00037 { 00038 $defaultBilling = $object->getDefaultBilling(); 00039 if (is_null($defaultBilling)) { 00040 $object->unsetDefaultBilling(); 00041 } 00042 }