- To get all the address collection created by various customers in magento achieved by the following simple code,
$addressesCollection = Mage::getResourceModel('customer/address_collection');
$addressesCollection->addAttributeToSelect('*');
/* for particular address
$addressesCollection->addFieldToFilter('id','12'); */
foreach ($addressesCollection as $address) {
echo "<pre>";
print_r($address->getData());
}
$addressesCollection = Mage::getResourceModel('customer/address_collection');
$addressesCollection->addAttributeToSelect('*');
/* for particular address
$addressesCollection->addFieldToFilter('id','12'); */
foreach ($addressesCollection as $address) {
echo "<pre>";
print_r($address->getData());
}
No comments:
Post a Comment