4

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?

4
  • Do you have a store with this published somewhere ? Also what version and magento is that ?
    – Niloct
    Commented Oct 23, 2015 at 18:22
  • add short code {{var order.billing_address.getFormated(\'html\')}} Commented Oct 23, 2015 at 20:35
  • @Niloct it is upto date version 1.9.2.1 and no it's not visible to the public
    – Quantum
    Commented Oct 24, 2015 at 1:10
  • @PrashantValanda honestly don't see how that would help when it's ` $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses))` if I can't sort it out I'll throw the hail marry though, thank you
    – Quantum
    Commented Oct 24, 2015 at 1:11

1 Answer 1

2
+50

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.

1
  • 1
    it was rooted there. Thank you, I swear I checked there but nope they were in there like that. thank you
    – Quantum
    Commented Oct 25, 2015 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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