Public Member Functions | |
beforeSave ($object) | |
afterSave ($object) |
Definition at line 35 of file Billing.php.
afterSave | ( | $ | object | ) |
After save order billing address process
Mage_Sales_Model_Order | $object |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 58 of file Billing.php.
00059 { 00060 $billingAddressId = false; 00061 foreach ($object->getAddressesCollection() as $address) { 00062 /* @var $address Mage_Sales_Model_Order_Address */ 00063 if ('billing' == $address->getAddressType()) { 00064 $billingAddressId = $address->getId(); 00065 } 00066 } 00067 00068 if ($billingAddressId) { 00069 $object->setBillingAddressId($billingAddressId); 00070 $this->getAttribute()->getEntity()->saveAttribute($object, $this->getAttribute()->getAttributeCode()); 00071 } 00072 00073 return $this; 00074 }
beforeSave | ( | $ | object | ) |
Before save order billing address process
Mage_Sales_Model_Order | $object |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 43 of file Billing.php.
00044 { 00045 $billingAddressId = $object->getBillingAddressId(); 00046 if (is_null($billingAddressId)) { 00047 $object->unsetBillingAddressId(); 00048 } 00049 return $this; 00050 }