2Nd Invoice Template

Hope this is the right forum section.



I'll start by explaining what we're trying to achive which is: we want to add some 'internal use' type boxes onto the invoice but ideally be only want this to print of our version and not on the copy we ship to our customers.



I've figured out how to make a duplicate of the Invoice and modify it to our internal needs without much problem.



I've figured out how to add a 2nd print button to the individual order page and can get it to open a new window but pointing it at the new template I get a 404 error! do I need to specify somewhere that orders.print_invoice_dirty = orders.print_invoice_dirty.tpl ?



The code I'm using is below, the first line is the existing print link on an individual invoice, the second is the one I've added and trying to point to the duplicate.



{include file="buttons/button_popup.tpl" but_text=$print_order but_href="orders.print_invoice?order_id=`$order_info.order_id`" width="900" height="600" but_role="tool"}
{include file="buttons/button_popup.tpl" but_text=$print_dirty but_href="orders.print_invoice_dirty?order_id=`$order_info.order_id`" width="900" height="600" but_role="tool"}




We also really need to be able to print both versions in bulk either by adding a second bulk print button which I can add or an extra option in the pop up 'choose action' menu but I'm a bit unsure how to modify the action of these.



Any guidance would be greatly appreciated.



We're using version 3. something which I can't check just at the moment

[quote name='jacksonsnurseries' timestamp='1399581388' post='183171']

Hope this is the right forum section.



I'll start by explaining what we're trying to achive which is: we want to add some 'internal use' type boxes onto the invoice but ideally be only want this to print of our version and not on the copy we ship to our customers.



I've figured out how to make a duplicate of the Invoice and modify it to our internal needs without much problem.



I've figured out how to add a 2nd print button to the individual order page and can get it to open a new window but pointing it at the new template I get a 404 error! do I need to specify somewhere that orders.print_invoice_dirty = orders.print_invoice_dirty.tpl ?



The code I'm using is below, the first line is the existing print link on an individual invoice, the second is the one I've added and trying to point to the duplicate.



{include file="buttons/button_popup.tpl" but_text=$print_order but_href="orders.print_invoice?order_id=`$order_info.order_id`" width="900" height="600" but_role="tool"}
{include file="buttons/button_popup.tpl" but_text=$print_dirty but_href="orders.print_invoice_dirty?order_id=`$order_info.order_id`" width="900" height="600" but_role="tool"}




We also really need to be able to print both versions in bulk either by adding a second bulk print button which I can add or an extra option in the pop up 'choose action' menu but I'm a bit unsure how to modify the action of these.



Any guidance would be greatly appreciated.



We're using version 3. something which I can't check just at the moment

[/quote]



Hello,



At first please check the “controllers/admin/orders.php” file. You should check the “print_invoice” mode. If you use “My changes” add-on to extend the core functionality, please copy the code of this mode and add this to “addons/my_changes/controllers/admin/orders.post.php” file and replace the “if ($mode == 'print_invoice')” with “if ($mode == 'print_invoice_dirty')”. Also you can find paths to invoice templates in this code. They also should be changed.



Hope it will help.