Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Clean Coded Invoice Template

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 11-05-2005, 11:50 PM
 
Mr Bob Mr Bob is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 199
 

Default Clean Coded Invoice Template

If anyone is trying to modify their X-Cart to be xhtml or clean coded, you might want to start with this invoice template that I created.

This has been tested on 4.0.14-4.0.16, and it will display awesome on the print invoice screen as well.

Template Preview: http://img209.imageshack.us/my.php?image=invoicescreenshot0vh.jpg

http://img209.imageshack.us/img209/72/invoicescreenshot0vh.jpg

Location: skin/mail/html/order_invoice.tpl

Code:
{* $Id: order_invoice.tpl,v 1.14.2.15 2005/08/09 10:51:37 max Exp $ *} {if $customer ne ''}{assign var="_userinfo" value=$customer}{else}{assign var="_userinfo" value=$userinfo}{/if} {config_load file="$skin_config"} {if $is_nomail ne 'Y'} {literal} <STYLE type="text/css"> body { MARGIN-TOP: 10px; FONT-SIZE: 12px; MARGIN-LEFT: 10px; FONT-FAMILY: arial,helvetica,sans-serif } td { FONT-SIZE: 12px; FONT-FAMILY: arial,helvetica,sans-serif } th { FONT-SIZE: 13px; FONT-FAMILY: arial,helvetica,sans-serif } h1 { FONT-SIZE: 20px } #orderDetailsTable { border: 3px solid #FFFFFF; background-color: #f5edd6; } #orderDetailsTable th { color: #FFFFFF; background-color: #8d7299; font-weight: bold; font-size: 14px; } #orderDetailsTable tr { border: 1px solid #FFFFFF; } #orderDetailsTable td { vertical-align: top; } td.order1 { background-color: #8d7299; color: #FFFFFF; } </STYLE> {/literal} {/if} <div align="center"><table> <tr><td colspan="2" align="center"><font style="FONT-SIZE: 22px">{$lng.lbl_invoice|upper}</font> </td></tr> <tr><td valign="top"><table cellSpacing="0" cellPadding="3" width="215px" id="orderDetailsTable"> <tr><th height="20px">Company Information</th></tr> <tr><td>{$config.Company.company_name} </td></tr> <tr><td>{$config.Company.location_address}, {$config.Company.location_city} {$config.Company.location_zipcode}, {$config.Company.location_state_name} </td></tr> {if $config.Company.company_phone}<tr><td>{$lng.lbl_phone}: {$config.Company.company_phone}</td></tr>{/if} {if $config.Company.company_phone_2}<tr><td>{$lng.lbl_phone_2_title}: {$config.Company.company_phone_2}</td></tr>{/if} {if $config.Company.company_fax}<tr><td>{$lng.lbl_fax}: {$config.Company.company_fax}</td></tr>{/if} {if $config.Company.orders_department}<tr><td>{$lng.lbl_email}: {$config.Company.orders_department}</td></tr>{/if} </table> <table cellSpacing="0" cellPadding="3" width="215px" id="orderDetailsTable"> <tr> <th colspan="2" height="20px">{$lng.lbl_billing_address}</th> </tr> {if $_userinfo.default_fields.firstname} <tr> <td>{$lng.lbl_first_name}: </td> <td>{$order.b_firstname}</td> </tr> {/if} {if $_userinfo.default_fields.lastname} <tr> <td>{$lng.lbl_last_name}: </td> <td>{$order.b_lastname}</td> </tr> {/if} {if $_userinfo.default_fields.b_address} <tr> <td>{$lng.lbl_address}: </td> <td>{$order.b_address} {$order.b_address_2}</td> </tr> {/if} {if $_userinfo.default_fields.b_city} <tr> <td>{$lng.lbl_city}: </td> <td>{$order.b_city}</td> </tr> {/if} {if $_userinfo.default_fields.b_county && $config.General.use_counties eq 'Y'} <tr> <td>{$lng.lbl_county}: </td> <td>{$order.b_countyname}</td> </tr> {/if} {if $_userinfo.default_fields.b_state} <tr> <td>{$lng.lbl_state}: </td> <td>{$order.b_statename}</td> </tr> {/if} {if $_userinfo.default_fields.b_country} <tr> <td>{$lng.lbl_country}: </td> <td>{$order.b_countryname}</td> </tr> {/if} {if $_userinfo.default_fields.b_zipcode} <tr> <td>{$lng.lbl_zip_code}: </td> <td>{$order.b_zipcode}</td> </tr> {/if} {foreach from=$_userinfo.additional_fields item=v} {if $v.section eq 'B'} <tr> <td>{$v.title}:</td> <td>{$v.value}</td> </tr> {/if} {/foreach} </table></td><td valign="top"><table cellSpacing="0" cellPadding="3" width="215px" id="orderDetailsTable"> <tr><th height="20px">Order Information</th></tr> <tr><td>{$lng.lbl_date}: {$order.date|date_format:$config.Appearance.datetime_format}</td></tr> <tr><td>{$lng.lbl_order_id}: #{$order.orderid}</td></tr> <tr><td>{$lng.lbl_order_status}: {include file="main/order_status.tpl" status=$order.status mode="static"}</td></tr> <tr><td>{$lng.lbl_payment_method}: {$order.payment_method}</td></tr> <tr><td>{$lng.lbl_delivery}: {$order.shipping|trademark|default:$lng.txt_not_available} {if $order.applied_taxes} {foreach from=$order.applied_taxes key=tax_name item=tax} {$tax.regnumber}</td></tr> {/foreach} {/if} </table> <table cellSpacing="0" cellPadding="3" width="215px" id="orderDetailsTable"> <tr> <th colspan="2" height="20px">{$lng.lbl_shipping_address}</th> </tr> {if $_userinfo.default_fields.firstname} <tr> <td>{$lng.lbl_first_name}: </td> <td>{$order.s_firstname}</td> </tr> {/if} {if $_userinfo.default_fields.lastname} <tr> <td>{$lng.lbl_last_name}: </td> <td>{$order.s_lastname}</td> </tr> {/if} {if $_userinfo.default_fields.s_address} <tr> <td>{$lng.lbl_address}: </td> <td>{$order.s_address} {$order.s_address_2}</td> </tr> {/if} {if $_userinfo.default_fields.s_city} <tr> <td>{$lng.lbl_city}: </td> <td>{$order.s_city}</td> </tr> {/if} {if $_userinfo.default_fields.s_county && $config.General.use_counties eq 'Y'} <tr> <td>{$lng.lbl_county}: </td> <td>{$order.s_countyname}</td> </tr> {/if} {if $_userinfo.default_fields.s_state} <tr> <td>{$lng.lbl_state}: </td> <td>{$order.s_statename}</td> </tr> {/if} {if $_userinfo.default_fields.s_country} <tr> <td>{$lng.lbl_country}: </td> <td>{$order.s_countryname}</td> </tr> {/if} {if $_userinfo.default_fields.s_zipcode} <tr> <td>{$lng.lbl_zip_code}: </td> <td>{$order.s_zipcode}</td> </tr> {/if} {foreach from=$_userinfo.additional_fields item=v} {if $v.section eq 'S'} <tr> <td>{$v.title}:</td> <td>{$v.value}</td> </tr> {/if} {/foreach} </table></td></tr> <tr><td valign="top"></td><td valign="top"></td></tr> </table> <table cellSpacing="0" cellPadding="3" width="90%" border="0"> {assign var="is_header" value=""} {foreach from=$_userinfo.additional_fields item=v} {if $v.section eq 'A'} {if $is_header eq ''} <tr> <td colspan="3"></td> </tr> <tr> <td width="45%" height="25">{$lng.lbl_additional_information}</td> <td colspan="2" width="55%"></td> </tr> <tr> <td> <table cellSpacing="0" cellPadding="0" width="90%" border="0"> {assign var="is_header" value="E"} {/if} <tr valign="top"> <td>{$v.title}</td> <td>{$v.value}</td> </tr> {/if} {/foreach} {if $is_header eq 'E'} </table></td> <td colspan="2" width="55%"></td> </tr> {/if} {if $config.Email.show_cc_info eq "Y" and $show_order_details eq "Y"} <tr> <td colspan="3"></td> </tr> <tr> <td width="45%" height="25">{$lng.lbl_order_payment_details}</td> <td colspan="2" width="55%"></td> </tr> <tr> <td colspan="3">{$order.details|replace:"\n":" "}</td> </tr> {/if} {if $order.netbanx_reference} <tr> <td colspan="3">NetBanx Reference: {$order.netbanx_reference}</td> </tr> {/if} </table> {include file="mail/html/order_data.tpl"} {if $active_modules.Anti_Fraud eq '' && $show_order_details eq "Y" && ($usertype eq 'A' || ($usertype eq 'P' && $active_modules.Simple_Mode))} {$lng.txt_warning_antifraud_disabled}</p> {/if} {$lng.txt_thank_you_for_purchase} </div>
__________________
Product: X-Cart Gold
Current version: 4.0.14

Additional Mods: X-Affiliate
Reply With Quote
  #2  
Old 11-07-2005, 02:14 PM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default

Looks like a great mod! Good work! ill have to check it out.
__________________
X-Cart: 4.0.13 [Linux]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:52 AM.

   

 
X-Cart forums © 2001-2020