DK-Peter Posted February 13, 2012 Share Posted February 13, 2012 Dear all Can anyone help me remove (rem out) "Reference" from header and each product on the invoice? See attached image for reference. I know this should be done in PDF.php in classes, but doing so is a little above my skills. Any help is much appreciated! Thanks, br Peter NB: Pls. ignore incorrect characters on invoice; it has been corrected. Link to comment Share on other sites More sharing options...
Rhapsody Posted February 14, 2012 Share Posted February 14, 2012 For the header: Back Office, Tools, Translations, select PDF Translations, then click on your language flag Once the page opens, search for the text and then enter spaces in the block next to it Scroll down and Update Translations. If you don't use the reference field, just make sure it is blank in every product you save. Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 14, 2012 Share Posted February 14, 2012 Hello, You can modify PDF.php, change: $header = array( array(self::l('Description'), 'L'), array(self::l('Reference'), 'L'), array(self::l('Qty'), 'C') ); to $header = array( array(self::l('Description'), 'L'), array(self::l('Qty'), 'C') ); and remove from the same function line: $this->Cell($w[1], $lineSize, ($product['product_reference'] != '' ? Tools::iconv('utf-8', self::encoding(), $product['product_reference']) : '---'), 'B'); 1 Link to comment Share on other sites More sharing options...
DK-Peter Posted February 14, 2012 Author Share Posted February 14, 2012 @ Rhapsody: Thanks for your suggested work-around, but I do use the "Reference" field (but more as a sales text) so I can't just not use it. @ CartExpert.net: Thank you very much - just the help I needed! I'll implement straight away. Thanks again both of ya! Link to comment Share on other sites More sharing options...
DK-Peter Posted February 14, 2012 Author Share Posted February 14, 2012 @ CartExpert.net: Hmm, it does remove "Reference" from the headline, but aligns Unit price, Qty and Amount to the left, so it no longer aligns with rows below. Also, it does not remove "Reference" from the individual product description(s)! Am I doing something wrong? My edited PDF.php attached for reference.... PDF.php Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 15, 2012 Share Posted February 15, 2012 Please post a PDF invoice. Link to comment Share on other sites More sharing options...
DK-Peter Posted February 15, 2012 Author Share Posted February 15, 2012 Pls. see attachement. Thanks! Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 15, 2012 Share Posted February 15, 2012 Sorry, I have looked at the wrong line. You do not need to restore the old function, as if a product is returned the reference will be shown on the invoice generated. 1. Locate function: ProdTabHeader() 2. In both cases in the first 'if' statement remove: array(self::l('Reference'), 'L'), 3. Change: $w = array(100, 15, 30, 15, 30); to $w = array(145, 15, 30); 4. Change: $w = array(120, 30, 10); to $w = array(150, 10); 5. Locate function: public function ProdTab($delivery = false) 6. Change: $w = array(100, 15, 30, 15, 30); to $w = array(145, 15, 30); 7. Change: $w = array(120, 30, 10); to $w = array(150, 10); 8. In the same function remove: $this->Cell($w[++$i], $lineSize, $product['product_reference'], 'B'); 9. In the same function remove: $this->Cell($w[++$i], $lineSize, ($product['product_reference'] ? Tools::iconv('utf-8', self::encoding(), $product['product_reference']) : '--'), 'B'); 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