[wcj_order_items_table]

Display WooCommerce order items table

Description

[wcj_order_items_table] shortcode displays WooCommerce order items table. Usually this shortcode is the main part of invoice template in PDF Invoices module.

Args

columns
(required) List of predefined table columns you need to display. Columns identifiers must be separated by vertical bar ( | ). Possible column identifiers are:

  • item_key
  • item_meta
  • item_name
  • item_number
  • item_product_addons
  • item_product_id
  • item_product_input_fields
  • item_product_input_fields_with_titles
  • item_quantity_excl_refunded
  • item_quantity_refunded
  • item_quantity
  • item_subtotal_tax_excl
  • item_subtotal_tax_incl
  • item_tax_class
  • item_tax_percent
  • item_tax
  • item_total_refunded
  • item_total_tax_excl
  • item_total_tax_incl
  • item_variation
  • item_debug
  • product_attribute
  • product_categories
  • product_cost
  • product_excerpt
  • product_height
  • product_id
  • product_length
  • product_meta
  • product_post_meta
  • product_profit
  • product_purchase_note
  • product_regular_price_multiply_qty
  • product_regular_price
  • product_sale_price_multiply_qty
  • product_sale_price
  • product_short_description
  • product_sku
  • product_thumbnail
  • product_weight
  • product_weight_multiply_qty
  • product_width
  • product_barcode
  • line_cost
  • line_profit
  • line_subtax
  • line_subtotal_tax_excl
  • line_subtotal_tax_incl
  • line_tax
  • line_total_tax_excl
  • line_total_tax_incl
Default: None
columns_titles
(optional) List of vertical bar ( | ) separated column titles.

Default: None
columns_styles
(optional) List of vertical bar ( | ) separated column styles.

Default: None
hide_currency
(optional) Hide currency symbol (yes).

Default: no
table_class
(optional) HTML class for the resulting table.

Default: None
shipping_as_item
(optional) If not empty, shipping will be added to order items list as line item. It is possible to add shipping method name to the item’s name, by adding %shipping_method_name% to the attribute value.

Default: None
discount_as_item
(optional) If not empty, discount will be added to order items list as line item.

Default: None
tax_percent_format
(optional) Format for outputting percent data in table.

Default: %.2f %%
product_image_width
(optional) Attribute used only if product_thumbnail column is enabled.

Default: None
product_image_height
(optional) Attribute used only if product_thumbnail column is enabled.

Default: None
price_prefix
(optional) Prefix all prices in table. For example you can add minus - sign to all prices.

Default: None
quantity_prefix
(optional) Prefix quantity in item_quantity column.

Default: None
style_item_name_variation
(optional) Used in item_name column.

Default: font-size:smaller;
variation_as_metadata
(optional) Used in item_name and item_variation columns.

Default: yes
order_user_roles
(optional) Display table only for certain user roles. Can be comma separated list.

Default: None
exclude_by_categories
(optional) Exclude some items from the table by product category. Can be comma separated list.

Default: None
exclude_by_tags
(optional) Exclude some items from the table by product tag. Can be comma separated list.

Default: None
add_variation_info_to_item_name
(optional) Used in item_name column.

Default: yes
insert_page_break
(optional) Sets number of items after which page break should inserted. Can be list of numbers separated by vertical bars ( | ). E.g. 10|20.

Default: None
multiply_cost
(optional) Used in product_cost and line_cost columns.

Default: 1
multiply_profit
(optional) Used in product_profit and line_profit columns.

Default: 1
refunded_items_table
(optional) If set to yes, will display order refunded items instead.

Default: no
hide_zero_prices
(optional) If set to yes, will hide all zero prices in table.

Default: no
product_barcode_width
(optional) Used in product_barcode column.

Default: 60
product_barcode_height
(optional) Used in product_barcode column.

Default: 60

Examples

This will create invoice with 3 columns: item counter, item name and price, setting column titles and styles accordingly:

[wcj_order_items_table
    table_class="pdf_invoice_items_table"
    columns="item_number|item_name|line_total_tax_incl"
    columns_titles="|Product|Total"
    columns_styles="width:5%;|width:65%;|width:30%;text-align:right;"]

Example with products images (i.e. thumbnails):

