コード例 #1
0
ファイル: Billing.php プロジェクト: findmark/magentoproject
 public function getAddress()
 {
     $address = $this->getQuote()->getBillingAddress();
     if ($address) {
         return $address;
     }
     return parent::getAddress();
 }
コード例 #2
0
 public function getAddress()
 {
     $HcdWallet = Mage::getSingleton('checkout/session')->getHcdWallet();
     if (!empty($HcdWallet)) {
         $wallet = Mage::getSingleton('checkout/session')->getHcdWallet();
         $this->_address = Mage::getModel('sales/quote_address')->setAddressType(Mage_Sales_Model_Quote_Address::TYPE_BILLING)->setStoreId(Mage::app()->getStore()->getId())->setFirstname($wallet['adress']['firstname'])->setLastname($wallet['adress']['lastname'])->setEmail($wallet['adress']['email'])->setSuffix('')->setCompany('')->setStreet(array('0' => $wallet['adress']['street'][0], '1' => $wallet['adress']['street'][1]))->setCity($wallet['adress']['city'])->setPostcode($wallet['adress']['postcode'])->setCountry_id($wallet['adress']['country_id'])->setRegion($wallet['adress']['region'])->setRegion_id((string) $wallet['adress']['region_id'])->setTelephone($wallet['adress']['telephone'])->setFax();
         return $this->_address;
     } else {
         return parent::getAddress();
     }
 }
コード例 #3
0
ファイル: Billing.php プロジェクト: santhosh400/ecart
 public function getAddress()
 {
     if (is_null($this->_address) && !$this->isCustomerLoggedIn()) {
         $address = $this->getQuote()->getBillingAddress();
         if ($address->getId()) {
             $this->_address = $address;
             return $address;
         }
     }
     return parent::getAddress();
 }
コード例 #4
0
ファイル: Billing.php プロジェクト: aligent/Aligent_Base
 /**
  * Return Sales Quote Address model
  *
  * @return Mage_Sales_Model_Quote_Address
  */
 public function getAddress()
 {
     $oAddress = parent::getAddress();
     if ($oAddress->isObjectNew()) {
         // Core functionality has created a new address object because it's not a logged-in customer
         if ($this->getQuote()->getBillingAddress()) {
             // If the visitor has previously been through the billing step then use that data
             $this->_address = $this->getQuote()->getBillingAddress();
         }
     }
     return $this->_address;
 }
コード例 #5
0
ファイル: Billing.php プロジェクト: xiaoguizhidao/devfashion
 public function getAddress()
 {
     if (version_compare(Mage::getVersion(), '1.5.0', '<=')) {
         return parent::getAddress();
     } else {
         if (is_null($this->_address)) {
             if (!$this->isCustomerLoggedIn()) {
                 $this->_address = $this->getQuote()->getBillingAddress();
             } else {
                 parent::getAddress();
             }
         }
     }
     return $this->_address;
 }