I was changing the delivery note toca.php file when I could not find how to show the country on the pdf.
Any Ideas?
Adding country to delivery note!
- Jan
- Phoca Hero
- Posts: 48689
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Adding country to delivery note!
Hi, the country should be displayed automatically in the PDF (if it is added into VM) ???
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 23 Apr 2009, 21:08
Re: Adding country to delivery note!
Jan,
What i mean is even if the order in virtuemart is showing the country such as " United Kingdom", all you get in the delivery note is "EN" and no full country name. I ship worldwide and need the full country address. I would also like to know how to add additinal attriutes of a product to the delivery notes too!!!
What i mean is even if the order in virtuemart is showing the country such as " United Kingdom", all you get in the delivery note is "EN" and no full country name. I ship worldwide and need the full country address. I would also like to know how to add additinal attriutes of a product to the delivery notes too!!!
-
- Phoca Member
- Posts: 10
- Joined: 09 Aug 2009, 20:33
Re: Adding country to delivery note!
Hi Jan and enigma,
I'm missing the full country name as well. Only "AUT" will appear instead of "Austria".
I modified the delivery.pdf.php as follows
but it won't appear as expected (same for bill to).
Jan, may you can give a little hint please?
Thanks in advance!
Best regards
Tobiwankenobi
I'm missing the full country name as well. Only "AUT" will appear instead of "Austria".
I modified the delivery.pdf.php as follows
Code: Select all
if($dbv->f("vendor_country") != $dbst->f("country")) {
$dbstcountry = new ps_DB;
$q = "SELECT country_name FROM #__{vm}_country ".
"WHERE country_3_code = ".$dbst->f('country');
$dbstcountry->query($q);
$vmSTCountry = $dbstcountry->f("country_name");
} else {
$vmSTCountry = '';
}

Jan, may you can give a little hint please?
Thanks in advance!
Best regards
Tobiwankenobi
-
- Phoca Member
- Posts: 10
- Joined: 09 Aug 2009, 20:33
[Solved] Re: Adding country to delivery note!
I'm soooooo stupid!
The " ' "s were missing!
Here's the working code for the shipping adress at the beginning of delivery.pdf.php:
Happy new Year!!!
Tobiwankenobi

Here's the working code for the shipping adress at the beginning of delivery.pdf.php:
Code: Select all
if($dbv->f("vendor_country") != $dbst->f("country")) {
$dbstcountry = new ps_DB;
$q = "SELECT * FROM #__{vm}_country ".
"WHERE country_3_code = '".$dbst->f('country')."'";
$dbstcountry->query($q);
$vmSTCountry = $dbstcountry->f("country_name");
} else {
$vmSTCountry = '';
}
Tobiwankenobi
- Jan
- Phoca Hero
- Posts: 48689
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Adding country to delivery note!
Ok
If you find Phoca extensions useful, please support the project