[wcj_order_items_table
    table_class="pdf_invoice_items_table"
    product_image_width="50"
    product_image_height="50"
    columns="item_number|product_thumbnail|item_name|item_product_input_fields|line_total_tax_incl"
    columns_titles="#|Image|Product|Input Fields|Total"
    columns_styles="width:5%;|width:30%;|width:35%;|width:20%;|width:10%;text-align:right;"]

Example for adding products meta (replace _your_meta_key with your key):

[wcj_order_items_table
    table_class="pdf_invoice_items_table"
    columns="item_number|item_name|product_post_meta=_your_meta_key|item_quantity|line_total_tax_excl"
    columns_titles="#|Product|Meta|Qty|Total"
    columns_styles="width:5%;|width:45%;|width:30%;|width:5%;|width:15%;text-align:right;"]

Example for adding products barcodes. You can replace product_barcode=%sku% with product_barcode=%id%, product_barcode=%url% or product_barcode=_your_meta_key (replace _your_meta_key with your key). Product barcodes in PDF will always be: PDF417 type, 2 dimensional (2D) and black color:

[wcj_order_items_table
    table_class="pdf_invoice_items_table"
    columns="product_barcode=%sku%|item_name|item_quantity|line_total_tax_excl"
    columns_titles="Barcode|Product|Qty|Total"
    columns_styles="width:40%;|width:40%;|width:5%;|width:15%;text-align:right;"]

Developers

If you wish to modify final cell content, there is wcj_pdf_invoicing_cell_data filter available. Filter params are:

$cell_data
Filtered value.
$args
Passed arguments array:

  • column
  • column_param
  • item
  • item_id
  • item_counter
  • product
  • order

For example, you can format item_number column values:

if ( ! function_exists( 'alg_format_item_number_in_pdf_invoice' ) ) {
	/*
	 * alg_format_item_number_in_pdf_invoice.
	 */
	function alg_format_item_number_in_pdf_invoice( $cell_data, $args ) {
		if ( 'item_number' === $args['column'] ) {
			$cell_data = sprintf( "%02d", $cell_data );
		}
		return $cell_data;
	}
	add_filter( 'wcj_pdf_invoicing_cell_data', 'alg_format_item_number_in_pdf_invoice', PHP_INT_MAX, 2 );
}

Another example shows how to modify cells for items with total equals zero (e.g. bundled products):

if ( ! function_exists( 'alg_modify_bundle_products_in_pdf_invoice' ) ) {
	/*
	 * alg_modify_bundle_products_in_pdf_invoice.
	 */
	function alg_modify_bundle_products_in_pdf_invoice( $cell_data, $args ) {
		$item_total_tax_incl = $args['order']->get_item_total( $args['item'], true, true );
		if ( 0 == $item_total_tax_incl ) {
			$cell_data = '<span style="font-size:small;">' . $cell_data . '</span>';
			switch ( $args['column'] ) {
				case 'item_number':
					return '';
				case 'item_name':
					return '-' . $cell_data;
			}
		}
		return $cell_data;
	}
	add_filter( 'wcj_pdf_invoicing_cell_data', 'alg_modify_bundle_products_in_pdf_invoice', PHP_INT_MAX, 2 );
}
Recommended for PDF Invoicing and Packing Slips module
Accessible through:
  • [wcj_order_items_table]
Tested on WooCommerce 3.5.2 and WordPress 5.0
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply

Comments

