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

Add a product thumbnail to tell-a-friend email & invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 02-17-2005, 02:53 PM
 
andreas04031 andreas04031 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: Dallas, TX
Posts: 64
 

Default

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
__________________
X-Cart version 3.5.9 (online)
X-Cart Version 4.0.19 (online)
X-Cart Version 4.1.3 (in dev)
PHP 4.4.4
MySQL 4.1.21
Reply With Quote
  #12  
Old 02-19-2005, 02:50 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

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.
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #13  
Old 02-19-2005, 02:47 PM
 
walteis walteis is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: USA
Posts: 65
 

Default

Ok, got it to work, but it's really, really ugly.

In mail/html/sendall2friend.tpl add this code:
Code:
<!-- { if $smarty.section.num.first} {include file="product_thumbnail.tpl" productid="xxxxxx" image_x=$wl_products[0].image_x image_y=$wl_products[0].image_y product=$wl_products[0].product full_url="Y" id="product_thumbnail"} {/if } -->

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
__________________
X-cart Gold 4.1.7 on Linux/Apache.
Reply With Quote
  #14  
Old 02-20-2005, 03:00 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

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.
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #15  
Old 02-20-2005, 06:03 AM
 
walteis walteis is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: USA
Posts: 65
 

Default

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
__________________
X-cart Gold 4.1.7 on Linux/Apache.
Reply With Quote
  #16  
Old 02-20-2005, 06:22 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

But tell a friend emails can only include one product and wishlist
emails can have several products.

Please correct me if I'm wrong.
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #17  
Old 02-20-2005, 06:44 AM
 
walteis walteis is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: USA
Posts: 65
 

Default

Ah, I see the problem - I listed the wrong template. It should be wishlist_sendall2friend.tpl.

Good catch.

Walt
__________________
X-cart Gold 4.1.7 on Linux/Apache.
Reply With Quote
  #18  
Old 02-20-2005, 07:27 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

Aha, now I understand the mix-up

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
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #19  
Old 02-20-2005, 08:28 AM
 
walteis walteis is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: USA
Posts: 65
 

Default

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 $ *} {config_load file="$skin_config"} <FONT size="2"> {$lng.eml_mail_header_part1} {$config.Company.company_name} {$lng.eml_mail_header_part2_wishlist} </FONT> {$lng.lbl_hello} {section name=num loop=$wl_products} {if $smarty.section.num.first} {$userinfo.firstname} {$userinfo.lastname} {if $smarty.section.num.total eq 1} {$lng.eml_has_recommended}: {else} {$lng.lbl_gift_registry_msg}: {/if} {/if} <HR noshade size="1"> <!-- { if $smarty.section.num.first} {include file="product_thumbnail.tpl" productid="16193" image_x=$wl_products[0].image_x image_y=$wl_products[0].image_y product=$wl_products[0].product full_url="Y" id="product_thumbnail"} {/if } --> <FONT color="#AA0000">{$wl_products[num].product}</FONT> <TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD> {$wl_products[num].fulldescr|truncate:250:"..."}</TD></TR></TABLE> {include file="product_thumbnail.tpl" productid=$wl_products[num].productid image_x=$wl_products[num].image_x image_y=$wl_products[num].image_y product=$wl_products[num].product full_url="Y" id="product_thumbnail"} {$lng.lbl_price}: <FONT color="#00AA00">{include file="currency.tpl" value=$wl_products[num].taxed_price|default:$wl_products[num].price}</FONT> {/section} <HR noshade size="1"> {$lng.eml_please_click_link}: {$catalogs.customer}/cart.php?mode=friend_wl&wlid={$wlid} {include file="mail/html/signature.tpl"}

We just created a dummy product (16193) to use.

HTH,

Walt
__________________
X-cart Gold 4.1.7 on Linux/Apache.
Reply With Quote
  #20  
Old 02-20-2005, 09:17 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

Thanks alot walteis, got the wishlist email working now!

Any idea if it will work this way with the order comfirmation email?
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 07:07 PM.

   

 
X-Cart forums © 2001-2020