X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Add a product thumbnail to tell-a-friend email & invoice (https://forum.x-cart.com/showthread.php?t=11342)

TBone 01-20-2010 11:54 PM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
Works great! Thanks Jon.


Quote:

Ive tried it in 4.1.9 and it works great but puts the image under tthe product description. I would like to know what code is needed to resize the thumbnails, as not all my thumbnails are the same size, and makes the invoice huge.

Just replace the image_x and image_y values. I use image_x="50" image_y="50". If your images are 'HUGE' this means that your normal product images are not well optimized. Maybe you should give that some attention.

gita 04-18-2010 05:24 AM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
Does this work in 4.3?
Thanks
Gita

adriant 06-03-2010 08:02 AM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
None of these seemed to work for me in 4.3 so decided to fiddle about with and see if I can get it going.

It would appear to me that the current code is for images that are held in the database, I may be wrong.

Also when you look at the code from the 'sent' email, it appears that it is not sending the complete url for the site.

Here is what I did, it may be clumsy, my apologies.

in mail/html/send2friend.tpl
added the following line above {$product.descr}<br />

{include file="stf_product_thumbnail.tpl" productid=$product.productid product=$product.product}</a>

Then I made a copy of

skin1/product_thumbnail.tpl

and called it

stf_product_thumbnail.tpl

then on the line that reads

image.php?type={$type|default:"T"}&amp;id={$produc tid}

I changed it to

http:\\www.your-url.eu\your-dir\image.php?type={$type|default:"T"}&amp;id={$pr oductid}

and it seems to work.

* I just previewd this message and the editor seems to have put an odd space the word 'productid' - there shouldn't be a space *

isaels@i-artsupplies.co.u 06-16-2010 07:27 AM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
Well guess what,

Ive tried all these and nothing works!!8O

adriant 06-16-2010 07:48 AM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
You could go to my site:
http://www.serpro.eu/shop1

click on a product and its full details and then send yourself a 'send to friend' and see what happens.

I send them to myself all the time as customers want product details by email when they call for a quote.

Phoenixone 10-22-2010 02:33 AM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
Tried all these too and no success
4.2.3

adriant 06-29-2011 12:09 AM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
Having upgraded to 4.4 needed to make it work for that version.

None of our images are held in the database, they are all files.

Here is what I did.

in skin/common_files/mail/html/send2friend.tpl
added the following line above {$product.descr}<br />

{include file="stf_product_thumbnail.tpl" productid=$product.productid product=$product.product}</a>

Then in skin/common_files/ created a file called

stf_product_thumbnail.tpl

containing;

{*
$Id: stf_product_thumbnail.tpl,v 1.0 2011/06/29 08:57:58 joy Exp $vim: set ts=2 sw=2 sts=2 et:
*}
{strip}
<img src="{$http_location}/image.php?id={$productid}" width="150">
{/strip}

---------------------
Have just done this on 4.5 and it works perfectly for me. You can test it on the site.

minfinger 04-21-2012 07:37 AM

Re: Add a product thumbnail to tell-a-friend email & invoice
 
I used this http://www.websitecm.com/articles/x-cart-product-images-on-x-cart-invoices-and-emails/

I'm trying to do this on my 4.3 site and I get the following error when I switch an order to Processed. It worked fine on my test site.

This is in the spot where the image should be

Warning: require_once(/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/littlepu/public_html/admin/auth.php on line 44

Fatal error: require_once() [function.require]: Failed opening required '/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/littlepu/public_html/admin/auth.php on line 44


All times are GMT -8. The time now is 08:04 AM.

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