0

I am searching for a way to add a note at the bottom (tax regarding) for specific invoices for orders outside the EU. We are from germany, and by law we have to add some notes on all invoices for outside EU countries. I have searched the backend, but can not find a solution for this.

Maybe I have to hardcode some conditional coding inside the PDF generator? Or does someone knows a better/cleaner way or maybe some extension doing this?

  • Consider using Firegento_Pdf. You could solve your problem with the events from this extension. See the FAQs to learn more. – Simon Nov 10 '14 at 13:18
  • Yes, i am using Firegento_Pdf - thanks for pointing me into the right direction. – fourgood Nov 11 '14 at 14:35
  • Cool. I added an answer explaining it in a bit more detail below. If you like the extension, consider leaving a review on Magento Connect :) – Simon Nov 11 '14 at 15:36
1

Since you are using Firegento_PDF, the solution is quite straightforward. Implement an extension and add this to the config.xml:

<global>
    <events>
        <firegento_pdf_invoice_insert_note>
            <observers>
                <namespace_module>
                    <class>namespace_module/observer</class>
                    <method>addMyCountryNote</method>
                </namespace_module>
            </observers>
        </firegento_pdf_invoice_insert_note>
    <events>
<global>

Then create your Module/Observer.php and implement the logic:

<?php
class Namespace_Module_Observer
{

    /**
     * Add my country note
     *
     * @param  Varien_Event_Observer $observer observer object
     *
     * @return $this
     */
    public function addMyCountryNote(Varien_Event_Observer $observer)
    {
        $order = $observer->getOrder();
        if ($order->getShippingAddres()->getCountryId() != 'DE') {
            $result = $observer->getResult();
            $notes = $result->getNotes();
            $notes[] = 'My country note';
            $result->setNotes($notes);
        }
        return $this;
    }

}
0

Custom PDF Invoice Layout

enter image description here

Add a tax regarding note in extension footer text and when display this footer text there have make condition for user country or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.