Page 1 of 1
Adding country to delivery note!
Posted: 23 Apr 2009, 21:12
by enigmacw
I was changing the delivery note toca.php file when I could not find how to show the country on the pdf.
Any Ideas?
Re: Adding country to delivery note!
Posted: 24 Apr 2009, 21:19
by Jan
Hi, the country should be displayed automatically in the PDF (if it is added into VM) ???
Jan
Re: Adding country to delivery note!
Posted: 29 Apr 2009, 10:24
by enigmacw
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!!!
Re: Adding country to delivery note!
Posted: 31 Dec 2009, 20:09
by Tobiwankenobi
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
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 = '';
}
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
[Solved] Re: Adding country to delivery note!
Posted: 31 Dec 2009, 21:10
by Tobiwankenobi
I'm soooooo stupid!

The "
' "s were missing!
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 = '';
}
Happy new Year!!!
Tobiwankenobi
Re: Adding country to delivery note!
Posted: 04 Jan 2010, 20:15
by Jan
Ok