Getting new variables into the invoice

Hello community,



I’m looking for how to get new variables into the invoice… (pdf and html print)

I’d like to show there the user ID + the login name …



Someone got a hint for me?

Thanks

Hi nxvc,





Modifying invoice templates is really hard there and nobody seems to be able to help us.



This post is really worth reading that's wwhy I would like to support it. Unfortunately, my technical knowledge is very poor.



Following this post.

It's probably already there as:

$user_data.user_id

and

{if $settings.General.use_email_as_login}$user_data.email{else}$user_data.username{/if}

Hi. I have some question about this.

In order page, i have added more fields, and, in invoice page i want to get one of that fields. How can i do it? tyhank you!

Depends on how you added your fields. If you've added them to the orders table (or order_details) table then they might be there by default. If not, you might have to add what's known as a 'post controller' to fetch the info you want and add it to the order_info data structure.

I solved this problem.



That is.



If you addet in extra fields some field with choosing options

ex.

Your sex

in admin's invoice print or split print page you must add this


{assign var="profile_fields" value='I'|fn_get_profile_fields}

{include file="profiles/new_userprofile.tpl" fields=$profile_fields.S}




After, in the PROFILES category i added new file with name new_userprofile.tpl with this content.


{foreach from=$fields item="field"}

{assign var="value" value=$order_info.fields[YOUR ID]}

{if "RS"|strpos:$field.field_type !== false} {* Selectbox/Radio *}
{$field.values.$value}
{/if}


{/foreach}




And problem is solved.

ThanX