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

Modifying invoice template

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-15-2009, 02:51 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Question Modifying invoice template

Before 4.2.x this was way easier it seems but now ...

How can you change the order of the columns in the 'products ordered' table on the invoice?

See attachment to get the idea

Just can't figure out hows this is done with 4.2.x, order_data.tpl looks way different than before and doesn't provide clues ...
Attached Thumbnails
Click image for larger version

Name:	invoice_modification.jpg
Views:	184
Size:	141.0 KB
ID:	1664  
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #2  
Old 09-15-2009, 05:02 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Modifying invoice template

order_data.tpl is still in a table format it's just a matter of moving the <td>'s where you want them to
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 09-15-2009, 05:07 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Modifying invoice template

I don't see any table coding, are you sure?

Maybe I'm looking at the wrong order_data.tpl, there are more than one it seems, can you point out which one you mean?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #4  
Old 09-15-2009, 05:11 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Modifying invoice template

Part of order_data.tpl from 4.2.1
Code:
{* $Id: order_data.tpl,v 1.40 2008/11/26 13:16:26 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} <div {if $is_nomail eq 'Y'}class="invoice-products-title"{else}style="font-size: 14px; font-weight: bold; text-align: center"{/if}>{$lng.lbl_products_ordered}</div> <table {if $is_nomail eq 'Y'}cellspacing="1" class="invoice-products"{else}cellspacing="0" cellpadding="3" width="100%" border="1"{/if} summary="{$lng.lbl_products|escape}"> <tr> <th {if $is_nomail ne 'Y'}bgcolor="#cccccc"{/if}>No</th> <th {if $is_nomail eq 'Y'}class="invoice-sku-column"{else}width="60" bgcolor="#cccccc"{/if}>{$lng.lbl_sku}</th> <th {if $is_nomail ne 'Y'}bgcolor="#cccccc"{/if}>{$lng.lbl_product}</th> {if $order.extra.tax_info.display_cart_products_tax_rates eq "Y" and $_userinfo.tax_exempt ne "Y"} <th {if $is_nomail eq 'Y'}class="invoice-tax-column"{else}nowrap="nowrap" width="100" bgcolor="#cccccc"{/if}> {if $order.extra.tax_info.product_tax_name ne ""} {$order.extra.tax_info.product_tax_name} {else} {$lng.lbl_tax} {/if} </th> {/if} <th {if $is_nomail eq 'Y'}class="invoice-price-column"{else}nowrap="nowrap" width="100" bgcolor="#cccccc" align="center"{/if}>{$lng.lbl_item_price}</th> <th {if $is_nomail eq 'Y'}class="invoice-quantity-column"{else}width="60" bgcolor="#cccccc"{/if}>{$lng.lbl_quantity}</th> <th {if $is_nomail eq 'Y'}class="invoice-total-column"{else}width="60" bgcolor="#cccccc"{/if}>{$lng.lbl_total}</th> </tr> {foreach from=$products item=product name=count} <tr> <td>{$smarty.foreach.count.iteration}.</td> <td {if $is_nomail eq 'Y'}class="invoice-price-column"{else}align="center"{/if}>{$product.productcode}</td> <td {if $is_nomail eq 'Y'}class="invoice-product-column"{/if}> <span{if $is_nomail ne 'Y'} style="font-size: 11px;"{/if}>{$product.product}</span> {if $product.product_options ne '' && $active_modules.Product_Options} <table summary="{$lng.lbl_products_options|escape}"> <tr> <td {if $is_nomail ne 'Y'}valign="top"{/if}><strong>{$lng.lbl_options}:</strong></td> <td>{include file="modules/Product_Options/display_options.tpl" options=$product.product_options options_txt=$product.product_options_txt force_product_options_txt=$product.force_product_options_txt}</td>
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 09-15-2009, 05:12 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Modifying invoice template

Is it the one in skin1/mail/html/ ?
Does this control all occurances of the invoice?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #6  
Old 09-15-2009, 05:13 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Modifying invoice template

Yes that's the one
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 09-15-2009, 05:34 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Modifying invoice template

Thanks for the help, I'll start tweaking that one
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 02:17 AM.

   

 
X-Cart forums © 2001-2020