• Resolved kristinubute

    (@kristinubute)


    HI

    Any help would be greatly appreciated.
    Urgent

    I need to Edit the Template Invoice which I have found under the plugin directory, under templates/simple/invoice.php

    But within that, I need to AMEND the wording which says
    (includes $0.00 Tax)

    I just want to put:
    inc $0.00 GST

    But the coding in the invoice.php is:

    <?php foreach( $this->get_woocommerce_totals() as $key => $total ) : ?>
    <tr class=”<?php echo $key; ?>”>
    <td class=”no-borders”></td>
    <th class=”description”><?php echo $total[‘label’]; ?></th>
    <td class=”price”><span class=”totals-price”><?php echo $total[‘value’]; ?></span></td>
    </tr>
    <?php endforeach; ?>

    I can’t see where I can actually EDIT the (including $0.00 Tax) anywhere here. Is there somewhere else I can change it as it goes onto 2 lines which I only want it on one line ….

    Thanks
    Kristin

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! That string is generated by WooCommerce itself, not the PDF invoice plugin. You can apply a small ‘hack’ that will replace all occurrences of ‘Tax’ in the totals with GST:

    
    <td class="price"><span class="totals-price"><?php echo str_ireplace("Tax","GST",$total[‘value’]); ?></span></td>
    

    When editing the template, don’t forget to copy them to your child theme to prevent plugin updates from overwriting your edits: Creating a custom PDF template

    If you want to do more advanced editing (like separating the taxes onto separate lines and display prices including/excluding tax, before/after discount etc.), I highly recommend the Premium Templates extension. This lets you do a lot of things without touching a single line of code.

    Hope that helps!
    Ewout

    Thread Starter kristinubute

    (@kristinubute)

    Thanks for replying.

    So there is no-where I can actually change parts of the invoice unless i purchase the Premium Templates extension ?

    So isn’t the invoice linked to Woocommerce PDF plugin ? So I can’t edit the main template in behind the scenes somewhere ?

    Thanks

    Kristin

    Plugin Contributor kluver

    (@kluver)

    Hi @kristinubute,

    You can certainly edit parts of the invoice. You will have to create a custom template in your child-theme to make sure your changes won’t be overwritten when you update our plugin or your theme.

    After creating the custom template you can customize whatever you like but doing this in the right way will require code skills and a good understanding of how WooCommerce works.

    An easier way to customize your documents and add order data is to purchase our Premium Templates extension. You will get access to the Customizer that lets you make changes without a line of code. ??

    I hope this answers your question,
    With kind regards,

    Michael

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Editing the Template Invoice’ is closed to new replies.