boylibre Posted November 30, 2010 Share Posted November 30, 2010 I want to put the delivery address at the bottom of delivery slip, right below footer, so that the operator can tear it off and stick it in the box. However I can't put the command under Function Footer inside pdf.php since it doesn't have parameter for $id_order. Can anyone advise me what to do?TIA,boylibre Link to comment Share on other sites More sharing options...
boylibre Posted November 30, 2010 Author Share Posted November 30, 2010 Managed to find a solution after so many trials & errors. Anyone interested can use it at your own risk - so backup before making any changes.Here are some code I added under footer function inside pdf.php //These are the variables to be declared before they can be used $delivery_address = new Address(intval(self::$order->id_address_delivery)); $deliveryState = $delivery_address->id_state ? new State($delivery_address->id_state) : false; //These are examples how to use them $this->SetFont(self::fontname(), '', 12); $this->Cell(190, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->lastname.' (ORDER#: '.sprintf('d', self::$order->id).')'."\n"), 'T', 1, 'L'); $this->Cell($width, 5, Tools::iconv('utf-8', self::encoding(), $delivery_address->address1), 0, 'L'); Cheers Link to comment Share on other sites More sharing options...
Nils Posted February 14, 2011 Share Posted February 14, 2011 Managed to find a solution after so many trials & errors. Anyone interested can use it at your own risk - so backup before making any changes.This is kind of a dirty hack, but it does the job for me, thanks!BTW, you forgot to mention which pdf.php you should edit ... it's the one in /classes/ :-) Link to comment Share on other sites More sharing options...
Recommended Posts