Hi. The print invoice view (dispatch=orders.print_invoice&order_id=xxx) has an unexpected usage for freeform text product “variants” whereas the packing slip view does not.
The problem is that the controller calls “fn_translate_products” for the print invoice, and tells it to translate product options.
Options do not have a translation entry in the database, so on this view they show up as nothing.
To give you an example, out store lets you customize a product with some text. The print_invoice is then used as the work order locally to set the item’s custom text. By default though it will show the variant name “Custom text:” but not the actual text entered by the buyer.
The fix is to change the function call to “fn_translate_products($order_info[‘items’], ‘’, CART_LANGUAGE, false);” and the invoice then works fine. Or remove the function call totally.
Personally, I do not see why the fn_translate_products function even takes an argument to translate product options since it is impossible to offer multiple languages for the options themselves, and it appears that it will always end up as empty strings.
My vote is for admin/orders.php to not call fn_translate_products.