Invoice/Order Layout in 1.35

What do other people think about layout of the invoice/order that is e-mailed to customer and displayed when you select the “print” button.



Is it just me or should we not have the “field names” visible as well as the “field content” for the two columns for the customer and shipping details?



Also, do you think both columns should be left justified? ie





Billing address

--------------------------------------------------------------------------------



First name: test

Last name: test

Address: 23 FALKIRK STREET

Address, line 2: -

City: FALKIRK

Country: United Kingdom (Great Britain)

State/province: Falkirk

Zip/postal code: FK23 3KN



and so on …



should it not look like …



Billing Address



test test

23 Falkirk Street (note empty line 2 is removed)

Falkirk

FALKIRK

United Kingdom

FK23 3KN



Thoughts???

I HATE the field names included on the invoice. I would much prefer that the invoice header be laid out as you suggest.



Bob

Well taking a look at the invoice.tpl I think it can be done. Our company information can be formatted the way you would like the contact info, billing and shipping to be done. However the variables called in the top company header are just the information but the variables called in contact info, billing and shipping is the full table of fields. I’m no expert but is there a variable to only call the information in the database into the invoice or is calling the whole table which includes the profile fields the only way?

I redesigned the top of our invoice to use these labels. Our layout puts the delivery address onto the sticker to stick onto the parcel. Saves so much time.



Thanks for input.



Stickers are a great idea.



Changing the invoice.tpl doesn’t sound like a 5 minute job, but will have a look at it anyway cos I can’t leave it looking like that. Will let you know how I get on.



Barry

[quote name=‘baballuci’]I redesigned the top of our invoice to use these labels. Our layout puts the delivery address onto the sticker to stick onto the parcel. Saves so much time.

[/QUOTE]



Thats a really good idea. Was it a lot of work to modify the invoice?

Not really, it depends on what you want it to look like. I only use this invoice on the admin side, the customer invoice remained the same.

That is nice a nice and clear invoice label. I wish the developers would make a layout like this standard for the invoice header.



Bob

How do you distinguish between the admin side invoice and the customer invoice? I’ve been working to customize the invoice, and basically what I’ve done is add the {$order_status.email_header} variable in the middle of the invoice template. That way when I send emails, I can incorporate data in the middle of the “invoice” specific to the status and I only have to make updates to what I want said there in the Order Status section of the admin console.



The thing that has me wondering is that if I send emails, it works… and includes the variable… but when I click Print Invoice from within the admin console, the invoice it displays does not include the output from {$order_status.email_header}. This is how I want it actually, but I don’t understand why.



When I’m done, I’m going to remove {$order_status.email_header} from the order_notification template and rename “Invoice” to something else more descriptive.



I’m not a developer by any stretch, so anything I’m doing is just trial and error.

[quote name=‘JerrysPaintball’]

How do you distinguish between the admin side invoice and the customer invoice?

[/quote]

This post should help, this hasn’t been tested with 1.3.5 though. [url]http://vb.cs-cart.com/showthread.php?t=226&highlight=invoice[/url]

Hey babalucci, what call functions or variables did you use to call that data (customer shipping information on your sticket label) without using the profile field names? From {include file="profiles/profile_fields_info.tpl" fields=$profile_fields.S title=$lang.shipping_address user_data=$order_info}




Did you delete file="profiles/profile_fields_info.tpl"



to get rid of the profile fields? so that only the user data shows up?



Also, I see that I have a “mail folder” in my “new vision yellow” skin and I see it also has an invoice.tpl file. Is this the one that is shown to customers?

The top section of my invoice layout is: (in mail/orders/admin_invoice.tpl)


```php





{$settings.Company.company_name}


{$order_info.title} {$order_info.firstname} {$order_info.lastname}


{assign var="profile_fields" value='I'|fn_get_profile_fields}
{include file="profiles/profile_fields_info3.tpl" fields=$profile_fields.S user_data=$order_info}




```

and my profile_fields_info3.tpl is

```php
{foreach from=$fields item=field}
{if $field.field_name}
{assign var="data_id" value=$field.field_name}
{assign var="value" value=$user_data.$data_id}
{else}
{assign var="data_id" value=$field.field_id}
{assign var="value" value=$user_data.fields.$data_id}
{/if}


{if 'AOL'|strpos:$field.field_type !== false} {* Titles/States/Countries *}
{assign var="title" value="`$data_id`_descr"}
{$user_data.$title}
{elseif $field.field_type == 'C'} {* Checkbox *}
{if $value == 'Y'}{$lang.yes}{else}{$lang.no}{/if}
{elseif $field.field_type == 'D'} {* Date *}
{$value|date_format:$settings.Appearance.date_format}
{elseif 'RS'|strpos:$field.field_type !== false} {* Selectbox/Radio *}
{$field.values.$value}
{else} {* input/textarea *}
{$value}
{/if}


{/foreach}
```

This is my admin invoice, the customer invoice is still the same. I use two seperate invoices as in the link above in post 10 above.

did you create profile_fields_info3.tpl? It is not in any of my folders…

Yeh profile_fields_info3.tpl is a new file.

[quote name=‘baballuci’]Yeh profile_fields_info3.tpl is a new file.[/QUOTE]



what is the path for (in mail/orders/admin_invoice.tpl) in basic template :confused:

I’m using 1.3.4sp3, i’ve not tried this in 1.3.5. The link above describes how to have a customer invoice as well as a seperate admin invoice, but it’s for 1.3.4.



I’ve not tried yet to see if it works in the latest version.

Is profile_fields_info3.tpl different from profile_fields_info.tpl? Did you make changes or did you create a new file as to keep the original as a backup?

It’s slightly different, it dosen’t have the field names or the “-” for address line 2.

Well it sure works for 1.3.5 SP1



Thanks!

I just realized when using this code …when viewing orders in admin…it places the section heading underneath the information. So it would look like this



Mr.

John

Doe

JohnD@gmail.com

Contact information

--------------------------------




John

Doe

45 Willis St

Union

New Jersey

09090

United States

Billing Address

---------------------------------




By the way, I don’t know how you were able to place the last name and first name on the same line. (Same goes for city, state zipcode)