Jump to content

PDF print Logo or not


Recommended Posts

Hi, in the PDF.php file I’m trying to only print logo when delivery.firstname is equal to invoce.firstname
so I try code like this

$invoice_address = new Address(intval(self::$order->id_address_invoice));
$delivery_address = new Address(intval(self::$order->id_address_delivery));

if (file_exists(_PS_IMG_DIR_.'/logo.jpg')) AND (($delivery_address->firstname)<>($invoice_address->firstname))
$this->Image(_PS_IMG_DIR_.'/logo.jpg', 10, 8, 0, 15);

but it's error (blank)
thank all

Link to comment
Share on other sites

thx for your answer,
i got the asnwer, this problem caused (file_exists(_PS_IMG_DIR_.'/logo.jpg')) and
(strtoupper($delivery_address->firstname)<>strtoupper($invoice_address->firstname))

should be
if (strtoupper($delivery_address->firstname)<>strtoupper($invoice_address->firstname))
if file_exists(_PS_IMG_DIR_.'/logo.jpg')
bla bla..

i don't know why

Link to comment
Share on other sites

×
×
  • Create New...