View Single Post
  #1  
Old 10-30-2004, 08:37 AM
 
fernando fernando is offline
 

Member
  
Join Date: Oct 2004
Posts: 29
 

Default INVOICE PRINTING ENHANCEMENTS (W/ PRINTINGPAGE BREAKING!!)

Allright! I was having two problems with the original main/order_invoice_print.tpl template: first, it wouldn't show additional customer fields when printing invoices. The other problem was cosmetic, but sort of a pain in the but...: when you select more than one invoice to print, you surely want each invoice on a separate page, right? This mod adds a PAGE BREAK after each printed invoice. (This was tested under MSIE 6, too lazy to test it with Netscape or Mozilla...)

Ok, here goes the mod!!!

Code:
{* $Id: order_invoice_print.tpl,v 1.9 2004/06/29 06:47:31 svowl Exp $ *} {* Modified 2004/10/30 by Fernando Borcel, MascotasMexico.com *} <HTML> <BODY> {if $config.Appearance.print_orders_separated eq "Y"} {assign var="separator" value="<DIV style='page-break-after:always'></DIV>"} {else} {assign var="separator" value=" <HR size='1' noshade> "} {/if} {section name=oi loop=$orders_data} {* include file="mail/html/order_invoice.tpl" order=$orders_data[oi].order customer=$orders_data[oi].customer products=$orders_data[oi].products giftcerts=$orders_data[oi].giftcerts*} {* Removed by Fernando ("customer" variable doesn't exist in target tpl) *} { include file="mail/html/order_invoice.tpl" order=$orders_data[oi].order userinfo=$orders_data[oi].customer products=$orders_data[oi].products giftcerts=$orders_data[oi].giftcerts} {* Added by Fernando so that it will print additional fields properly*} {if not %oi.last%} {* $separator *} {* Removed by Fernando Don't print an separator *} <div style="page-break-after: always"></div> {* Added by Fernando Instead, do a PAGE BREAK! *} {/if} {/section} </BODY> </HTML>

Try it out and tell me how it went!!
__________________
Fernando
Sorry, I\'m not using x-cart anymore, so I am unable to reply to enquiries about modules. Thank you.
Reply With Quote