Adding country to delivery note!

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
enigmacw
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 23 Apr 2009, 21:08

Adding country to delivery note!

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Adding country to delivery note!

Post by Jan »

Hi, the country should be displayed automatically in the PDF (if it is added into VM) ??? :(

Jan
If you find Phoca extensions useful, please support the project
enigmacw
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 23 Apr 2009, 21:08

Re: Adding country to delivery note!

Post 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!!!
Tobiwankenobi
Phoca Member
Phoca Member
Posts: 10
Joined: 09 Aug 2009, 20:33

Re: Adding country to delivery note!

Post 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). :idea:

Jan, may you can give a little hint please?

Thanks in advance!

Best regards
Tobiwankenobi
Tobiwankenobi
Phoca Member
Phoca Member
Posts: 10
Joined: 09 Aug 2009, 20:33

[Solved] Re: Adding country to delivery note!

Post by Tobiwankenobi »

I'm soooooo stupid! :x 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Adding country to delivery note!

Post by Jan »

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