コード例 #1
0
ファイル: Address.php プロジェクト: votanlean/Magento-Pruebas
 /**
  * Before object save manipulations
  *
  * @return Mage_Sales_Model_Order_Address
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     if (!$this->getParentId() && $this->getOrder()) {
         $this->setParentId($this->getOrder()->getId());
     }
     return $this;
 }
コード例 #2
0
 /**
  * Initialize quote identifier before save
  *
  * @return Mage_Sales_Model_Quote_Address
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     if ($this->getQuote()) {
         $quoteId = $this->getQuote()->getId();
         if ($quoteId) {
             $this->setQuoteId($quoteId);
         } else {
             $this->_dataSaveAllowed = false;
         }
     }
     return $this;
 }
コード例 #3
0
ファイル: Address.php プロジェクト: hazaeluz/magento_connect
 /**
  * Before object save manipulations
  *
  * @return Mage_Sales_Model_Order_Address
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     if (!$this->getParentId() && $this->getOrder()) {
         $this->setParentId($this->getOrder()->getId());
     }
     // Init customer address id if customer address is assigned
     if ($this->getCustomerAddress()) {
         $this->setCustomerAddressId($this->getCustomerAddress()->getId());
     }
     return $this;
 }
コード例 #4
0
ファイル: Address.php プロジェクト: relue/magento2
 /**
  * Initialize quote identifier before save
  *
  * @return Mage_Sales_Model_Quote_Address
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     if ($this->getQuote()) {
         $quoteId = $this->getQuote()->getId();
         if ($quoteId) {
             $this->setQuoteId($quoteId);
         } else {
             $this->_dataSaveAllowed = false;
         }
         $this->setCustomerId($this->getQuote()->getCustomerId());
         /**
          * Init customer address id if customer address is assigned
          */
         if ($this->getCustomerAddress()) {
             $this->setCustomerAddressId($this->getCustomerAddress()->getId());
         }
     }
     if ($this->getAddressType() == Mage_Sales_Model_Quote_Address::TYPE_SHIPPING && $this->getSameAsBilling() === null) {
         $this->setSameAsBilling(1);
     }
     return $this;
 }
コード例 #5
0
 /**
  * Initialize quote identifier before save
  *
  * @return Mage_Sales_Model_Quote_Address
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     if ($this->getQuote()) {
         $quoteId = $this->getQuote()->getId();
         if ($quoteId) {
             $this->setQuoteId($quoteId);
         } else {
             $this->_dataSaveAllowed = false;
         }
         $this->setCustomerId($this->getQuote()->getCustomerId());
         /**
          * Init customer address id if customer address is assigned
          */
         if ($this->getCustomerAddress()) {
             $this->setCustomerAddressId($this->getCustomerAddress()->getId());
         }
     }
     return $this;
 }
コード例 #6
0
ファイル: Address.php プロジェクト: buttasg/cowgirlk
 /**
  * Initialize Quote identifier before save
  *
  * @return Mage_Sales_Model_Quote_Address
  */
 protected function _beforeSave()
 {
     parent::_beforeSave();
     $this->_populateBeforeSaveData();
     return $this;
 }