[-] PDF : Bug Fixed #PSFV-330 - Shopname not correct on invoice
This commit is contained in:
@@ -33,9 +33,9 @@ abstract class HTMLTemplateCore
|
||||
{
|
||||
public $title;
|
||||
public $date;
|
||||
public $address;
|
||||
public $available_in_your_account = true;
|
||||
public $smarty;
|
||||
public $shop;
|
||||
|
||||
/**
|
||||
* Returns the template's HTML header
|
||||
@@ -49,7 +49,7 @@ abstract class HTMLTemplateCore
|
||||
'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'),
|
||||
'title' => $this->title,
|
||||
'date' => $this->date,
|
||||
'shop_name' => Configuration::get('PS_SHOP_NAME')
|
||||
'shop_name' => $this->shop->name
|
||||
));
|
||||
|
||||
return $this->smarty->fetch(_PS_THEME_DIR_.'/pdf/header.tpl');
|
||||
@@ -62,9 +62,13 @@ abstract class HTMLTemplateCore
|
||||
public function getFooter()
|
||||
{
|
||||
$shop_address = '';
|
||||
if (isset($this->address) && $this->address instanceof Address)
|
||||
$shop_address = AddressFormat::generateAddress($this->address, array(), ' - ', ' ');
|
||||
|
||||
if (Validate::isLoadedObject($this->shop))
|
||||
{
|
||||
$shop_address_obj = $this->shop->getAddress();
|
||||
if (isset($shop_address_obj) && $shop_address_obj instanceof Address)
|
||||
$shop_address = AddressFormat::generateAddress($shop_address_obj, array(), ' - ', ' ');
|
||||
}
|
||||
|
||||
$this->smarty->assign(array(
|
||||
'available_in_your_account' => $this->available_in_your_account,
|
||||
'shop_address' => $shop_address,
|
||||
|
||||
@@ -43,8 +43,7 @@ class HTMLTemplateDeliverySlipCore extends HTMLTemplate
|
||||
$this->title = self::l('Delivery').' #'.Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id).sprintf('%06d', $this->order_invoice->delivery_number);
|
||||
|
||||
// footer informations
|
||||
$shop = new Shop((int)$this->order->id_shop);
|
||||
$this->address = $shop->getAddress();
|
||||
$this->shop = new Shop((int)$this->order->id_shop);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,8 +45,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
$this->title = self::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', Context::getContext()->language->id).sprintf('%06d', $order_invoice->number);
|
||||
|
||||
// footer informations
|
||||
$shop = new Shop((int)$this->order->id_shop);
|
||||
$this->address = $shop->getAddress();
|
||||
$this->shop = new Shop((int)$this->order->id_shop);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,8 +44,7 @@ class HTMLTemplateOrderReturnCore extends HTMLTemplate
|
||||
$this->title = 'Order Return '.sprintf('%06d', $this->order_return->id); // TODO
|
||||
|
||||
// footer informations
|
||||
$shop = new Shop((int)$this->order->id_shop);
|
||||
$this->address = $shop->getAddress();
|
||||
$this->shop = new Shop((int)$this->order->id_shop);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,8 +50,7 @@ class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice
|
||||
$this->title = self::l('Slip #').sprintf('%06d', $this->order_slip->id);
|
||||
|
||||
// footer informations
|
||||
$shop = new Shop((int)$this->order->id_shop);
|
||||
$this->address = $shop->getAddress();
|
||||
$this->shop = new Shop((int)$this->order->id_shop);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user