// Shop name on invoice
This commit is contained in:
@@ -43,13 +43,17 @@ abstract class HTMLTemplateCore
|
|||||||
*/
|
*/
|
||||||
public function getHeader()
|
public function getHeader()
|
||||||
{
|
{
|
||||||
|
$shop_name = '';
|
||||||
|
if (Validate::isLoadedObject($this->shop))
|
||||||
|
$shop_name = $this->shop->name;
|
||||||
|
|
||||||
$this->smarty->assign(array(
|
$this->smarty->assign(array(
|
||||||
'logo_path' => $this->getLogo(),
|
'logo_path' => $this->getLogo(),
|
||||||
'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_,
|
'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_,
|
||||||
'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' => $this->shop->name
|
'shop_name' => $shop_name
|
||||||
));
|
));
|
||||||
|
|
||||||
return $this->smarty->fetch(_PS_THEME_DIR_.'/pdf/header.tpl');
|
return $this->smarty->fetch(_PS_THEME_DIR_.'/pdf/header.tpl');
|
||||||
@@ -61,14 +65,8 @@ abstract class HTMLTemplateCore
|
|||||||
*/
|
*/
|
||||||
public function getFooter()
|
public function getFooter()
|
||||||
{
|
{
|
||||||
$shop_address = '';
|
$shop_address = $this->getShopAddress();
|
||||||
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(
|
$this->smarty->assign(array(
|
||||||
'available_in_your_account' => $this->available_in_your_account,
|
'available_in_your_account' => $this->available_in_your_account,
|
||||||
'shop_address' => $shop_address,
|
'shop_address' => $shop_address,
|
||||||
@@ -80,7 +78,25 @@ abstract class HTMLTemplateCore
|
|||||||
return $this->smarty->fetch(_PS_THEME_DIR_.'/pdf/footer.tpl');
|
return $this->smarty->fetch(_PS_THEME_DIR_.'/pdf/footer.tpl');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns the shop address
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function getShopAddress()
|
||||||
|
{
|
||||||
|
$shop_address = '';
|
||||||
|
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(), ' - ', ' ');return $shop_address;
|
||||||
|
return $shop_address;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $shop_address;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* Returns the invoice logo
|
* Returns the invoice logo
|
||||||
*/
|
*/
|
||||||
protected function getLogo()
|
protected function getLogo()
|
||||||
@@ -130,6 +146,8 @@ abstract class HTMLTemplateCore
|
|||||||
abstract public function getBulkFilename();
|
abstract public function getBulkFilename();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translatation method
|
* Translatation method
|
||||||
* @param string $string
|
* @param string $string
|
||||||
|
|||||||
@@ -121,15 +121,11 @@ class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate
|
|||||||
public function getFooter()
|
public function getFooter()
|
||||||
{
|
{
|
||||||
$this->address = $this->address_warehouse;
|
$this->address = $this->address_warehouse;
|
||||||
$shop_address = '';
|
|
||||||
if (isset($this->address) && $this->address instanceof Address)
|
|
||||||
$shop_address = AddressFormat::generateAddress($this->address, array(), ' - ', ' ');
|
|
||||||
|
|
||||||
$free_text = self::l('DE: Discount excluded ');
|
$free_text = self::l('DE: Discount excluded ');
|
||||||
$free_text .= self::l(' DI: Discount included');
|
$free_text .= self::l(' DI: Discount included');
|
||||||
|
|
||||||
$this->smarty->assign(array(
|
$this->smarty->assign(array(
|
||||||
'shop_address' => $shop_address,
|
'shop_address' => $this->getShopAddress(),
|
||||||
'shop_fax' => Configuration::get('PS_SHOP_FAX'),
|
'shop_fax' => Configuration::get('PS_SHOP_FAX'),
|
||||||
'shop_phone' => Configuration::get('PS_SHOP_PHONE'),
|
'shop_phone' => Configuration::get('PS_SHOP_PHONE'),
|
||||||
'shop_details' => Configuration::get('PS_SHOP_DETAILS'),
|
'shop_details' => Configuration::get('PS_SHOP_DETAILS'),
|
||||||
|
|||||||
Reference in New Issue
Block a user