![]() |
Add a product thumbnail to tell-a-friend email & invoice
I thought it would be nice if tell-a-friend email's, besides a description and link, also a thumbnail of the product showed.
Therefore I put the following code into skin1/mail/html/send2friend.tpl : Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"} Which results in: http://home.zonnet.nl/jumpers/tellafriend.jpg I did the same with skin1/mail/html/order_data.tpl which results in: http://home.zonnet.nl/jumpers/invoice.jpg Now customers can see a thumbnail of the product they ordered in the invoice which shows up in checkout and orderstatus. Only problem is the order comfirmation email. Somehow the thumbnail(s) of the ordered product(s) won't show up. It just shows the "no image available" thumbnail. Same goes for the wishlist email, btw. http://home.zonnet.nl/jumpers/invoice_email.jpg Furthermore, I would like to reduce the size of the thumbnails. Not for the whole shop, but only for the thumbs when they used for the above. I hope that somebody else finds a way that the order comfirmation email also shows a thumb of the product. Any advise how to reduce the thumbnails is also welcome. Thanks! |
Nice work Jerrad. I can't help you with the images in the e-mail (it is hard enough getting the images in the store to function correctly!) but I think I can help you with the resizing issue. Try replacing this:
Code:
image_x=$product.image_x image_y=$product.image_y with this: Code:
image_x=100 Where 100 is whatever number you want the x dimension to be. You could also get rid of the x variable and set the dimension for y as well. This worked fine for me in products.tpl, I don't see why it shouldn't work in the e-mail templates. Just a thought! |
Thanks for the compliment and for your help, balinor!
Resizing the thumbnails the way you described works great! :D I've changed the 100 into 50 so that the thumbs still show the products good enough but don't blow up the whole email and invoice layout. http://home.zonnet.nl/jumpers/invoice_2.jpg I really hope that somebody know or can figure out why the thumbs won't show up in the order confirmation email. Thanks again! |
Great MOD!
|
Thanks alot, adpboss!
But it would be a really great mod if we could do the same with the order confirmation & wishlist emails. Don't you think so? Maybe you can look into it... :wink: |
No problemo!
Order confirmation = ADP task # 9784 Wishlist email = ADP task # 9785 I should be able to get to these in 2007. Bookmark this thread! ;) :D |
Great! Shall I contact you in 2007 or just wait till you pm me? :wink:
|
LOL. I'll post. Just don't switch cart software befoe 2k7 ok?
|
you would need to refer to the php file that displys the image if using code outside of xcart
have a look at how its done in the generate html links option when you search products in admin |
Thanks for the reply, shan!
I just took a look between the admin php files 8O but could you please be so kind to point me to the file that generates the html links? Furthermore; the product thumbnail in the tell-a-friend emails does show up, so the used code for generating thumbs does work outside x-cart. It's only not working for the comfirmation and wishlist emails. EDIT: In skin1/admin/main I found product_links.tpl which contains the code that produces the html thumbnail link Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product full_url="y"} But it makes no difference when I use this code instead of the code mentioned in my first post... :cry: Therefore I took a look at the source code of the emails and noticed the following: Working tell-a-friend email - Code:
<td width="160" align="center"><font face="Verdana" size="2">[img]cid:t_132.jpg[/img]</font> Not working comfirmation email - Code:
<TD align="center" width="110">[img]cid:image.php[/img]</font> The first one finds the right thumbnail and the second email has a empty IMG id, only has a image.php and therefore shows the not-available-image (?) But strange enough it does show the right product name... Any thoughts/ideas about this, shan or anybody else? |
Hi, did you ever figured this out? I have the same issue with 4.0.11 - Invoce looks just fine, send to friend and order email - no image, thanks, Andy
|
Hi andreas.
I've had no luck solving this. But the way I did it the tell-a-friend email works properly - complete with product thumbnail. The emails without images are the order email and wishlist email. A few days ago walteis posted a topic with something simular, with the difference that he managed to have a wishlist email which 'only' misses the first image. The rest of the products al have images! You can find it here: http://forum.x-cart.com/viewtopic.php?t=16841 No idea what causes this and it's a pity that nobody else seems to know it either. |
Ok, got it to work, but it's really, really ugly.
In mail/html/sendall2friend.tpl add this code: Code:
<!-- where xxxxxx is a product that we no longer sell but is still in the database. In reality, xxxxxx just has to be a product ID that is NOT in the products array coming into the wishlist. I chose an old product to ensure that it would never be in that array. I don't like this kludge one bit, but working is better than not working, eh? Walt |
Hi walteis,
Didn't the code in my first post work for you? Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"} With this code the tell-a-friend email shows a product thumbnail. |
That's the code I used from the start - but if you recall the first one would never display. The little kludge I gave above will solve that problem.
Walt |
But tell a friend emails can only include one product and wishlist
emails can have several products. Please correct me if I'm wrong. |
Ah, I see the problem - I listed the wrong template. It should be wishlist_sendall2friend.tpl.
Good catch. Walt |
Aha, now I understand the mix-up :lol:
But I'm not sure where to put the code in the email template and what to use for the "xxxxxx" product id. Is it possible you show your wishlist_sendall2friend.tpl? And did you tried this yet with the order comfirmation email? Thanks, walteis :D :D |
Ok, here's my wishlist_sendall2friend.tpl:
Code:
{* $Id: wishlist_sendall2friend.tpl,v 1.3.2.1 2004/10/21 07:51:07 max Exp $ *} We just created a dummy product (16193) to use. HTH, Walt |
Thanks alot walteis, got the wishlist email working now! :D :D
Any idea if it will work this way with the order comfirmation email? |
well, thanks for the effort. I'll give it a shot when I have a little spare time, right now I'm in work up to the elbows...thanks guys, Andy
|
Hi walteis,
I've tried to implement your code into the comfirmation email, but without any succes of course... :lol: Any idea of your code could work like it did for the wishlist emails, or is the logic totally different? Any advise is more then welcome! |
Jerrad,
Really don't know about the confirmation emails. We re-did ours but didn't try to put images in them. Sorry, Walt |
I don't see a image any idea's
Does anyone know why i do not see a image? I'm using the standaard send2friend in x-cart 4.0.14.
Thanks |
CUstomer E-mail receipt
Has anyone gotten the thumbnail to show up in the Customer notification E-mail yet???
|
Unfortunately, still trying without any succes...
|
Re: CUstomer E-mail receipt
Quote:
|
Unfortunately I haven't solved this.
I "managed" to get thumbnails with "no image available" displayed in the customer notification email, but that's it... I still hope that anyone else can fix this and get the product thumbs working in the notification email. |
It was nice to give it a try tho...thank you anyways~
|
Wouldn't this depend on whether the image was in the databas or in the file system?
I would imagine with the security of xcart right now, that the images in the databas would not show easily, however if they wer ein the file system, they might just do as described. Has anyone looked into this? |
All my images are already in the file system.
Displaying product thumbails for the "tell a friend"-emails works great, it simply won't work with the confirmation emails... Any ideas or suggestions? |
no sorry,
I would have thought that the same code inserts would do the trick. I just thought the image location may be causing the issues. |
Jerrad,
I tried your code in 4.0.14 and the picture shows a placeholder but not the actual image. Is there a difference with version 4.0.14? Also, how do I get it to pull the picture externally from a server on the internet rather then embedding it in the message, so spam engines etc don't assume its spam or junk mail. Any ideas? Thanks! |
did anybody get this to work on the order confirmation email?
thumbnails in the order confirmation email |
Re: Add a product thumbnail to tell-a-friend email & invoice
Guys, how can I get this to work with product options as well?
It works great with the product, but I also need it to show the product option as well. Any ideas? |
Re: Add a product thumbnail to tell-a-friend email & invoice
Here is the code I used to add the product image to the email invoice, this actually adds an image colum too.
First of two entries: Code:
<TH bgColor="#cccccc">{$lng.lbl_product}</TH> Then on the same file find: Code:
{* include file="product_thumbnail.tpl" productid=$product.productid image_x=$config.Appearance.thumbnail_width product=$product.product tmbn_url=$product.tmbn_url *} On v4.1.7 its L45 to 47 you could vary the width as well just change the "75" value above. Enjoy! |
Re: Add a product thumbnail to tell-a-friend email & invoice
I tried this mod in 4.1.9 Gold and it didn't seem to work. Does anyone know how to get this to work for this version of x-cart?
Quote:
|
Re: Add a product thumbnail to tell-a-friend email & invoice
Quote:
try it with product.variantid and type=W or a combo of one or the other... Code:
{include file="product_thumbnail.tpl" productid=$product.variantid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="W"} |
Re: Add a product thumbnail to tell-a-friend email & invoice
I am a little confused as to what you mean. I copied the code as you put it an it didn't work. What do you mean by
"try it with product.variantid and type=W or a combo of one or the other..." |
Re: Add a product thumbnail to tell-a-friend email & invoice
Here is my sendtofriend code with the code you gave me, it isn't working, should I do something different?
Code:
{* $Id: send2friend.tpl,v 1.3.2.1 2006/11/29 09:31:11 max Exp $ *} |
All times are GMT -8. The time now is 11:46 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.