By werushka on
Default ubercart has only one invoice template, I pretty much figured how to edit the invoice template. I will create 3 more invoice templates. I will be using 4 different invoices before shipping the products.
I need a dropdown box so whichever invoice I choose (admin/store/orders/etc) I should be able to print it.
I would appreciate some help.
If there is an easy way to do this please let me know so I can pay $15 just for giving me necessary steps.
Thanks
Comments
Also please view this
Also please view this http://www.freelancer.com/buyers/edit.php?id=878300
Easiest way but less elegant
There are many ways to do this, the easiest way but less elegant is change uc_order-customer.tpl.php or uc_order-admin.tpl.php file in ubercart/order/templates (depends on the selected in admin/store/settings/orders/edit, On-site invoice template)
add html and php code at the beginning of template
and add code foreach option invoice in this template
eg:
Additionally could invoke hook_uc_invoice_templates() in new module and add options in template list to setting in order (you can see http://api.lullabot.com/hook_uc_invoice_templates) and add new template in ubercart/uc_order/templates(yes, only in this directory, see http://drupal.org/node/295423),
eg you add newtemplate option in hook_uc_invoice_templates you should add uc_order-newtemplate.tpl.php file in ubercart/uc_order/templates.
you could also create and invoke a new pane hook_order_pane(), etc
hoping to have helped a little
Juan
Thanks for your help the way
Thanks for your help the way i did is i used http://www.ubercart.org/forum/support/13796/packing_slip and duplicated the module with different names.
you could improve this
Doubtless also works, however you could improve this by adding in your choose template (uc_order-customer.tpl.php or uc_order-admin.tpl.php)
and change function uc_packing_slip_print
and now you have many templates for each case