firegento / firegento-pdf

Generates nicer and configurable PDF for invoices, creditmemos and shippings in Magento
100 stars 62 forks source link

How to hide and change certain values #330

Closed yasharkkk closed 8 years ago

yasharkkk commented 8 years ago

Hey there

first of all sorry if this question was already answered but unfortunately I could not find anything...

The first problem I have is that I would like to change certain Values which are shown in the PDF. I was able to change most of them but there's one left which I can not change... "Versand & Bearbeitung" I would like to change this one into "Versand" I was able to change it in Magento frontend but in the invoice PDF it's still placed as "Versand & Bearbeitung".

And then I would like to place the shipping costs as a single position at the end of the table where the products are listet. Unfortunately I couldn not find the right way to do that. I know I should create a custom layout for that but I could not figure out your How to in regards to that...

Thanks and Greetings Yashar

Schrank commented 8 years ago

Hi @yasharkkk please open as many issues as you have problems.

"Versand & Bearbeitung" I would like to change this one into "Versand" I was able to change it in Magento frontend but in the invoice PDF it's still placed as "Versand & Bearbeitung".

"Versand & Bearbeitung" should be in the german local pack, it is not part of our package. To change that, you might need to prefix the translation with the proper extension, like "Mage_Tax::Shipping" or "Mage_Sales::Shipping". Shipping is a placeholder here, please check the locale pack which is the proper english term which is translated.

The translation needs to go into you translate.csv either in your theme or the admin theme. I think it was the frontend, because the pdfs are generated by emulating the store and theme.

And then I would like to place the shipping costs as a single position at the end of the table where the products are listet. Unfortunately I couldn not find the right way to do that. I know I should create a custom layout for that but I could not figure out your How to in regards to that...

How to create your own engine is described in the FAQ

And then you need to change

src/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php:76

which is calling

\FireGento_Pdf_Model_Engine_Abstract::_drawItem

you can either merge an item which tries to be a product, so you can just (mis)use the renderer(s) or you just add a few lines after the foreach ($invoice->getAllItems() as $item)

Schrank commented 8 years ago

If you need more help don't hesitate to write @sprankhub or me an email, we are both for hire ;-)