Jump to content

Display Shop Address in PDF Invoice Header


Recommended Posts

I've tried to edit my PDF.php in order to display my shop's address at the top of the invoice (not the bottom Headquarters) , obviously without success.

The strangest thing for me is that the PDF.php (PrestaShop™ 1.4.4.0) has the following:

/**
* Invoice header
*/
public function Header()
{
 global $cookie;
 $conf = Configuration::getMultiple(array('PS_SHOP_NAME', 'PS_SHOP_ADDR1', 'PS_SHOP_CODE', 'PS_SHOP_CITY', 'PS_SHOP_COUNTRY', 'PS_SHOP_STATE'));
 $conf['PS_SHOP_NAME'] = isset($conf['PS_SHOP_NAME']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_NAME']) : 'Your company';
 $conf['PS_SHOP_ADDR1'] = isset($conf['PS_SHOP_ADDR1']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_ADDR1']) : 'Your company';
 $conf['PS_SHOP_CODE'] = isset($conf['PS_SHOP_CODE']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_CODE']) : 'Postcode';
 $conf['PS_SHOP_CITY'] = isset($conf['PS_SHOP_CITY']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_CITY']) : 'City';
 $conf['PS_SHOP_COUNTRY'] = isset($conf['PS_SHOP_COUNTRY']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_COUNTRY']) : 'Country';
 $conf['PS_SHOP_STATE'] = isset($conf['PS_SHOP_STATE']) ? Tools::iconv('utf-8', self::encoding(), $conf['PS_SHOP_STATE']) : '';
 if (file_exists(_PS_IMG_DIR_.'/logo_invoice.jpg'))
  $this->Image(_PS_IMG_DIR_.'/logo_invoice.jpg', 10, 8, 0, 15);
 elseif (file_exists(_PS_IMG_DIR_.'/logo.jpg'))
  $this->Image(_PS_IMG_DIR_.'/logo.jpg', 10, 8, 0, 15);
 $this->SetFont(self::fontname(), 'B', 15);
 $this->Cell(115);

 

but from all this only the logo is visible!

 

Could someone please help me to solve this.

Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...