How to customize template settings

If you want to change the pdf document content generated by the plugin, go to “Template” tab of settings dashboard.

Template settings

This tab is divided into sections.

Company information

Company information settings are the first part:

Template - company info

Here you can enter Company name, logo, additional details and choose whether to show them or not by selecting the related checkboxes.

You can also print customer’s details related to the invoice or the packing slip using the placeholders provided (read here for more details).

Invoice and pro-forma – template settings

In the second section, you can control other settings that should appear in the invoice and in the pro-forma invoice.

Here you can enter different notes and footer for the invoice and the pro-forma invoice and check those sections and columns that have to be visible.

To show the total amount of the invoice, discount included, you can enable the option “Show order subtotal inclusive of order discount”.
Whereas the amount of the discount can be shown by enabling “Show the order discount in the invoice summary amounts”.

Order total

The same applies to information related to products inserted in the order and shown in the table of the document. In “Visible columns” field you can choose to show or remove the following information for each product:

  • image
  • SKU
  • description
  • product variation
  • quantity
  • regular price
  • on-sale price
  • tax

Visible columns

Credit note – template settings

In the following section, you can set up the credit note template settings, including notes, footer, a dedicated text about the refund, the products that have been refunded and enable dynamic visible sections and columns, as shown below:

credit-note template settings

Packing slip – template settings

Here you can edit notes, footer, and visible sections and columns, included weight and dimensions, as shown below:

Packing-slip-template-settings

Colours

Finally, in the last section, you can set up the colours of all your documents: header and font, data section and total section.

Document-colours-2

This is an example:

sample-invoice-colours

How to insert new user details in documents

Right inside documents, you can insert any of the information related to user.
Use the postmeta metakeys as placeholders within double curly brackets, for example {{_shipping_first_name}} to show the order shipping first name.

Customer details

Following the complete list of placeholders that you can use:

  • {{_customer_user}}
  • {{_order_key}}
  • {{_order_currency}}
  • {{_billing_first_name}}
  • {{_billing_last_name}}
  • {{_billing_company}}
  • {{_billing_address_1}}
  • {{_billing_address_2}}
  • {{_billing_city}}
  • {{_billing_state}}
  • {{_billing_postcode}}
  • {{_billing_country}}
  • {{_billing_email}}
  • {{_billing_phone}}
  • {{_shipping_first_name}}
  • {{_shipping_last_name}}
  • {{_shipping_company}}
  • {{_shipping_address_1}}
  • {{_shipping_address_2}}
  • {{_shipping_city}}
  • {{_shipping_state}}
  • {{_shipping_postcode}}
  • {{_shipping_country}}
  • {{_completed_date}}
  • {{_paid_date}}
  • {{_edit_lock}}
  • {{_edit_last}}
  • {{_cart_discount}}
  • {{_cart_discount_tax}}
  • {{_order_shipping}}
  • {{_order_shipping_tax}}
  • {{_order_tax}}
  • {{_order_total}}
  • {{_payment_method}}
  • {{_payment_method_title}}
  • {{_transaction_id}}
  • {{_customer_ip_address}}
  • {{_customer_user_agent}}
  • {{_created_via}}
  • {{_order_version}}
  • {{_prices_include_tax}}
  • {{_date_completed}}
  • {{_date_paid}}
  • {{_payment_tokens}}
  • {{_billing_address_index}}
  • {{_shipping_address_index}}
  • {{_recorded_sales}}
  • {{_recorded_coupon_usage_count}}{{_customer_user}}
  • {{_order_key}}
  • {{_order_currency}}
  • {{_billing_first_name}}
  • {{_billing_last_name}}
  • {{_billing_company}}
  • {{_billing_address_1}}
  • {{_billing_address_2}}
  • {{_billing_city}}
  • {{_billing_state}}
  • {{_billing_postcode}}
  • {{_billing_country}}
  • {{_billing_email}}
  • {{_billing_phone}}
  • {{_shipping_first_name}}
  • {{_shipping_last_name}}
  • {{_shipping_company}}
  • {{_shipping_address_1}}
  • {{_shipping_address_2}}
  • {{_shipping_city}}
  • {{_shipping_state}}
  • {{_shipping_postcode}}
  • {{_shipping_country}}
  • {{_completed_date}}
  • {{_paid_date}}
  • {{_edit_lock}}
  • {{_edit_last}}
  • {{_cart_discount}}
  • {{_cart_discount_tax}}
  • {{_order_shipping}}
  • {{_order_shipping_tax}}
  • {{_order_tax}}
  • {{_order_total}}
  • {{_payment_method}}
  • {{_payment_method_title}}
  • {{_transaction_id}}
  • {{_customer_ip_address}}
  • {{_customer_user_agent}}
  • {{_created_via}}
  • {{_order_version}}
  • {{_prices_include_tax}}
  • {{_date_completed}}
  • {{_date_paid}}
  • {{_payment_tokens}}
  • {{_billing_address_index}}
  • {{_shipping_address_index}}
  • {{_recorded_sales}}
  • {{_recorded_coupon_usage_count}}

How to overwrite documents templates

All the templates used by the plugin are available in the templates path templates -> yith-pdf-invoice.

To overwrite each document template is essential to repeat the specific files in your theme “woocommerce” folder (in case it is not included, you must create it).

Copy and paste files in your theme “woocommerce” folder, by including them in the “yith-pdf-invoice”¬†folder.

Copy files

Please note. Plugin updates will be ignored in your site for the files you have overwritten.

If you made changes and you need to check them, enable “Preview mode” option.

Preview mode

When option is active, you can generate your invoices and check the final result of your changes without any increase of invoice counter.
If provided, the automatic generation system of invoices will be disabled and any generated invoice will be hidden to user.