Shamrock Posted September 14, 2009 Share Posted September 14, 2009 again thanx for a great cms love it!!!how can i add a new line in invoice pdf....see picture Link to comment Share on other sites More sharing options...
fe1lho Posted September 14, 2009 Share Posted September 14, 2009 You have to edit the template to do this ...HTH Link to comment Share on other sites More sharing options...
Shamrock Posted September 14, 2009 Author Share Posted September 14, 2009 which template????? Link to comment Share on other sites More sharing options...
radders Posted September 14, 2009 Share Posted September 14, 2009 I don't think you'll find much pdf stuff in the template. afaik it is all coded up in classes/PDF.php but you'll have to do the editing yourself.Good luck! Link to comment Share on other sites More sharing options...
Shamrock Posted September 14, 2009 Author Share Posted September 14, 2009 any idea how ore where in pdf.php i should edit :roll: Link to comment Share on other sites More sharing options...
radders Posted September 14, 2009 Share Posted September 14, 2009 I'm sure you'll work it out if you study the code. If all your problems as as urgent as they seem then you might need to advertise for a developer to set things up for you. Link to comment Share on other sites More sharing options...
Shamrock Posted September 15, 2009 Author Share Posted September 15, 2009 whats wrong /* Display address information */ $invoice_address = new Address(intval($order->id_address_invoice)); $invoiceState = $invoice_address->id_state ? new State($invoice_address->id_state) : false; $delivery_address = new Address(intval($order->id_address_delivery)); $deliveryState = $delivery_address->id_state ? new State($delivery_address->id_state) : false; $shop_country = Configuration::get('PS_SHOP_COUNTRY'); $width = 100; $pdf->SetX(5); $pdf->SetY(25); $pdf->SetFont(self::fontname(), '', 12); $pdf->Cell($width, 10, self::l('Delivery'), 0, 'L'); $pdf->Cell($width, 10, self::l('Invoicing'), 0, 'L'); $pdf->Ln(5); $pdf->SetFont(self::fontname(), 'B', 9); if (!empty($delivery_address->company) OR !empty($invoice_address->company)) { $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->company), 0, 'L'); $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->company), 0, 'L'); $pdf->Ln(5); } $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->lastname), 0, 'L'); $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $invoice_address->lastname), 0, 'L'); $pdf->Ln(5); $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address1), 0, 'L'); $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address1), 0, 'L'); $pdf->Ln(5); if (!empty($invoice_address->address2) OR !empty($delivery_address->address2)) { $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address2), 0, 'L'); $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address2), 0, 'L'); $pdf->Ln(5); } $pdf->Cell($width, 10, $delivery_address->postcode.' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->city), 0, 'L'); $pdf->Cell($width, 10, $invoice_address->postcode.' '.Tools::iconv('utf-8', self::encoding(), $invoice_address->city), 0, 'L'); $pdf->Ln(5); $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->country.($deliveryState ? ' - '.$deliveryState->name : '')), 0, 'L'); $pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->country.($invoiceState ? ' - '.$invoiceState->name : '')), 0, 'L'); $pdf->Cell(0, 10, self::l('PS_SHOP_NAME').Configuration::get('PS_SHOP_ADDR1', 'PS_SHOP_CODE', 'PS_SHOP_CITY', 'PS_SHOP_COUNTRY', 'PS_SHOP_DETAILS', 'PS_SHOP_PHONE', 'PS_SHOP_STATE'), 1, 2, 'L', 1); $pdf->Ln(5); $pdf->Cell($width, 10, $delivery_address->phone, 0, 'L'); if (!empty($delivery_address->phone_mobile)) { $pdf->Ln(5); $pdf->Cell($width, 10, $delivery_address->phone_mobile, 0, 'L'); } Link to comment Share on other sites More sharing options...
fs_xyz Posted September 15, 2009 Share Posted September 15, 2009 Did you try to add a text before the word "INVOICE #xxx", which reside inside a table ?Well, open file pdf.php located inside classes directory.Since it is a wall of text, search these words "display order information".After you found it... below that display order information is where the program will draw the table.Below it, you'll find : ( I'm referring these lines from the original pdf.php .... )$pdf->Ln(12);$pdf->SetFillColor(240, 240, 240);Since you want to add text before the table which has INVOICE writing in it.... separate those two lines, so it will become this :$pdf->Ln(12);* this will the the area which you'll use to insert whatever text you want*$pdf->SetFillColor(240, 240, 240);For example, you want to write : "abc"The lines will be :$pdf->Ln(12);$pdf->Cell(0, 0, self::l('abc'), '');$pdf->Ln(6); <-- you will need this to make space between what you want to write with the table below it, otherwise the result will be unpleasant.Readjust the number as you see fit. ( replace 6 with whatever you want, it represent space height )$pdf->SetFillColor(240, 240, 240);Hope it help.Please note, I'm using 1.2.2. Link to comment Share on other sites More sharing options...
Shamrock Posted September 15, 2009 Author Share Posted September 15, 2009 thanx man :-) Link to comment Share on other sites More sharing options...
Recommended Posts