Customizing the VAT PDF invoices template

Home Support Forums VAT for EDD Customizing an installation Customizing the VAT PDF invoices template

This topic contains 4 replies, has 2 voices, and was last updated by  Bill 6 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3194

    Stefaan Oyen
    Spectator
    Post count: 3

    Hi there,

    I have 3 questions concerning your plugin. It adds a VAT invoice template for the EDD PDF invoices plugin, which displays the VAT number of the shop owner and the customer.

    – I need the address, postal code, city and country to be displayed not only for the shop owner, but also for the client (see attached invoice). How do I do this in an update-safe way?
    – I translated most of the labels by editing the ‘vat-template.php’ file (see attached invoice). Is there a better way that’s update-safe? I tried through a .po and .mo language file, but it didn’t seem to work.
    – On the left, it still states ‘BTW ID’ and on the right ‘BTW number’, both should be ‘BTW-nummer’ (‘VAT number’ in dutch). How do I get this done in a way that’s update-safe?

    I attached my ‘vat-template.php’ file in the case you want to customize it.

    Thank you for your help and for a great plugin!

    Kind regards,
    Stefaan Oyen

    Attachments:
    You must be logged in to view attached files.
    #3197

    Bill
    Keymaster
    Post count: 459

    Hi Stefaan

    The VAT template file is a template file and follows the EDD templating rules. In case you have not modified EDD templates before, you need to create a folder under your theme folder (under your theme’s child folder if you have used one) and call the new folder ‘edd_templates’. You can then copy any of the files from the EDD ‘templates’ folder or from the VAT plugin ‘templates’ folder in this folder. EDD and the VAT plugin will use template files in the ‘edd_templates’ folder in preference to the original folder. In this way you are able to make update safe changes to the template files.

    Most of the text in the VAT template references the PDF Invoices plugin domain. So it will be the .po/.mo files of the PDF Invoices plugin you will need to change.

    This is a good time to ask you to read this post: ‘Grab a copy of the extras’. This reviews the ‘extras’ plugin which includes an example of adding the buyer’s address to an invoice.

    You will see on line 251 of the template that word ‘tax’ is replaced with the word from the translation file. So if you enter ‘Tax number’ you will see ‘BTW number’. If you need this default behaviour to be different, this is the line to change.

    Regards

    Bill

    #3213

    Stefaan Oyen
    Spectator
    Post count: 3

    Hi Bill,

    Thank you for your feedback! Using the extras plugin, I got the address to show up. However, the country shows as ‘BE’ instead of ‘Belgium’. How do I change this?

    Also, on the left, it still states ‘BTW ID’ and on the right ‘BTW number’. If I change something in the template file on line 251, the VAT number simply disappears. I don’t find anything either in the PDF invoices language files. What do I have to change here?

    Thanks for your excellent support!
    Stefaan

    #3220

    Stefaan Oyen
    Spectator
    Post count: 3

    Hi there Bill,

    Would you be so kind to respond to this? It’s the last issue holding us back from getting the site live : )

    Thanks,
    Stefaan

    #3274

    Bill
    Keymaster
    Post count: 459

    Hi Stefaan

    For some reason we’ve stopped receiving emails after posts in these forums so I missed your questions. Until we learn why this is happening, it may be better send an email to infowproute.com.

    The country code ‘BE’ appears because this is what is recorded in the EDD payment record. If you want to change it you will need to perform a look up. I think EDD provides a standard code -> country lookup function.

    Regards

    Bill

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Supportive

We're here to help you every step of the way. Contact Us by sending a private message or ask a question in the support forums.

Innovative

We're always looking for ways to improve what we offer and so help you do business. Need something, not exactly what you are looking for … let us know, we might be able to help.

Reliable

Used by a growing number of websites throughout the world - we help smooth your WordPress site use.

Translate »
Copyright Lyquidity Solutions © 2023 · All Rights Reserved · EDD & WooCommerce plugins · WordPress plug-ins store