Example #1
0
 /**
  * Perform operation after save
  *
  * @param Varien_Object $object
  */
 public function afterSave($object)
 {
     $shippingAddressId = false;
     foreach ($object->getAddressesCollection() as $address) {
         if ('shipping' == $address->getAddressType()) {
             $shippingAddressId = $address->getId();
         }
     }
     if ($shippingAddressId) {
         $object->setShippingAddressId($shippingAddressId);
         $this->getAttribute()->getEntity()->saveAttribute($object, $this->getAttribute()->getAttributeCode());
     }
 }