74 Comments

  1. Rune February 18, 2015 at 10:10 pm #

    Hello,

    I posted an support ticket a few days ago but i think it has dissapeared. I can not get this shortcode to work for V2 invoice.
    I have it set like this: columns=”item_number|item_name|item_quantity|wcj_product_price|line_total_tax_excl”

    Also i was asking for a line total shortcode incl. tax. I have to use V2 invoice where i have different number for order, invoice and packinglist.
    In V1 the invoice number is the same as the order number, and the subtotal is only excl. tax.

    I need each product line to include name, quantity, price(incl. tax), line_total(incl.tax)
    Then the sum fields like this:
    Subtotal: same as line_total(incl.tax)
    Discount: (incl. tax)
    Shipping: (incl.tax)
    Wherof 25%tax: The tax amount
    Sumtotal: total sum incl. tax

    But i can not figure out how to setup this using V2 invoice.

    Brgds
    Rune

    Reply to thread

    • WooJetpack Support Team February 19, 2015 at 2:54 pm #

      Hi Rune,

      Sorry for the delayed reply.

      Regarding [wcj_order_items_table] shortcode columns – I’ve started documentation page – http://booster.io/shortcodes/wcj_order_items_table/ – please check it.
      Regarding numbering in PDF Invoice V2 – you can set invoice numbers same as order id – uncheck sequential numbering and use Renumerate Invoices tool.
      I’m going to add documentation for PDF Invoices V2 in an couple of days, hope it will be more clear.

      Best regards,
      Tom

    • Rune February 19, 2015 at 4:03 pm #

      Thank you Tom, that made things more clear.

      Yes i will use V2 because it has separate numbering for invoice, order and packlist, so this is great.

      My main problem is that in Norway if a new company is still not registered with the tax system they are not allowed to specify tax in the invoice, this means that all prices needs to be included tax. I can not find shortcode for the subtotal in pdf_invoice_totals_table which inclue tax.

      Thanks again.

      Brgds
      Rune

  2. Rune February 20, 2015 at 10:39 am #

    Back again with an image of what i am trying to setup. Checked your shortcode files and did some tests and actually easy to make this work. I can buil a custom function to handle this for my own use but i really think many should be interested to have it build into plugin.

    http://www.arctic-fritid.no/wp-content/uploads/2015/02/invoice.pdf

    The product line with product price BEFORE discount, then the given discount and then linetotal after discount (all incl. tax). Separate fields which displays tax.

    Then in the total table we need subtotal incl tax, shipping incl. tax and sum total incl. tax.

    I hope this explains my needs and that it is in your interest to add to code.

    Brgds
    Rune

    Reply to thread

    • Rune February 20, 2015 at 10:29 pm #

      Ok, i have solved most of my problems by using the “discount_as_item=”Discount”

      Then i have the product line with all amounts including TAX
      And the discount line looks ok.

      2 problems still and that is the Subtotal does not summer all product lines, the discount line/amount is not included so when i add a Discount -$100 in table total it all looks wrong. And Shipping price is only available excl. TAX (should also be incl. tax)

      With these 2 in place i can use a bottomline like “Whereof 25% tax: $111.00”

      By now i have made 2 new shortcodes in class-wcj-orders-shortcodes.php so it works for me until next update 😉
      So I hope these 2 (or similar) shortcodes can be implemented,

      wcj_order_subtotal_incl_discount and wcj_order_shipping_price_incl_tax

      Brgds
      Rune

    • WooJetpack Support Team February 25, 2015 at 10:09 am #

      Hi Rune,

      Sorry for the delayed reply.
      1. [wcj_order_subtotal_after_discount] added.
      2. Regarding your second request about wcj_order_shipping_price_incl_tax – the [wcj_order_shipping_price] shortcode should return shipping incl. TAX, while [wcj_order_shipping_price excl_tax="yes"] will display the shipping excluding the TAX. I’ve tested on our test server – it seems to work as expected. Please let me know if I missed something.

      Best regards,
      Tom

  3. vieradel September 14, 2015 at 1:34 pm #

    Hello, I have found the following. Is there any solution?
    http://prntscr.com/8g7v2q

    “Extra WooCommerce Product Options” Fields

    Thanks!

    Reply to thread

    • Valentin Solovjov September 14, 2015 at 4:51 pm #

      Dear Vieradel,

      what “Extra WooCommerce Product Options” Fields do you need?

      BR,
      Val

  4. Moritz Walter March 11, 2016 at 1:27 pm #

    Hi! Just processed a partial refund, is there a way to display the refunded amount as a position in this table somehow? All the best, Moritz

    Reply to thread

  5. Daniele April 13, 2016 at 9:51 am #

    How can I print unit price (with or without tax) in wcj_order_items_table?

    Reply to thread

    • Valentin Solovjov April 20, 2016 at 8:37 pm #

      HI,

      try these attributes for shortcode [wcj_order_items_table]

      item_total_tax_excl
      item_total_tax_incl

      BR,
      Val

  6. Tim May 24, 2016 at 4:41 am #

    Is there a way to display the weight of each item such as “item_weight”?

    Reply to thread

    • Booster Support Team May 24, 2016 at 9:28 am #

      Hi Tim,

      Wasn’t possible, but I’ve just added it to the plugin. Please download the development version here – http://booster.io/dev/. You will need to uninstall the old version first (don’t worry your saved settings won’t disappear). As you suggested, new column is named item_weight. Please let me know if it works as expected.

      Best regards,
      Tom

      Booster Support Team
    • Tim May 24, 2016 at 9:39 am #

      Awesome. Thanks guys!

    • Booster Support Team May 24, 2016 at 10:19 am #

      No problem 🙂
      Please let me know if you need anything else added.

      Best regards,
      Tom

      Booster Support Team
  7. Marcel November 6, 2016 at 10:58 am #

    How can I include just the item name in a template, without the table structure?

    Reply to thread

    • Booster Support Team November 6, 2016 at 10:59 pm #

      Hi Marcel,

      Don’t think it’s possible at the moment, but I could add it to the plugin. However I would need more details – do you want to list all order items as some list (e.g. each item name on separate line), is that correct?

      Best regards,
      Tom

      Booster Support Team
  8. franck November 25, 2016 at 10:58 pm #

    Hello,
    I use the “item_product_input_fields” in my billing template inside the shortcode “[wcj_order_items_table].
    The table is ok and all the columns i need are in place. But the areas for “item_product_input_fields” are empty.
    What do i do wrong ?
    Best regards.

    Reply to thread

    • franck November 25, 2016 at 11:44 pm #

      Sorry everything works well.
      I just had to upgrade booster to 2.5.6 and that’s it !!
      Very great plug-in.
      Thanks.

    • Booster Support Team November 26, 2016 at 5:58 pm #

      Hi Franck,

      Thank you 🙂

      Best regards,
      Tom

      Booster Support Team
  9. maryann December 17, 2016 at 5:26 am #

    Hello,

    I cant seem to get discount per product in PDF invoice.
    This is what I’ve done –
    columns=”item_number|item_name|item_quantity|line_total_tax_excl|discount_as_item”
    columns_titles=”|Product|Qty|Total|Coupon Discount”
    What am i doing wrong?
    Thanks

    Reply to thread

    • Booster Support Team December 19, 2016 at 8:27 pm #

      Hi Maryann,

      Sorry for a delay. discount_as_item attribute should be used like that:

      It will display order discount as line in order items table.

      Please let me know if you have any questions.

      Best regards,
      Tom

      Booster Support Team
    • maryann December 28, 2016 at 8:47 am #

      Hello,

      Is there any way i can show discount per product in PDF invoice?

      Thanks

  10. Ugenijus February 15, 2017 at 8:41 am #

    Hello,

    This code worked for a long time, but now stops, because of item_thumbnail. If i remove this from code, everything is ok.

    [wcj_order_items_table table_class=”pdf_invoice_items_table”
    columns=”item_sku|item_name|item_thumbnail|item_quantity|line_total_tax_incl”
    columns_titles=”SKU|Product|Image|Qty|Suma”
    columns_styles=”width:10%;|width:40%;|width:30%;|width:10%;|width:10%;text-align:left;”
    item_image_width=”120px”
    item_image_height=”120px”]

    Whats wrong, please?

    I use Booster Plus.

    Thank You

    Reply to thread

    • Ugenijus February 21, 2017 at 11:01 am #

      WordPress 4.7.2.
      Woocommerce 2.6.14
      Booster for WooCommerce 2.5.9
      Booster Plus for WooCommerce 1.1.0

      When I use this code on PACKING SLIPS HTML Template, PDF file can’t be downloaded or previewed.
      [wcj_order_items_table table_class="pdf_invoice_items_table"
      columns="item_sku|item_name|item_thumbnail|item_quantity|line_total_tax_incl"
      columns_titles="SKU|Prekė|Foto|Kiekis|Suma"
      columns_styles="width:10%;|width:40%;|width:30%;|width:10%;|width:10%;text-align:left;"
      item_image_width="120px;"
      item_image_height="120px;"]

      If I remove – item_thumbnail – everything works ok, PDF file is downloadable. This code works ok:
      [wcj_order_items_table table_class="pdf_invoice_items_table"
      columns="item_sku|item_name|item_quantity|line_total_tax_incl"
      columns_titles="SKU|Prekė|Kiekis|Suma"
      columns_styles="width:10%;|width:70%;|width:10%;|width:10%;text-align:left;"]

  11. Rory Restani March 23, 2017 at 5:55 pm #

    how do I hide products from the pdf invoice?

    I have several woo commerce items which are hidden from the store and bundled together as a kit. On my checkout and new order emails from woo commerce the items stay hidden but they appear as a long list on the pdf.

    I want hidden products to stay hidden on the pdf invoice.

    Reply to thread

  12. Stevan Wilts May 2, 2017 at 9:36 am #

    Hello, I have a problem that occured since the last update. The item_variation now displays is_custom behind every variation. I have no idea how to get rid of this. Can you help me with this? Thanks in advance!

    Greetings,

    Stevan

    Reply to thread

    • Booster Support Team May 2, 2017 at 12:20 pm #

      Hi Stevan,

      Thanks for pointing that out. I’ve just made some changes to the plugin. Please download the development version here – https://booster.io/dev/. You will need to uninstall the old plugin version first (don’t worry your saved settings won’t disappear). Please let me know if it’s fixed now.

      Best regards,
      Tom

      Booster Support Team
    • Stevan Wilts May 2, 2017 at 12:48 pm #

      Yes, thank you! That fixed it.

    • Booster Support Team May 2, 2017 at 12:52 pm #

      Happy to hear it’s fixed. Please let me know if you notice any more bugs.

      Best regards,
      Tom

      If you like Booster, please leave us a rating.

      Booster Support Team
  13. Dan May 2, 2017 at 8:24 pm #

    Hi,

    i am generating an email using the shortcode [wcj_order_items_table] and in sent email i see “is_custom:” next to the product variants. What is it and how do I delete it?

    Thank you!

    Reply to thread

  14. robinson rajan May 31, 2017 at 2:53 pm #

    item sale price Args not in the list of shortcode wcj_order_items_table

    how do i show the individual item sale price

    Reply to thread

  15. Gregor June 6, 2017 at 1:29 pm #

    Hello,

    I have noticed that the field item_name doesn’t display the variation any more. It has in the past.
    I have also tried item_variation and item_sku, but that fields were always empty.

    Found your plugin really helpful.

    Reply to thread

    • Booster Support Team June 6, 2017 at 6:53 pm #

      Hi Gregor,

      Thanks.

      Please try adding add_variation_info_to_item_name="yes" attribute to the [wcj_order_items_table] shortcode, something like this:

      Please let me know if that helped, or if you have any questions or need any help.

      Best regards,
      Tom

      Booster Support Team
  16. Ivan July 14, 2017 at 10:40 pm #

    How can I also display fee items as entries in this table? Similar to how the shipping can be displayed. Thanks for your help!

    Reply to thread

  17. Riccardo August 18, 2017 at 12:04 pm #

    Hi Tom! Please add product category as a shortcode 🙂 Thanks

    Reply to thread

    • Booster Support Team August 19, 2017 at 6:56 pm #

      Hi Riccardo,

      As mentioned in private email – I’ve added product_categories column to [wcj_order_items_table] shortcode in development version (3.0.2). Dev version can be downloaded here – https://booster.io/dev/. Now you can display product categories in PDF invoice, like this:

      Best regards,
      Tom

      Booster Support Team
  18. Ross October 3, 2017 at 3:05 am #

    Can a short code be made for “total item quantity” be added please.

    I would like to be able to put it above table and also have the result at the bottom of item quanity.

    Cheers,

    Reply to thread

  19. JB October 20, 2017 at 1:22 am #

    Hi is there any way to sort the wcj_order_items_table into alphabetical order of the item_name?

    This would help us when we go through processing our orders.

    Thanks, JB

    Reply to thread

  20. Matteo November 30, 2017 at 2:55 am #

    Hi,

    I’ve managed to solve most of my problems with the PDF invoice settings using your template
    I’ve however still one HUGE problem with the extra info that are not showing under the item name
    I explain better: I sell Burgers and clients can choose several options inside each product (ex. type of sides, extra sauce, drinks, etc)
    All these info don’t show up in the invoice, but i can see only the item name.
    Other PDF invoice plugins can show also all these info, right under the item name.

    I think I understood that all these extra infos are called “variations”, so I assumed that they had to show up immediately under the item name, but unfortunately that’s not my case
    So my question is…where I’m doing wrong? I’ll add a part of the code to see if you can manage to solve my problem.

    [wcj_order_items_table table_class="pdf_invoice_items_table"
    add_variation_info_to_item_name="yes"
    variation_as_metadata="yes"
    columns="item_number|item_name|item_quantity|line_total_tax_excl"
    columns_titles="|Prodotto|Qta|Totale"
    columns_styles="width:5%;|width:75%;|width:5%;|width:15%;text-align:right;"]

    Best Regards,
    Matteo from Italy

    Reply to thread

  21. GBLA December 6, 2017 at 3:46 pm #

    Hi,

    I’ve a trouble with my invoices. Indeed, with “discount_by_item”, it display 2 lines => first for the product WITH PRINCE AFTER DISCOUNT, and second with DISCOUNT …. It’s no logic …

    How can i solve this ?

    Reply to thread

    • GBLA December 13, 2017 at 5:13 pm #

      Please help …

  22. Artur December 10, 2017 at 11:12 pm #

    Hello, I have a big problem with the description of the meta – item_meta.

    How do I insert – or what to correct to be correct in PDF.
    In the order and in the basket I have:
    for example:
    name: Roller blind in the adaptive system – standard color × 1
    meta:

    Width: 1456
    Height: 1566
    Roller blinds in one color: yes
    The color of the blind: Bronze

    In pdf after adding item_meta
    _uni_cpo_szerokoscroleta2: 1456,
    _uni_cpo_szerokoscroleta2_count: 4, _uni_cpo_ high-level 2:
    1566, _uni_cpo_wysokoscroleta2_count: 4, _uni_cpo_czy_kolor:
    yes, _uni_cpo_kolorroleta: brz, is_custom:
    How can I deal with it?

    Discount is : custom?
    Please Help

    Reply to thread

    • Artur December 10, 2017 at 11:17 pm #

      I will add that another plugin works correctly – but I do not want it.

      a piece of code … from it …

      ?php do_action( ‘wpo_wcpdf_before_order_details’, $this->type, $this->order ); ?>

      get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : ?>
      <tr class="type, $this->order, $item_id ); ?>”>


      type, $item, $this->order ); ?>

      type, $item, $this->order ); ?>

      type, $this->order ); ?>
      get_shipping_notes() ) : ?>

      shipping_notes(); ?>

      type, $this->order ); ?>

      get_woocommerce_totals() as $key => $total ) : ?>
      <tr class="”>

      …..

      wpo_wcpdf_before_item_meta

    • zimart_snk December 11, 2017 at 5:05 pm #

      Please.. help 🙁

    • Booster Support Team December 11, 2017 at 7:13 pm #

      Hi,

      item_meta column displays all item meta in one block. Maybe it would be a better idea to use item_key column instead. However you will need to set key for each item_key, for example:

      There are other possible solutions, but maybe this one will be good enough for you.

      Also if you wish you can share your server’s admin account so I could login and help you setting up the module. My private email is tom@booster.io

      Best regards,
      Tom

      Booster Support Team
    • zimart_snk December 20, 2017 at 12:12 pm #

      Tom, Can you help me ? I can pay extra – to correct or add a function without which I do not have a chance to start the system.

  23. Tadeáš Gavala December 11, 2017 at 7:53 am #

    Dear Booster Support team,

    I have problem with invoicing.
    In my invoice I want to heve these columns=”item_number|item_name|item_quantity|product_regular_price|product_regular_price_multiply_qty”

    But what to do, if I have product on sale?
    Customer can order some products with regular price and some products with sale price…
    How to get products eith regular price and products with sale price to one invoice?

    Thanks a lot for your help!

    Reply to thread

  24. Arnis December 14, 2017 at 6:55 pm #

    Hi,

    For some reason discount_as_item=”Discount” have stooped working for me in PDF Invoice template.
    When Coupon code is used at checkout discount is calculated as usual but in PDF invoice it come up as
    Discount £0.00 £0.00

    discount it self is subtracted in totals and I have it everywhere in order meta

    Reply to thread

  25. jerkerp December 18, 2017 at 10:28 am #

    Thanks for a great plugin! I’ll buy Booster Plus!

    But, I can’t stop the PDF showing “is_custom:” at the end of the item_meta field. Like this:

    Artikel Text Antal Totalt
    1 Konsulttid990 Upparbetad tid: december 2017, 2018 höjer vi priserna: 10% = 1095, is_custom: 2 kr 1,980.00

    I’m using this as the invoice-template:

    [wcj_order_items_table table_class="pdf_invoice_items_table"
    columns="item_number|item_name|item_meta|item_quantity|line_total_tax_excl"
    columns_titles="|Artikel|Text|Antal|Totalt"
    columns_styles="width:5%;|width:15%;|width:53%;|width:7%;|width:20%;text-align:right;"]

    Where dows this ic_custom: com from?

    Reply to thread

    • Booster Support Team December 27, 2017 at 3:55 pm #

      Hi,

      This should be fixed in v3.2.4. Please let me know if there are still any issues.

      Best regards,
      Tom

      Booster Support Team
  26. Franck Robichon December 27, 2017 at 3:07 pm #

    Hello,
    i have the same problem as Arnis (14th december comment) but with “shipping_as_item”.
    The pdf show the shipping line with 0.00€, since i upgrade to the 3.2.3 version.
    How can i fix the problem please?
    Best regards.
    Franck

    Reply to thread

    • Arnis January 5, 2018 at 3:41 pm #

      Hi,

      is there a solution for discount_as_item=”Discount” not working yet?

    • Booster Support Team January 10, 2018 at 5:38 pm #

      Hi,

      Hopefully this is fixed in v3.3.0-dev. You can either download it from https://booster.io/dev/ or you can wait till we release stable version tomorrow (2018/01/11).

      Best regards,
      Tom

      Booster Support Team
    • Adda February 14, 2018 at 10:37 am #

      Hello,
      Can you please show me your invoice template? I have no idea where to insert “shipping_as_item” and how to hide it when it’s 0€.
      Thank you!

  27. Darryl January 31, 2018 at 8:40 pm #

    When using item_weight for example I would like to simply put text right beside the result.
    Example
    Table header is “Weight”
    The table result is “28”
    I would like add (g) to that result
    ex.
    28(g)

    Is this possible?
    Absolutely love your plugin
    Thanks very much

    Reply to thread

  28. Miloš Kočan March 18, 2018 at 8:31 pm #

    Hello,

    I have this custom function:

    if ( ! function_exists( ‘alg_modify_bundle_products_in_pdf_invoice’ ) ) {
    /*
    * alg_modify_bundle_products_in_pdf_invoice.
    */
    function alg_modify_bundle_products_in_pdf_invoice( $cell_data, $args ) {

    $order_id = do_shortcode(‘[wcj_order_id]‘);
    $billing_vat_id = get_post_meta($order_id, ‘_wc_nastavenia_skcz_billing_company_vat_id’, true);
    $order = new WC_Order( $order_id );
    $billing_country = $order->get_billing_country();

    if ( ! empty($billing_vat_id) && $billing_country == ‘CZ’ ) {
    $cell_data = ‘‘ . $cell_data . ‘‘;
    switch ( $args[‘column’] ) {
    case ‘item_number’:
    return ”;
    case ‘item_name’:
    return ‘-‘ . $cell_data;
    }
    }
    return $cell_data;
    }

    add_filter( ‘wcj_pdf_invoicing_cell_data’, ‘alg_modify_bundle_products_in_pdf_invoice’, PHP_INT_MAX, 2 );

    }

    And now i need hide full column in pdf invoice template, for example i need hide item_number column, how i can do that?

    Reply to thread

    • danielc April 5, 2018 at 8:55 am #

      Hello Miloš,

      sorry for a late response, if you still having issue with this question, please contact us support@booster.io for further support.

      Best regards,
      Support Team

  29. Christophe GUHRING April 17, 2018 at 12:49 pm #

    Hi,
    I need a way to add some html attributes to the enclosing table, like style, “cellspacing” and “cellpadding” wich are not dealed by style/class attribute…
    I would especially set the cellspacing to zero for uniformizing the emails between the woocommerce’s original and booster ones.

    Also, I have read all comments, and dont have finded solutions for displaying the item meta like the original woocommerce emails.

    Thank you in advance,
    Best Regards
    Christophe.

    Reply to thread

    • Christophe GUHRING April 17, 2018 at 1:07 pm #

      Sorry, I’ve dont have sufficiently searched as I’ve juste found css “border-spacing” which seems to make what I want 🙂

      So I need just to find how to add some meta (under the item name, not in another column) and why on a specific site, the shipping will not display…

    • Christophe GUHRING April 17, 2018 at 9:10 pm #

      Hi again…;

      finally, after some testing, I have reached what I would have done with the filter “wcj_pdf_invoicing_cell_data”
      All the necessary data and objects are inside the arg “data” for retrieving all meta data 🙂

      Thanks for booster ! It needs some time & research to do what we want, but great things can be done !

      Best regards !

  30. Thea September 5, 2018 at 12:34 pm #

    I use discounted price when ordering more then 10 items. How can I get that price into the table?
    The total is calculated with the discount but the discounted price is not visible.
    I tried discount_as_item=”Discount” but that does not show anything.
    I also used the product_sale_price but that does not work.
    Can’t find the shortcode for it.

    Reply to thread

    • RokasJ September 5, 2018 at 2:52 pm #

      Hi Thea,

      What module are you using for discounts that doesn’t replace the price with the discounted one? Also, could you contact us at support@booster.io about this issue? Thank you.

      Best regards,
      Rokas – Support Team

    • Thea September 10, 2018 at 8:19 am #

      YITH Dynamic pricing

  31. Matt October 18, 2018 at 5:18 pm #

    We use Product Add Ons by Woocommerce. Is there a way to incorporate Add On option selection in the invoice? Currently it does not display any of the options that our customers select

    Reply to thread

    • RokasJ October 18, 2018 at 8:33 pm #

      Hi Matt,

      There is a column that you can add that shows selected product addons – item_product_addons.

      Best regards,
      Rokas – Support Team

    • Matt October 18, 2018 at 9:26 pm #

      Thank you for the reply. Unfortunately the shortcode is not working. I have added it to my items table in the following way.

      [wcj_order_items_table table_class="pdf_invoice_items_table"
      columns="item_sku|item_name|item_quantity|item_product_addons|line_total_tax_excl"
      columns_titles="SKU|Product|Qty|Add Ons|Total"
      columns_styles="width:10%;|width:40%;|width:10%;|width:25%;|width:15%;text-align:right;"
      discount_as_item="Discount"]

      Any idea’s why it is not working?

    • RokasJ October 22, 2018 at 6:11 pm #

      Hi Matt,

      Can you contact us at support@booster.io?

      Best regards,
      Rokas – Support Team

    • Matt October 22, 2018 at 7:41 pm #

      Email has been sent. Thank you.

    • Matt October 22, 2018 at 7:44 pm #

      Please disregard my last comment. The email to the address you provided bounced back. Can you initiate an email to us?

  32. Fabio November 7, 2018 at 11:52 pm #

    Hi, how can I enter the data of the vendor in my custom mail? Or how can I insert a custom field of the product in the email? Thank you very much

    Reply to thread

    • RokasJ November 8, 2018 at 9:12 pm #

      Hi Fabio,

      Can you explain how/where the vendor information is saved?
      To insert product input field data you can use one of these columns: item_product_input_fields or item_product_input_fields_with_titles.

      Best regards,
      Rokas – Support Team

  33. Kostiantyn Tustanovskyi December 10, 2018 at 4:27 pm #

    Hi,

    Is it possible to add country of origin to the table. I’m trying to create a Commercial Invoice required for goods that are imported into Norway, like this one https://www.bring.no/english/advising/sending-something-with-bring/customs/_/attachment/download/bdaf13a6-3236-4065-9171-7c2012ca1bbc:e4570b3a52dbcc6eae80d0b3df2a28152e5f7873/Commercial%20Invoice.pdf

    Reply to thread

    • RokasJ December 10, 2018 at 5:04 pm #

      Hi Kostiantyn,

      You could do that by adding a new meta field to each of the products and then adding product_meta column to the [wcj_order_items_table].

      In product edit page under “Custom fields” add names and values for this data with the same names for all products. You may have to enable this in the “Screen Options” menu which is located in the top right of any product edit page. In there enable an option called “Custom Fields”. Then use the this meta key for product_meta column.

      Best regards,
      Rokas – Support Team