cancel
Showing results for 
Search instead for 
Did you mean: 

How to get default selected customer shipping address?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

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.

2 REPLIES 2

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.