Guest Posted May 11, 2004 Share Posted May 11, 2004 I got my site to send out html based emails, designed just the way I want. It then occured to me, that showing the products' image in the emails sent y friends, will greatly increase the change of the receiver entering the site to see more info on it. I tryed making the needed modifications myself, but it seems like I could use a hand - this is what I've done: in catalog/tell_a_friend.php find $product_info_query = tep_db_query("select pd.products_name from and add the image address: $product_info_query = tep_db_query("select pd.products_name, p.products_image from next, find if (tep_not_null($message)) { $email_body .= $message . "\n\n"; } and after it, I added: // Show product image in email BOF $email_body .= tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . "\n"; // Show product image in email EOF For some reason or another, this doesn't work. I (accidentaly) tried: // Show product image in email BOF $email_body .= tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . "\n"; // Show product image in email EOF (calling the image without the path leading to it), and in the email I got a broken image. In other words, it kinda worked. Do any of you know why it doesn't work when I add the "HTTP_CATALOG_SERVER . DIR_WS_CATALOG ."? I'm sure this could be easily fixed, I just don't know how. and it's almost 02 AM. I gotta get some sleap. man... :blink: -Ethan Link to comment Share on other sites More sharing options...
Guest Posted May 18, 2004 Share Posted May 18, 2004 C'mon, guys! I'm sure some of you could find this useful, and might even be able to help me here! Think of it: instead of just a long URL, the receiving user will see an image of the recomended product. I think this alone would bring more traffic to the site! help? -Ethan Link to comment Share on other sites More sharing options...
Guest Posted May 22, 2004 Share Posted May 22, 2004 Hi y'all, I got it to work (no thatnks to you guys? what's with the team spirit?! :)) Anyway, here's the code I used: // Show product image in email BOF $email_body .= tep_image(HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . "\n"; // Show product image in email EOF Simply place that in catalog/tell_a_friend.php under if (tep_not_null($message)) { $email_body .= $message . "\n\n"; } Hope this helps someone, -Ethan Link to comment Share on other sites More sharing options...
FlyingMonkey Posted May 22, 2004 Share Posted May 22, 2004 I'll have to try that sometime. nice! Most likely your question has been answered, please do a search first. Link to comment Share on other sites More sharing options...
jjanguda Posted May 25, 2004 Share Posted May 25, 2004 Thanks Ethan, It's very useful tip. Link to comment Share on other sites More sharing options...
HerbDunn Posted May 31, 2004 Share Posted May 31, 2004 I just tried five different variations of your mod and couldn't get any of the m to send the image with it. I don't claim to be a programer so I'm not very adept at php.. Just what were the steps you took to make this work? Thanks Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2004 Share Posted May 31, 2004 Do you have your site sending out HTMP messages or plain text? If it's plain text, you'll have to change that. It's a little work on several files. Try to look for info about it on these forums. When I have time (somewhere in 2012), I will write a how-to about how to make the emails sent out formatted in HTML the way you want it to look. -Ethan Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.