Beispiel #1
0
 /**
  * Before object save manipulations
  *
  * @return $this
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     if (!$this->getParentId() && $this->getOrder()) {
         $this->setParentId($this->getOrder()->getId());
     }
     // Init customer address id if customer address is assigned
     $customerData = $this->getCustomerAddressData();
     if ($customerData) {
         $this->setCustomerAddressId($customerData->getId());
     }
     return $this;
 }
Beispiel #2
0
 /**
  * Initialize quote identifier before save
  *
  * @return $this
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     $this->_populateBeforeSaveData();
     return $this;
 }