Skip to content

Commit

Permalink
Fix checkout address for guest order (OpenMage#969)
Browse files Browse the repository at this point in the history
* fix checkout address for guest

* refactoring
  • Loading branch information
Kevin Krieger authored Sep 1, 2020
2 parents a985746 + 2b785cb commit 5e0a74f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Checkout/Block/Onepage/Billing.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function getAddress()
$this->_address->setLastname($this->getQuote()->getCustomer()->getLastname());
}
} else {
$this->_address = Mage::getModel('sales/quote_address');
$this->_address = $this->getQuote()->getBillingAddress();
}
}

Expand Down
6 changes: 1 addition & 5 deletions app/code/core/Mage/Checkout/Block/Onepage/Shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ public function getMethod()
public function getAddress()
{
if (is_null($this->_address)) {
if ($this->isCustomerLoggedIn()) {
$this->_address = $this->getQuote()->getShippingAddress();
} else {
$this->_address = Mage::getModel('sales/quote_address');
}
$this->_address = $this->getQuote()->getShippingAddress();
}

return $this->_address;
Expand Down

0 comments on commit 5e0a74f

Please sign in to comment.