View Single Post
  #1  
Old 12-01-2007, 03:16 AM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default template editing question

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 ?
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote