I need to change all addresses (billing, shipping) street attribute. I have only entity_id (address_id) from customer_address_entity_text.
How can I do it?

$addressId = ...your id here...;
$address = Mage::getModel('customer/address')->load($addressId);
$street = 'your street here';
//or if you want to have 2 lines on the street
//$street = array('First line', 'Second line');

if($address->getId()) {
  • thanks, and how can I get attribute value from this object..For example I added attribute for customer_address (house_number). And I want to get it from this object (Mage::getModel('customer/address')->load($addressId);) getHouseNumber() ? – Mick Dec 7 '15 at 12:28
  • $address = Mage::getModel('customer/address')->load($addressId);. $houseNumber = $address->getHouseNumber() – Marius Dec 7 '15 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.