cancel
Showing results for 
Search instead for 
Did you mean: 

How to get default selected customer shipping address?

Highlighted

How to get default selected customer shipping address?

How to get default selected customer shipping address?

if (is_null($this->_address)) {
if ($this->isCustomerLoggedIn()) {
$this->_address = $this->getQuote()->getShippingAddress();
} else {
$ship = $this->getQuote()->getShippingAddress();
$ship_country = $ship->getCountryId();
if(!empty($ship_country))
$this->_address = $ship;
else
$this->_address = Mage::getModel('sales/quote_address');
}
}


Please reply if you have any idea.

Thanks.

Tags (3)
2 REPLIES

Re: How to get default selected customer shipping address?

Hi Ashish,

 

Isn't 

$this->getQuote()->getBillingAddress();

Working ?

 

Else let us know more details as to what you are trying to do.

Re: How to get default selected customer shipping address?

@Nethues_Sunil thanks for the reply.

But not getting from given code line.

If you have any other idea then reply here.