Below is a list of all template tags that can be used when you are creating your own templates. Most of the names of the template tags are an indication of what they will return, so we won’t go into great detail explaining every single tag.
All template tags will simply return a value, they will not echo or print any values unless otherwise noted.
Most template tags will accept the id as a parameter, but this is usually not required as the id is automatically picked up.
Here is an example of how to use template tags:
echo sliced_get_business_logo(); // will output the logo that was added in the Business settings section echo sliced_get_business_address(); // will output the address that was added in the Business settings section echo sliced_get_invoice_label // will output the label of the invoices as set in the Translate settings section echo sliced_get_invoice_number( ) // will output the invoice number of invoice that is being viewed echo sliced_get_invoice_number( 22 ) // will output the invoice number of the invoice with id 22
The template tags in this section will return information related to your business such as business name, logo and address.
sliced_get_business_logo()
sliced_get_business_name()
sliced_get_business_address()
sliced_get_business_extra_info()
sliced_get_business_website()
sliced_get_tax() // the tax amount as numeric value (as input in the Business settings)
sliced_get_tax_name() // the tax name (as input in the Business settings)
sliced_get_business_bank()
sliced_get_business_generic_payment()
sliced_get_business_footer() // the footer text (as input in the Business settings)
The template tags in this section will return information related to the client that is chosen for the invoice/quote such as business name, logo and address.
The $id parameter that the tags below accept are the $id of the quote or invoice that you wish to retrieve the client details for. The $id is not the client id.
sliced_get_client_id()
sliced_get_client_first_name( $id )
sliced_get_client_last_name( $id )
sliced_get_client_business( $id )
sliced_get_client_address( $id )
sliced_get_client_extra_info( $id )
sliced_get_client_email( $id )
sliced_get_client_website( $id )
The template tags in this section are general helper functions and return a mixture of things.
The $id parameter that the tags below accept are the $id of the quote or invoice that you wish to retrieve the details for.
Invoice and quote tags – These will return the values of the quote or invoice
sliced_get_the_id() // returns the id of the quote or invoice
sliced_get_the_link( $id ) // returns a link to the quote or invoice
sliced_get_label( $id ) // returns the label of the quote or invoice
sliced_get_label_plural( $id ) // returns the plural label of the quote or invoice
sliced_get_number( $id ) // returns the number of the quote or invoice
sliced_get_prefix( $id ) // returns the prefix of the quote or invoice
sliced_get_created( $id ) // returns the created date of the quote or invoice
sliced_get_total( $id ) // returns the total of the quote or invoice
sliced_get_sub_total( $id ) // returns the sub total of the quote or invoice
sliced_get_the_type( $id ) // returns the type. Value will be either quote or invoice
sliced_get_filename( $id ) // returns the filename. Value will be something like 'invoice-inv-1234' in the format of type-prefix-number
sliced_get_currency_symbol( $id ) // returns the currency symbol of the quote or invoice
sliced_get_terms_conditions( $id ) // returns the terms and conditions of the quote or invoice
sliced_get_status( $id ) // returns the status of the quote or invoice
sliced_get_accepted_payment_methods( $id ) // return all payment methods that have been set up in the Payments settings
sliced_print_message( $message, $type, $die ) // prints a message. // $message = the message to be displayed // $type = 'success', 'alert', 'error' - this will decide the color of the message (green, orange or red). Success is the default // $die = true or false - setting to true will stop any further output. False is the default
The template tags in this section are quote specific and will return values related to the current quote.
The $id parameter that the tags below accept are the $id of the quote that you wish to retrieve the details for. You don’t need to include this though as the default id is the current quote you are viewing.
sliced_get_quote_label() // returns the label of the quote
sliced_get_quote_label_plural() // returns the plural label of the quote or invoice
sliced_get_quote_id()
sliced_get_quote_footer()
sliced_get_quote_number( $id )
sliced_get_quote_prefix( $id )
sliced_get_quote_created( $id )
sliced_get_quote_valid( $id )
sliced_get_quote_status( $id )
sliced_get_quote_description( $id )
sliced_get_quote_terms( $id )
sliced_get_quote_line_items( $id ) // returns an array of the line items
sliced_get_quote_total( $id ) // returns the formatted total including currency symbol
sliced_get_quote_sub_total( $id ) // returns the formatted sub total including currency symbol
sliced_get_quote_tax( $id ) // returns the formatted tax amount including currency symbol
sliced_get_quote_total_raw( $id ) // returns the raw numeric total
sliced_get_quote_sub_total_raw( $id ) // returns the raw numeric sub total
sliced_get_quote_tax_raw( $id ) // returns the raw numeric tax amount
sliced_get_next_quote_number( $id ) // returns the next quote number (if using auto increment)
sliced_get_quote_template() // returns the template name that is set for the quotes
sliced_get_quote_css() // returns the css that is set for the quotes
The template tags in this section are invoice specific and will return values related to the current invoice.
The $id parameter that the tags below accept are the $id of the invoice that you wish to retrieve the details for. You don’t need to include this though as the default id is the current quote you are viewing.
sliced_get_invoice_label() // returns the label of the invoice
sliced_get_invoice_label_plural() // returns the plural label of the invoice or invoice
sliced_get_invoice_id()
sliced_get_invoice_number( $id )
sliced_get_invoice_prefix( $id )
sliced_get_invoice_order_number( $id )
sliced_get_invoice_created( $id )
sliced_get_invoice_due( $id )
sliced_get_invoice_status( $id )
sliced_get_invoice_description( $id )
sliced_get_invoice_terms( $id )
sliced_get_invoice_line_items( $id ) // returns an array of the line items
sliced_get_invoice_total( $id ) // returns the formatted total including currency symbol
sliced_get_invoice_sub_total( $id ) // returns the formatted sub total including currency symbol
sliced_get_invoice_tax( $id ) // returns the formatted tax amount including currency symbol
sliced_get_invoice_total_raw( $id ) // returns the raw numeric total
sliced_get_invoice_sub_total_raw( $id ) // returns the raw numeric sub total
sliced_get_invoice_tax_raw( $id ) // returns the raw numeric tax amount
sliced_get_invoice_deposit( $id ) // returns the deposit percentage amount
sliced_get_next_invoice_number( $id ) // returns the next invoice number (if using auto increment)
sliced_get_invoice_template() // returns the template name that is set for the invoices
sliced_get_invoice_css() // returns the css that is set for the invoices
sliced_get_invoice_watermark( $id ) // checks invoice status and returns either 'Paid' or 'Cancelled' if that is the invoice status