Magento: Fix address formatting in PDF printouts
As of ver. 1.9.0.1, the billing and shipping addresses are still formatted incorrectly on the PDF printouts for Invoices, Packing Slips, and Credit Memos.
In the Admin, go to System > Configuration > Customer Configuration. In the Address Templates section, find the PDF textarea.
Replace the contents with:
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}| {{depend company}}{{var company}}|{{/depend}} {{if street1}}{{var street1}}|{{/if}} {{depend street2}}{{var street2}}|{{/depend}} {{depend street3}}{{var street3}}|{{/depend}} {{depend street4}}{{var street4}}|{{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}| {{var country}}| {{depend telephone}}T: {{var telephone}}{{/depend}}| {{depend fax}} F: {{var fax}}{{/depend}}| {{depend vat_id}} VAT: {{var vat_id}}{{/depend}}|
All that’s being changed is the break “|” after City becomes “, ” and a break “|” is added after Street1.

Burlington Associates
http://burlingtonassociates.com/
So apparently if you deal with a subject like community land trusts you need the website to keep your attention. These guys wanted a fun, out-of-the-box type of solution that involved horizontal scrolling mixed in with this lithograph art style one of the partners is interested in. Oh and they wanted it to be c5’d and reasonably mobile capable.
While it wasn’t built to be mobile first (I could see some sort of optimization down the road maybe), some things needed to be addressed for touch. For one, they wanted scrolling div/iframe type areas on the main home page spread. I tried a whole mess of things and ended up with this DW Scroll Plugin (http://www.dyn-web.com/code/scroll/). I only have the one license, but I think it may be worth getting the developer license for it. It is nicer to customize I think than jsscroll and actually works pretty well in both screen and touch environments.
It does all sorts of jQuery resizing, sidescrolling, hashchange, cycle, fancybox, embedded pdf zaniness too. HTML5 Boilerplate, CSS3 Trannies, Google webfonts, and probably some other things I’m missing. Kind of a weird, but kind of cool site.
C5 PDF links to act normally
So we have had complaints about c5 forcing pdf links to download with their file controller – not like you would normally see a pdf link opening directly. So I done found this simple solution:
There’s basically two options in order to allow opening rather than forcing download:
1. Change your links. By default, they will say
http://www.mysite.com/index.php/download_file/1234…
Simply add /view_inline after /download_file, resulting in a link that looks something like this:
http://www.mysite.com/index.php/download_file/view_inline/1234…
2. Option two would be to create a file to override the core “download_file” single page. Simply copy /concrete/controllers/download_file.php to /controllers/download_file.php. In the first line of the view() function, add:
$this->view_inline($fID);
The only issue this will cause is that the user will not see a file name when the download prompt comes up. You can fix this by adding the following code to the view_inline() function after the line that says “header(“Content-type: $mimeType”);”
Recent Comments