Public Member Functions | |
beforeSave ($object) | |
afterSave ($object) |
Definition at line 35 of file Billing.php.
afterSave | ( | $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 46 of file Billing.php.
00047 { 00048 $billingAddressId = false; 00049 foreach ($object->getAddressesCollection() as $address) { 00050 if ('billing' == $address->getAddressType()) { 00051 $billingAddressId = $address->getId(); 00052 } 00053 } 00054 if ($billingAddressId) { 00055 $object->setBillingAddressId($billingAddressId); 00056 $this->getAttribute()->getEntity()->saveAttribute($object, $this->getAttribute()->getAttributeCode()); 00057 } 00058 }
beforeSave | ( | $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 38 of file Billing.php.
00039 { 00040 $billingAddressId = $object->getBillingAddressId(); 00041 if (is_null($billingAddressId)) { 00042 $object->unsetBillingAddressId(); 00043 } 00044 }