Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Putting the Username on Invoices? Anyone?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-19-2011, 01:55 PM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default Putting the Username on Invoices? Anyone?

Hi,

Anyone know how to put the username on the invoice, I'm stumped.

It's for a 4.4.3 cart,

thanks heaps

Spence
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
  #2  
Old 05-20-2011, 01:59 AM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 761
 

Default Re: Putting the Username on Invoices? Anyone?

You must edit the /mail/html/order_invoice.tpl file (which will be either in skin/common_files dir or skin/<skin_used> dir if you have done any modifications already to that template).
Find the following code (around line 77 in 4.4.2 version):
Code:
<table cellspacing="0"{if $is_nomail eq 'Y'} class="invoice-personal-info"{else} cellpadding="0" style="width:45%; border: 0px none; margin-bottom: 15px;"{/if} summary="{$lng.lbl_address|escape}"> <tr> <td><strong>{$lng.lbl_email}:</strong></td> <td>{$order.email}</td> </tr> {if $_userinfo.default_fields.title} <tr> <td><strong>{$lng.lbl_title}:</strong></td> <td>{$order.title}</td> </tr> {/if} {if $_userinfo.default_fields.firstname} <tr> <td{if $is_nomail ne 'Y'} nowrap="nowrap"{/if}><strong>{$lng.lbl_first_name}:</strong></td> <td>{$order.firstname}</td> </tr> {/if} ...................... ...................... ......................

and wherever you want to display the username field, among the <tr> tags, insert an additional table row:
Code:
<tr> <td><strong>username:</strong></td> <td>{$userinfo.username}</td> </tr>
You might have to use different smarty variable names (although I don't think so), I've checked those in 4.4.2 version - check smarty variables in Webmaster mode.
__________________
Vasilis Vrontisis
X-Cart Development, Maintenance & Customization
https://[URL="http://www.craftforweb.com"]craftforweb.com[/url]
vasilis@craftforweb.com
Reply With Quote
  #3  
Old 05-20-2011, 02:32 AM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default Re: Putting the Username on Invoices? Anyone?

thanks a lot mate, I'll give it a ago.
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
  #4  
Old 05-20-2011, 02:46 AM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default Re: Putting the Username on Invoices? Anyone?

Eventhough my site is login via username not password, {$userinfo.username} returns the email address not the username.
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
  #5  
Old 05-20-2011, 02:54 AM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 761
 

Default Re: Putting the Username on Invoices? Anyone?

could it be that the email address has been used for a username ?
__________________
Vasilis Vrontisis
X-Cart Development, Maintenance & Customization
https://[URL="http://www.craftforweb.com"]craftforweb.com[/url]
vasilis@craftforweb.com
Reply With Quote
  #6  
Old 05-20-2011, 03:09 AM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default Re: Putting the Username on Invoices? Anyone?

That's what I thought but no it's not I have it set for login via username not email. the call I have found through webmaster mode in admin is 'uname'. So I tried {$userinfo.uname} but it displays nothing. Thanks for looking though.
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
  #7  
Old 05-20-2011, 05:19 AM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 761
 

Default Re: Putting the Username on Invoices? Anyone?

order_invoice.tpl is called by main/order_message.tpl so you might want to take a look in the calling line - some smarty variables are assigned there which pass on to order_invoice.tpl
__________________
Vasilis Vrontisis
X-Cart Development, Maintenance & Customization
https://[URL="http://www.craftforweb.com"]craftforweb.com[/url]
vasilis@craftforweb.com
Reply With Quote
  #8  
Old 05-20-2011, 05:40 AM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default Re: Putting the Username on Invoices? Anyone?

thanks buddy will do
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
  #9  
Old 05-20-2011, 09:46 PM
 
spence88mph spence88mph is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 95
 

Default Re: Putting the Username on Invoices? Anyone?

ended up being {$userinfo.login}, works a charm, thanks for you help!
__________________
-------------------
4.2.2
4.1.9
Reply With Quote
  #10  
Old 11-24-2011, 02:35 AM
 
SGS SGS is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 99
 

Default Re: Putting the Username on Invoices? Anyone?

I found that to get a username to show up on an Invoice I had to use this:{$_userinfo.login}

Worked using Pro 4.4.4.

Hope that helps anyone else looking to put a user name on an invoice. I would think that would be a given. Maybe QT can build that one in next build???

SGS
__________________
Currently Using:

For X-cart v5.2.0
1 Business v5.2.6 license <Getting Better>!
1 Banner Mod 5.2.7 license
1 #28 iGoods Template

For X-cart v4.7.0

1 GoldPlus v4 license unused

3 Gold v4 license Unused

A wise man once said it is best to fix the cart instead of trying to use a broken cart. The horse has a very hard time pushing a broken cart!!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:25 PM.

   

 
X-Cart forums © 2001-2020