Mage_Sales_Model_Mysql4_Order_Attribute_Backend_Shipping Class Reference

Inheritance diagram for Mage_Sales_Model_Mysql4_Order_Attribute_Backend_Shipping:

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 Shipping.php.


Member Function Documentation

afterSave ( object  ) 

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.

Definition at line 46 of file Shipping.php.

00047     {
00048         $shippingAddressId = false;
00049         foreach ($object->getAddressesCollection() as $address) {
00050             if ('shipping' == $address->getAddressType()) {
00051                 $shippingAddressId = $address->getId();
00052             }
00053         }
00054         if ($shippingAddressId) {
00055             $object->setShippingAddressId($shippingAddressId);
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 Shipping.php.

00039     {
00040         $shippingAddressId = $object->getShippingAddressId();
00041         if (is_null($shippingAddressId)) {
00042             $object->unsetShippingAddressId();
00043         }
00044     }


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

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