To not show a line for Company Name: with a blank after it if the customer did not enter a company name in the registration field that was (optional) , not (required)
for the standard customer information
on the invoice page such as /order.php?orderid=##
above where First Name : // Last Name : // etc. is on the invoice
in File: /mail/html/order_invoice.tpl you can replace:
Code:
{if $_userinfo.default_fields.company}
<tr>
<td>{$lng.lbl_company}:</td>
<td>{$order.company}</td>
</tr>
{/if}
with:
Code:
{if $_userinfo.default_fields.company}
{if $order.company ne ''}
<tr>
<td>{$lng.lbl_company}:</td>
<td>{$order.company}</td>
</tr>
{/if}
{/if}
All it really does is check if 'company' has a value in the database table xcart_orders (where it grabs all the other info for the customer that was accurate at the time of the order being placed) before it decides to print Company: (blank) or Company: ACME Gadgets, Inc.
if there is a value it will print: Company: ACME Gadgets, Inc.
if there is not a value it will not print Company: (blank)
So you end up with a nicer-looking invoice i think
Hope this helps someone , took me a while to figure out so I figured I'd share
-Diana