-drj- Posted June 11, 2012 Share Posted June 11, 2012 I'm trying to customize the invoice-/orderslip header address in Prestashop 1.4.7.3 I did my homework: Searching the forums, searching with google, reading the developer documentation and the fpdf homepage. I've tried editing classes/PDF.php with little to no effect. My problem is, i can't find out where the address format is stored. For example i need to put the company name above the name, add the phone number at the end of both addresses and switch the position of invoice and delivery address. I'm not asking for a complete guide, but i would certainly be grateful for some pointers. Thank you! Link to comment Share on other sites More sharing options...
traifaud Posted June 12, 2012 Share Posted June 12, 2012 Hi, Actually, I have a similar question. I would like to change the font size of the footer of the invoice. Where can I set that please? Thanks! BR Thierry Link to comment Share on other sites More sharing options...
tuk66 Posted June 14, 2012 Share Posted June 14, 2012 -drj- Change address format at Back Office > Shipping > Countries for each country. traifaud Change number in all $this->SetFont commands in Footer() function in classes/PDF.php file. 1 Link to comment Share on other sites More sharing options...
-drj- Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) @tuk66 Thank you, i feel a bit stupid for overlooking the address format options in the backend... Anyway, all i could change there was the order, at least now i have the firm on top. I found a solution for switching the position of Invoice and Delivery though: File: classes/PDF.php 1.) Line: ~576 Action: switch the following lines of code $pdf->Cell($width, 10, self::l('Invoicing'), 0, 'L'); $pdf->Cell($width, 10, self::l('Delivery'), 0, 'L'); 2.) Line: ~582 Action: switch the following lines of code 'invoice' => array(), 'delivery' => array(), Hope this helps anyone! Edited June 14, 2012 by -drj- (see edit history) Link to comment Share on other sites More sharing options...
Vank Posted October 24, 2012 Share Posted October 24, 2012 Hi everybody, I've been trying to make some other changes as well and have no idea how to. I need to place my company address on top of everything. Same format as it appears in the footer, but in the header. I guess, if I'm not wrong, I see in the class/pdf.php this code: /** * 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')) but I'm not sure if this code should display my shop address or not? in case it should, it is not doing it. My pdf files only show the logo and then the address of the customer (Delivery / Invoicing). I need, more or less, to make these changes to have my pdf files (most important the invoice) according to the German laws: My shop address (small font, as it is now in the footer, or in a block aligned to the right side of the header including website address and email) My shop Logo Invoice/Order number Customer Name Customer address Customer email Date Product details table Total shipping Total discounts Total Footer Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now