I'm creating a custom invoice and was wondering how to do something.
In my customer's billing & shipping address boxes I want to add the customer's phone, fax, email, and website, but ONLY IF they entered them.
I have gone through and added this:
Code:
{if $_userinfo.default_fields.phone} {$order.phone}<br />{/if}
But if the user did not enter in a phone number then the field still adds the <br /> which on my invoice is creating a return space. With a few of these entries: email, web address, phone, fax you can see how it can add up to multiple return spaces if these fields are blank which will make my invoice look odd.
Can someone tell me how to do this to where only if the customer adds the info to these fields it will show up and if they omit them then they are omitted from my invoice as well and the return space isn't placed in. Am I putting the <br /> in the wrong place? or am I referencing the wrong thing by using userinfo.default_fields.phone ?