Magento Themes and Magento Extensions

get collection of customer all address in magento

Share

get collection of customer all address in magento

Use the following code to retrieve all address of customer with the help of its email id.

<?php
$websiteid = Mage::app()->getwebsite->getid();
$store = Mage::app()->getStore();

$customer = Mage::getModel(“customer/customer”);
$customer->website_id = $websiteid;
$customer->setStore($store);
$customer->loadByEmail(“dexte@yahoo.com”);
$address = Mage::getModel(“Customer/Entity_Address_Collection”);
$address->setCustomerFilter($customer);
$addtess->load();
?>

Leave a Reply

You must be logged in to post a comment.