Add custom text to quotes and invoices

This topic contains 13 replies, has 3 voices, and was last updated by  Patrik 6 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #2009

    Sascha
    Free User
    Post count: 10

    Hello,

    I’d like to add custom text-fields to my quotes and invoices, one above the items list, like

    “Hello, please find your quote below.” > above items and
    “Thank you for your interest in our service” > below items

    How can I achieve this?

    Thank you and kind regards,
    Sascha

    #2012

    Guust
    Moderator
    Post count: 29970

    Go to your WP pages and add the content above and below the shortcode in your Invoice History page and your Quote History page.
    Thanks

    #2013

    Sascha
    Free User
    Post count: 10

    Oh, I didn’t know that WPinvoicing has added new pages! Can I use a pagebuilder or Yellow Pencil to customize them further? Would be very nice 🙂

    Cheer,s
    Sascha

    #2014

    Guust
    Moderator
    Post count: 29970

    You should be able to, just give it a go. Make sure to keep the shortcode.

    #2016

    Sascha
    Free User
    Post count: 10

    It’s not working …

    I have opened Pages, then the page “Quote History” and replaced the text with the following one:

    “Dummy Start Text

    [wpinv_quote_history]

    Dummy End Text”

    I have then resend the quote to the client, clicked on the quote-link, but the custom text was not shown (caches deleted), but the quote did not contain the custom text, check this screenshot: https://www.evernote.com/l/AAO7R4WPBH5Hn5XHqzhvczwjBa3YWB3h2pI

    Anyway I’d rather add a custom text to each quote instead of using the default text that I would provide by using the page. Isn’t that possible? Something like

    “Dear Tom, please find the following items quoted for you” for one quote and for another
    “Hi Maggie, thank you for hiring us! Before proceeding pls confirm this quote by clicking “Accept” above this quote”

    Same goes for invoices …

    By the way: Your support reaction time is beyond awesome, thank you very much! 🙂

    Sascha

    #2019

    Guust
    Moderator
    Post count: 29970

    Ah, I see.
    Because you said “above the items” and “below the items” I misunderstood, you meant above the list of invoices.

    To add other comments to all invoices, is to add text at Invoices > Settings > General tab > Label texts.
    That applies for both invoices and quotes.

    #2020

    Sascha
    Free User
    Post count: 10

    Ah, I see …

    So I have filled “Invoice Notice Label” with a custom label “Vorwort” and saved.

    Then opened a quote, but didn’t find the field “Vorwort” to fill in my custom “Welcome” text …

    I have also tried with a new quote, same here …

    #2021

    Guust
    Moderator
    Post count: 29970

    You can only add custom text to the label, so Vorwort should show on your invoices and quotes now. Clear all caches.

    #2024

    Sascha
    Free User
    Post count: 10

    Well …

    Is there any chance, to setup something like this > https://www.evernote.com/l/AAPIRbmbSn5LWqzkxVttC4Cj_AFOujG9BQI
    on quotes and invoices?

    Thank you,
    Sascha

    #2025

    Guust
    Moderator
    Post count: 29970

    To add the bottom bit, change Vorwort to the text you want.
    I’ll ask one of the developers if there is a possibility to add something above the table.

    #2026

    Sascha
    Free User
    Post count: 10

    Well, than it’s not related to the specific quote, no custom text that I could apply …

    Thank you for asking developer. If there’s a chance to hook up my own fields pls let me know …

    #2027

    Patrik
    Moderator
    Post count: 1971

    Hi Sascha,

    Please try following code and let me know if it works for you or not:

    
    
    add_action('wpinv_invoice_print_before_line_items','wpinv_invoice_print_before_line_items_cb');
    function wpinv_invoice_print_before_line_items_cb($invoice){
        echo 'Hello '.$invoice->get_first_name().', please find below great items.';
    }
    
    add_action('wpinv_invoice_print_after_line_items','wpinv_invoice_print_after_line_items_cb');
    function wpinv_invoice_print_after_line_items_cb(){
        echo 'Thank you for your interest in our service.';
    }

    Regards,
    Patrik

    #2028

    Sascha
    Free User
    Post count: 10

    Hi Patrick,

    this is working great!

    Would it be possible to include even more data into those fields, such as custom fields that could setup via “Pods” plugin?

    Using pods I would try to setup a custom-post-type and setup a relation between this new post-type and wpinvoice quotes and invoices. This could help me to create custom messages for each quote and invoice 🙂

    Oh, and how can I add some space or padding between the intro-text and the items-table?
    Check https://www.evernote.com/l/AAOCCyLiJehFtoeI0RbiJKI5GvyfxcoMAos

    Thank you and kind regards,
    Sascha

    #2029

    Patrik
    Moderator
    Post count: 1971

    Hi Sascha,

    Yes, you can do custom things with pods in this code and to add space just add <br> after the text in above code. We don’t support customization in this forum so you may hire a developer for that.

    Regards,
    Patrik

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket