Question

I have been searching for a bit on why I'm getting \n in addresses. I have been searching in the templates, adding lines like

<?php echo str_replace('\\n',' ', $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses))) ?>

but that is just a banded as it's coming out in the emails too. I can't seem to find the root to the issue on this. This is what I see everywhere

enter image description here

Here are some details

  • In the export of the customers the address items don't have the extra \n in from of the address parts
  • It shows up in all output that is html based
  • So far all functions that return the address model outputs with \n when formatted in html
  • shortcodes like {{var order.getBillingAddress().format('html')}} also have the error

Any ideas on how to root this issue out?

Was it helpful?

Solution

Check your HTML Address Template

Go to System->Configuration->CUSTOMER->Customer Configuration->Address Templates->HTML and check line endings.

Address Templates

Also you can check event customer_address_format. Maybe some 3rd party extension override address rendering logic.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top