From 8b292d076533ccce0d7db8f585e686b8fa287bda Mon Sep 17 00:00:00 2001 From: DamienMetzger Date: Wed, 21 Nov 2012 10:31:37 +0100 Subject: [PATCH] [-] BO : added missing width and height of the logo in the supplier order PDF --- classes/pdf/HTMLTemplateSupplyOrderForm.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/classes/pdf/HTMLTemplateSupplyOrderForm.php b/classes/pdf/HTMLTemplateSupplyOrderForm.php index fb53a38b1..515f541ef 100644 --- a/classes/pdf/HTMLTemplateSupplyOrderForm.php +++ b/classes/pdf/HTMLTemplateSupplyOrderForm.php @@ -123,15 +123,22 @@ class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate public function getHeader() { $shop_name = Configuration::get('PS_SHOP_NAME'); - + $path_logo = $this->getLogo(); + $width = $height = 0; + + if (!empty($path_logo)) + list($width, $height) = getimagesize($path_logo); + $this->smarty->assign(array( - 'logo_path' => $this->getLogo(), + 'logo_path' => $path_logo, 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_, 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'), 'title' => $this->title, 'reference' => $this->supply_order->reference, 'date' => $this->date, - 'shop_name' => $shop_name + 'shop_name' => $shop_name, + 'width_logo' => $width, + 'height_logo' => $height )); return $this->smarty->fetch($this->getTemplate('supply-order-header'));