Mage_Sales_Model_Entity_Order_Attribute_Backend_Billing Class Reference

Inheritance diagram for Mage_Sales_Model_Entity_Order_Attribute_Backend_Billing:

Mage_Eav_Model_Entity_Attribute_Backend_Abstract Mage_Eav_Model_Entity_Attribute_Backend_Interface

List of all members.

Public Member Functions

 beforeSave ($object)
 afterSave ($object)


Detailed Description

Definition at line 35 of file Billing.php.


Member Function Documentation

afterSave ( object  ) 

After save order billing address process

Parameters:
Mage_Sales_Model_Order $object
Returns:
Mage_Sales_Model_Entity_Order_Attribute_Backend_Billing

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

Parameters:
Mage_Sales_Model_Order $object
Returns:
Mage_Sales_Model_Entity_Order_Attribute_Backend_Billing

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:40 2009 for Magento by  doxygen 1.5.8