[-] 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 $title;
|
||||||
public $date;
|
public $date;
|
||||||
public $address;
|
|
||||||
public $available_in_your_account = true;
|
public $available_in_your_account = true;
|
||||||
public $smarty;
|
public $smarty;
|
||||||
|
public $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the template's HTML header
|
* Returns the template's HTML header
|
||||||
@@ -49,7 +49,7 @@ abstract class HTMLTemplateCore
|
|||||||
'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'),
|
'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'),
|
||||||
'title' => $this->title,
|
'title' => $this->title,
|
||||||
'date' => $this->date,
|
'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');
|
return $this->smarty->fetch(_PS_THEME_DIR_.'/pdf/header.tpl');
|
||||||
@@ -62,8 +62,12 @@ abstract class HTMLTemplateCore
|
|||||||
public function getFooter()
|
public function getFooter()
|
||||||
{
|
{
|
||||||
$shop_address = '';
|
$shop_address = '';
|
||||||
if (isset($this->address) && $this->address instanceof Address)
|
if (Validate::isLoadedObject($this->shop))
|
||||||
$shop_address = AddressFormat::generateAddress($this->address, array(), ' - ', ' ');
|
{
|
||||||
|
$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(
|
$this->smarty->assign(array(
|
||||||
'available_in_your_account' => $this->available_in_your_account,
|
'available_in_your_account' => $this->available_in_your_account,
|
||||||
|
|||||||
@@ -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);
|
$this->title = self::l('Delivery').' #'.Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id).sprintf('%06d', $this->order_invoice->delivery_number);
|
||||||
|
|
||||||
// footer informations
|
// footer informations
|
||||||
$shop = new Shop((int)$this->order->id_shop);
|
$this->shop = new Shop((int)$this->order->id_shop);
|
||||||
$this->address = $shop->getAddress();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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);
|
$this->title = self::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', Context::getContext()->language->id).sprintf('%06d', $order_invoice->number);
|
||||||
|
|
||||||
// footer informations
|
// footer informations
|
||||||
$shop = new Shop((int)$this->order->id_shop);
|
$this->shop = new Shop((int)$this->order->id_shop);
|
||||||
$this->address = $shop->getAddress();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ class HTMLTemplateOrderReturnCore extends HTMLTemplate
|
|||||||
$this->title = 'Order Return '.sprintf('%06d', $this->order_return->id); // TODO
|
$this->title = 'Order Return '.sprintf('%06d', $this->order_return->id); // TODO
|
||||||
|
|
||||||
// footer informations
|
// footer informations
|
||||||
$shop = new Shop((int)$this->order->id_shop);
|
$this->shop = new Shop((int)$this->order->id_shop);
|
||||||
$this->address = $shop->getAddress();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice
|
|||||||
$this->title = self::l('Slip #').sprintf('%06d', $this->order_slip->id);
|
$this->title = self::l('Slip #').sprintf('%06d', $this->order_slip->id);
|
||||||
|
|
||||||
// footer informations
|
// footer informations
|
||||||
$shop = new Shop((int)$this->order->id_shop);
|
$this->shop = new Shop((int)$this->order->id_shop);
|
||||||
$this->address = $shop->getAddress();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user