How to put Logo in PDF invoice

Phoca Cart - complex e-commerce extension
Alexander
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 15 Jan 2020, 17:36

How to put Logo in PDF invoice

Post by Alexander »

Dear Phoca Cart Gurus

I have customized the com_phocacart/layouts/order.php file and added, depending on the shop language, German and English information. I installed Phoca PDF and the PDF Plugin because I want to send orders and invoices as emails with attached PDFs. Everything works perfectly -> Great work, Jan!

I have a German and an English Shop Logo. As I can only set one Shop Logo in the Phoca Cart configuration I added the 2 logos in in the order.php file. Logos are 8-bit png files.
In the email (html) everything works perfectly, Logo in the correct shop language is displayed at the correct position.

Only problem is, that in the attached PDF the Logo is not displayed at all. Neither the German nor the English version.
I already tried to add them in different ways, as <div>, URL etc. to the $o[] array but nothing works. What am I doing wrong or what am I missing?

Thank you for your help

Alexander

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

Re: How to put Logo in PDF invoice

Post by Jan »

Hi, where exactly should the logo be displayed? Maybe try to check the path to the logos.

Jan
If you find Phoca extensions useful, please support the project
Alexander
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 15 Jan 2020, 17:36

Re: How to put Logo in PDF invoice

Post by Alexander »

Hi Jan
it works perfectly in the html for emails. I would like to have it above the $store_title in the upper left side. ->
// -----------
// HEADER LEFT
// -----------

What path does the logo have to have? absolute https://"mysite"/images/logo_de.png or just /images/logo_de.png or images/logo_de.png?

Everything in the PDF works perfectly except the image/logo. Is there a special command to send images to the pdf generator?
I just put it in the $o[] array in order.php..

For the POS Logo you use:
// POS HEADER
if ($pR) {
$oPr[] = $pP->printImage($store_logo_pos);
}

Sorry, I'm not an expert generating PDFs.

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

Re: How to put Logo in PDF invoice

Post by Jan »

But in which part of the PDF should the logo be displayed?

If in header or footer, this is set by PDF plugin settings. If inside e.g. vendor address, this is set in vendor address parameter.

Jan
If you find Phoca extensions useful, please support the project
Alexander
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 15 Jan 2020, 17:36

Re: How to put Logo in PDF invoice

Post by Alexander »

Thank you, this thread can be marked as solved

Alexander
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9451
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: How to put Logo in PDF invoice

Post by Benno »

Done!

Kind regards,
Benno
Post Reply