Public Member Functions | |
beforeSave ($object) | |
afterSave ($object) |
Definition at line 35 of file Shipping.php.
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 }