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

Add thumbnail image on email invoice.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 02-12-2010, 04:59 PM
  shipmerchant's Avatar 
shipmerchant shipmerchant is offline
 

eXpert
  
Join Date: Mar 2005
Posts: 361
 

Smile Add thumbnail image on email invoice.

I paid some Xcart points some time ago on this and thought I would share it with some. It will add a product thumbnail image on the email invoice. Makes packing orders easier anyway.

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

Or in your default Xcart Order_Data.tpl

Enjoy!

Code:
************* 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_rates 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_rates 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_rates eq "Y" and $_userinfo.tax_exempt ne "Y"*} <td align="center"> </td> {if $order.extra.tax_info.display_cart_products_tax_rates 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_rates eq "Y" and $_userinfo.tax_exempt ne "Y"} <td align="center">

Here is a screen shot as well. Enjoy!
Attached Thumbnails
Click image for larger version

Name:	email_invoice.jpg
Views:	449
Size:	19.3 KB
ID:	1860  
__________________
Mil Mascaras
Live Xcart Site #1-V- 4.1.8
Live Xcart site # 2-V 4.4.3
CDSEO Mod - Firetank MM30 - 7DANA- The bestTemplates!
Linux - EWD Host Servers awesome service!
AlteredCart One Page Checkout
Reply With Quote

The following 5 users thank shipmerchant for this useful post:
am2003 (03-26-2011), flyclothing (03-19-2010), Mr. G (12-23-2010), Pyro (02-12-2010), ramdial (03-06-2010)
  #2  
Old 02-12-2010, 05:21 PM
 
Pyro Pyro is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 506
 

Default Re: Add thumbnail image on email invoice.

Thanks for sharing! I'm not sure if I will use it, but i'm sure others will.



One question, do you print the image on the invoice that you give to customers or is this simply for you when you pack the boxes?
__________________
Best Wishes,
James

4.5.2 Gold (work in progress)
Reply With Quote
  #3  
Old 02-12-2010, 07:22 PM
  shipmerchant's Avatar 
shipmerchant shipmerchant is offline
 

eXpert
  
Join Date: Mar 2005
Posts: 361
 

Smile Re: Add thumbnail image on email invoice.

Quote:
Originally Posted by Pyro
One question, do you print the image on the invoice that you give to customers or is this simply for you when you pack the boxes?

Pyro,

this is on the invoice which is emailed to the customer upon the checkout process and yes in out case its the shipping invoice as well. Keeps everyone on the same page.
__________________
Mil Mascaras
Live Xcart Site #1-V- 4.1.8
Live Xcart site # 2-V 4.4.3
CDSEO Mod - Firetank MM30 - 7DANA- The bestTemplates!
Linux - EWD Host Servers awesome service!
AlteredCart One Page Checkout
Reply With Quote
  #4  
Old 02-13-2010, 08:29 PM
  SusanMoore's Avatar 
SusanMoore SusanMoore is offline
 

Advanced Member
  
Join Date: Aug 2006
Posts: 51
 

Default Re: Add thumbnail image on email invoice.

Thanks so much!

If this works in my 4.0.19 cart, I'll be overjoyed!
__________________
X-Cart Gold 4.0.19 -- finally LIVE!!
http://www.fanent.com
Reply With Quote
  #5  
Old 03-11-2010, 09:09 AM
 
jonduv jonduv is offline
 

Member
  
Join Date: Jan 2010
Posts: 27
 

Default Re: Add thumbnail image on email invoice.

Everything works great except when I go to print it out, the full size image prints. Is there any way to adjust this?

Thank you for your time,

Jon
__________________
Jon DuVall
Version - 4.30
Reply With Quote
  #6  
Old 03-11-2010, 09:23 AM
  shipmerchant's Avatar 
shipmerchant shipmerchant is offline
 

eXpert
  
Join Date: Mar 2005
Posts: 361
 

Default Re: Add thumbnail image on email invoice.

Quote:
Originally Posted by jonduv
Everything works great except when I go to print it out, the full size image prints. Is there any way to adjust this?

Thank you for your time,

Jon

Code:
<img src="{$http_location}/image.php?id={$product.productid}" width="75">

try changing the width="75" parameter
__________________
Mil Mascaras
Live Xcart Site #1-V- 4.1.8
Live Xcart site # 2-V 4.4.3
CDSEO Mod - Firetank MM30 - 7DANA- The bestTemplates!
Linux - EWD Host Servers awesome service!
AlteredCart One Page Checkout
Reply With Quote
  #7  
Old 03-11-2010, 09:32 AM
 
jonduv jonduv is offline
 

Member
  
Join Date: Jan 2010
Posts: 27
 

Default Re: Add thumbnail image on email invoice.

Thank you for the quick response. Would adding a style to this tag force it to print the smaller size? Possibly something like this?

<img src="{$http_location}/image.php?id={$product.productid}" width="80" style="width:80px; height:90px; padding-top:5px;">

Thanks
__________________
Jon DuVall
Version - 4.30
Reply With Quote
  #8  
Old 03-11-2010, 09:36 AM
  shipmerchant's Avatar 
shipmerchant shipmerchant is offline
 

eXpert
  
Join Date: Mar 2005
Posts: 361
 

Smile Re: Add thumbnail image on email invoice.

Quote:
Originally Posted by jonduv
Thank you for the quick response. Would adding a style to this tag force it to print the smaller size? Possibly something like this?

<img src="{$http_location}/image.php?id={$product.productid}" width="80" style="width:80px; height:90px; padding-top:5px;">

Thanks


Have not tried this since the posted code work on 2 carts 4.18 and 4.3.1. Why not try it out and post back your findings? Look forward to your reply
__________________
Mil Mascaras
Live Xcart Site #1-V- 4.1.8
Live Xcart site # 2-V 4.4.3
CDSEO Mod - Firetank MM30 - 7DANA- The bestTemplates!
Linux - EWD Host Servers awesome service!
AlteredCart One Page Checkout
Reply With Quote
  #9  
Old 03-19-2010, 06:38 AM
 
Freakmode Freakmode is offline
 

X-Adept
  
Join Date: Jun 2003
Location: UK
Posts: 696
 

Default Re: Add thumbnail image on email invoice.

Any ideas why my emails just have a box with a red dot in the order?
__________________
X-Cart 4.7.12 (Live)
Redux Template
CDSEO
Reply With Quote
  #10  
Old 03-19-2010, 09:37 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: Add thumbnail image on email invoice.

Very nice mod.
It's possible to display thumbnails invoice for admin side only ?

My goal is to see which ordered products has got images & which doesn't have.
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:29 PM.

   

 
X-Cart forums © 2001-2020