X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Modifying invoice template (https://forum.x-cart.com/showthread.php?t=49689)

Warwick 09-15-2009 02:51 AM

Modifying invoice template
 
1 Attachment(s)
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 ...

cflsystems 09-15-2009 05:02 AM

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

Warwick 09-15-2009 05:07 AM

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?

cflsystems 09-15-2009 05:11 AM

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>


Warwick 09-15-2009 05:12 AM

Re: Modifying invoice template
 
Is it the one in skin1/mail/html/ ?
Does this control all occurances of the invoice?

cflsystems 09-15-2009 05:13 AM

Re: Modifying invoice template
 
Yes that's the one

Warwick 09-15-2009 05:34 AM

Re: Modifying invoice template
 
Thanks for the help, I'll start tweaking that one :)


All times are GMT -8. The time now is 03:26 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.