View Single Post
  #13  
Old 06-16-2010, 11:22 PM
  isaels@i-artsupplies.co.u's Avatar 
isaels@i-artsupplies.co.u isaels@i-artsupplies.co.u is offline
 

Advanced Member
  
Join Date: May 2010
Posts: 67
 

Default Re: Add thumbnail image on email invoice.

I have 4.3.1 and have tried both codes and dont seem to be able to get either to work. I take it I am supposed to repeace the code below into the relevant lines?

Quote:
************* Code for custom -- skin1/mail/html/order_data.tpl Version 4.3.1*************

You could also implement it on the great custom template found in http://forum.x-cart.com/showthread.php?t=42748&highlight=email+invoice


Line 12 ~ 17

<tr>
<th width="60" bgcolor="#cccccc">{$lng.lbl_sku}</th>
{*image on invoice*}
<th bgColor="#cccccc">{$lng.lbl_product}</th>
<th bgColor="#cccccc">{$lng.lbl_image}</th>
{if $order.extra.tax_info.display_cart_products_tax_ra tes eq "Y" and $_userinfo.tax_exempt ne "Y"}
<td align="center">
{*end*}
<th nowrap="nowrap" width="100" bgcolor="#cccccc">{if $order.extra.tax_info.product_tax_name ne ""}{$order.extra.tax_info.product_tax_name}{else}{ $lng.lbl_tax}{/if}</th>
{/if}


***Line 42 to 45***

<a href="{$catalogs.customer}/download.php?id={$product.download_key}" class="SmallNote" target="_blank">{$lng.lbl_download}</a>
{/if}
</td>
{* added line 42 ~ 45 to add product image on email invoice width adjustment*}
<TD align="center">
<img src="{$http_location}/image.php?id={$product.productid}" width="75">
</TD>
{*end*}
{if $order.extra.tax_info.display_cart_products_tax_ra tes eq "Y" and $_userinfo.tax_exempt ne "Y"}
<td align="center">



************* Code for Original -- Xcart Default skin1/mail/htmlorder_data.tpl Version 4.3.1*************

Line 12 ~ 17

<tr>
<th width="60" bgcolor="#cccccc">{$lng.lbl_sku}</th>
{*image on invoice*}
{*<th bgcolor="#cccccc">{$lng.lbl_product}</th>*}
<th bgColor="#cccccc">{$lng.lbl_product}</th>
<th bgColor="#cccccc">{$lng.lbl_image}</th>
{*if $order.extra.tax_info.display_cart_products_tax_ra tes eq "Y" and $_userinfo.tax_exempt ne "Y"*}
<td align="center">
</td>
{if $order.extra.tax_info.display_cart_products_tax_ra tes eq "Y"}
<td align="center">
{*end*}


Line 47 to 50


<a href="{$catalogs.customer}/download.php?id={$product.download_key}" class="SmallNote" target="_blank">{$lng.lbl_download}</a>
{/if}
</td>
{* added l 48 ~ 51 to add product image on email invoice width can be controlled also*}
<TD align="center">
<img src="{$http_location}/image.php?id={$product.productid}" width="75">
</TD>
{if $order.extra.tax_info.display_cart_products_tax_ra tes eq "Y" and $_userinfo.tax_exempt ne "Y"}
<td align="center">



This is my original code before making changes, and I have put quote boxes around the code I have replaced. Is this riight? I guess not as it no works!

Quote:
{*
$Id: order_data.tpl,v 1.51 2009/11/02 15:02:25 igoryan Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
<p {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}</p>
<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 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_ra tes 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}>

MY LINE 12 STARTS HERE
{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}
<tr>
<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.descr}</span>


{*BCSE Begin - Preorder Mod*}
{if $active_modules.BCSE_Preorder_Backorder}
{include file="modules/BCSE_Preorder_Backorder/order_data_product.tpl" product=$product}
{/if}
{*BCSE End*}

{if $product.product_type eq "C" and $product.display_price lt 0}
<span{if $is_nomail eq 'Y'} class="pconf-negative-price"{else} style="color:#b51800"{/if}> {$lng.lbl_pconf_discounted}</span>
{/if}
{if $active_modules.Gift_Registry}
{include file="modules/Gift_Registry/product_event_invoice.tpl"}
{/if}
{if $product.product_options ne '' && $active_modules.Product_Options}
<table summary="{$lng.lbl_product_options|escape}" cellpadding="0" cellspacing="0">
<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_o ptions_txt}
</td>
</tr>
</table>
{/if}
{if $active_modules.Egoods and $product.download_key and ($order.status eq "P" or $order.status eq "C")}
<br />

MY LINE 47 STARTS HERE
<a href="{$catalogs.customer}/download.php?id={$product.download_key}" target="_blank">{$lng.lbl_download}</a>
{/if}
</td>
{if $order.extra.tax_info.display_cart_products_tax_ra tes eq "Y" and $_userinfo.tax_exempt ne "Y"}
<td {if $is_nomail eq 'Y'}class="invoice-tax-column"{else}align="center"{/if}>
{foreach from=$product.extra_data.taxes key=tax_name item=tax}
{if $tax.tax_value gt 0}
<div>
{if $order.extra.tax_info.product_tax_name eq ""}
{$tax.tax_display_name}
{/if}
{if $tax.rate_type eq "%"}
{$tax.rate_value}%
{else}
{include file="currency.tpl" value=$tax.rate_value}
{/if}
</div>
{/if}
{/foreach}
</td>
{/if}
<td {if $is_nomail eq 'Y'}class="invoice-price-column"{else}align="right" nowrap="nowrap"{/if}>{include file="currency.tpl" value=$product.display_price display_sign=$product.price_show_sign}&nbsp;&nbsp; </td>
<td {if $is_nomail eq 'Y'}class="invoice-quantity-column"{else}align="center"{/if}>{$product.amount}</td>
<td {if $is_nomail eq 'Y'}class="invoice-total-column"{else}align="right" nowrap="nowrap" style="padding-right: 5px;"{/if}>
{multi assign="total" x=$product.amount y=$product.display_price|default:$product.price|de fault:0}
{include file="currency.tpl" value=$total display_sign=$product.price_show_sign}
</td>
</tr>
{/foreach}
{if $giftcerts ne ''}
{foreach from=$giftcerts item=gc}
<tr>

THERE IS MORE CODE AFTER THIS BUT HAVE NOT PUT IT IN!
__________________
Paul Wallace

X-Cart Gold 4.3.2
Php5.3.8
MySQL 5.1.56

Backorder/PreOrder
SEO All in one CDSEO
Wholesale Option Pricing
Gift Cert Recovery
Password Recovery
CompanyLogo Alt Tag
Smart Search - ALtered Cart
On Sale - Altered Cart
Sitemap
MM One page checkout
order page emailer

Remember Anomymous Carts
Website CM Speed Opitmisation

iartsupplies.co.uk
Reply With Quote