7. FAQ

Remove print button on order + shipment + invoice admin page ?

Edit file app/code/community/MDN/GlobalPDF/etc/config.xml

Note

Make a backup the file before to edit it.

Remove code:

<rewrite>
        <MDN_GlobalPDF_Sales_Order_Print>
                <from><![CDATA[#^/sales/order/print/#]]>
                </from>
                <to>/GlobalPDF/Order/Print/</to>
        </MDN_GlobalPDF_Sales_Order_Print>
        <MDN_GlobalPDF_Sales_Order_Print_Invoice>
                <from><![CDATA[#^/sales/order/printInvoice/#]]>
                </from>
                <to>/GlobalPDF/Invoice/Print/</to>
        </MDN_GlobalPDF_Sales_Order_Print_Invoice>
</rewrite>

<sales>
        <rewrite>
                <order_pdf_invoice>MDN_GlobalPDF_Model_Pdf_Order_Invoice</order_pdf_invoice>
                <order_pdf_shipment>MDN_GlobalPDF_Model_Pdf_Order_Shipment</order_pdf_shipment>
                <order_pdf_creditmemo>MDN_GlobalPDF_Model_Pdf_Order_Creditmemo</order_pdf_creditmemo>
        </rewrite>
</sales>

Save the file and refresh your magento caches.

How to display product qty on frontend PDF product ?

Edit file app/code/community/MDN/GlobalPDF/Model/Pdf/Product.php

After line

$data = $product->getData();

Add this code

$data['qty'] = $product->getStockItem()->getQty();

In the template XML file add the tag to grab the {qty} parameter.

How to remove the Frontend “Print” button ?

Edit app/design/frontend/[package]/[theme]/template/GlobalPDF/Product.phtml

Rename the file Product.phtml into Product.phtml.old

Refresh magento caches

Change the total incl tax into excl tax in the invoice PDF ?

Edit file app/code/community/MDN/GlobalPDF/Model/Pdf/Order/Invoice.php

Change line 95

$itemData['row_total'] = $itemData['row_total'] + $itemData['tax_amount'];

With

$itemData['row_total'] = $itemData['row_total'] ; //+ $itemData['tax_amount'];

Fatal error: Call to a member function getResource() on a non-object

Did you use the parameter “use magento font” ? If yes, set it to “no” and save.

Maybe the font Helvetica or other fonts is not present on your computer.

Fatal error: Call to a member function getElementsByTagName() on a non-object

This error is due to the “Debug mode” option, try to disable it, it should solve your issue.

It’s a problem with Magento compability.

Available date parameters

Check the Parameters section of the PHP “date” documentation on http://php.net/manual/en/function.date.php