How to add salutation after name in Invoice

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
ump
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 27 Jun 2009, 13:32

How to add salutation after name in Invoice

Post by ump »

Hello Jan,

I am using your wonderful Virtuemart add on for creating invoice in Japanese language site.
In Japanese, there should be japanese word "SAMA" after name.
I appreciate If you can advise me how to add word after name in INVOICE.

Thank you very much for your co-operation in advance.

With best regards,

ump
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48536
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to add salutation after name in Invoice

Post by Jan »

Hi, you can add this into the code, so it will appear on the site, e.g.:

administrator\components\com_virtuemart\pdf\phoca.tcpdf.php
There you can see outputed strings, so you can add it to some other string, e.g. before bill id

Code: Select all

$this->Cell(24,5,"SAMA - ". $hD['dbb']->f('bill_id'),0,0,'C');
etc.
If you find Phoca extensions useful, please support the project
ump
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 27 Jun 2009, 13:32

Re: How to add salutation after name in Invoice

Post by ump »

Dear Mr.Jan,

Thank you very much for your kindness by replying me.
As your advise I put the code inside the file of administrator\components\com_virtuemart\pdf\phoca.tcpdf.php
After touch this and that at the numerical figures, I could mage the print the SAMA. But I could manage
to bringonly before name but coould not print SAMA after the name.
I put the code in "phoca.tcpdf.php" file as following;
$this->Cell(0,0,"SAMA ". $hD['dbst']->f("last_name") . $hD['dbst']->f("middle_name").$hD['dbst']->f("first_name"),0,0,'L');

I cordially request you to help me once again by advising following issues:
1) How to change code to print the " SAMA" after the name first name(in Japanese name should write as Last name and First name)
2) SAMA should be in JAPANESE.
I plan to use the followng code in japanese.php of language/common
'VM_DELIVERY_STATE' => '様',
*** This is the language code of your addon and I wanted to use the one which is not using.

In order make my request clear, I hereiwth attach the file.

Sorry to take your valuable time.

Thank you for your co-operation in advance.

With best regards,

ump
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48536
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to add salutation after name in Invoice

Post by Jan »

1) Hi for now I don't have the code so I cannot say specific place where to add it but it should be not difficult, just search for name string in the file
2) If you will save the file with uft-8, there should not be problem to save Japanese characters, it should be saved in database OK, the problem will be maybe displaying it in PDF, there I have no experiences, maybe you should see TCPDF sites to check if there is no problem to display such characters in pdf.

Jan
If you find Phoca extensions useful, please support the project
Post Reply