예제 #1
0
파일: Address.php 프로젝트: aiesh/magento2
 /**
  * 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;
 }
예제 #2
0
파일: Address.php 프로젝트: aiesh/magento2
 /**
  * Initialize quote identifier before save
  *
  * @return $this
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     $this->_populateBeforeSaveData();
     return $this;
 }