Pulling the Thumbnail Image into "Send To Friend"

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Pulling the Thumbnail Image into "Send To Friend"

Post by aaronfrankel » Mon Jun 30, 2008 2:57 pm

Can anyone tell me what I need to call the thumbnail image for the "Send product to friend" email template?

sacards.com
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Wed Jun 04, 2008 1:45 am

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by sacards.com » Sun Jul 06, 2008 11:59 pm

good one .. any idea ?

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by m_plugables » Mon Jul 07, 2008 3:25 am

you can try the following code by putting it in the Email template where you want to show the Thumbnail.

Code: Select all

<img src='${product.ThumbnailUrl}' border="0" />
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by aaronfrankel » Mon Jul 07, 2008 10:42 am

mazhar wrote:you can try the following code by putting it in the Email template where you want to show the Thumbnail.

Code: Select all

<img src='${product.ThumbnailUrl}' border="0" />
Close, but did not work for email. It called the URL. However, it was relative and had the ~. So I added the following

Code: Select all

<img src='${store.StoreUrl}${product.ThumbnailUrl}' border="0" />
But I could not get rid of the ~ which meant I got this.

Code: Select all

http://www.DOMAINNAMEHERE.com~/Assets/ProductImages/59523FO_t.gif
Any further ideas?

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by jmestep » Mon Jul 07, 2008 6:11 pm

I just ran across this in the googlebase feed sample code on the wiki- it takes the ~/ problem into consideration for those URLs

url = product.NavigateUrl;
if (url.StartsWith("~/"))
{
url = url.Substring(2);
}
url = storeUrl + url;
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by m_plugables » Tue Jul 08, 2008 1:43 am

Thanks Judy...
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

sacards.com
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Wed Jun 04, 2008 1:45 am

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by sacards.com » Tue Jul 08, 2008 1:46 am

thanks judy ... can this be used within the email template ?

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by m_plugables » Tue Jul 08, 2008 3:15 am

thanks judy ... can this be used within the email template ?
Use the following code in Email template

Code: Select all

#if ($Product.ThumbnailUrl.Substring(0,2) == "~/")
    $Store.StoreUrl+$Product.ThumbnailUrl.Substring(2);
    <img src='${Store.StoreUrl}${Product.ThumbnailUrl.Substring(2)}' border="0" />
#else
    <img src='${Store.StoreUrl}${Product.ThumbnailUrl}' border="0" />
#end
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by aaronfrankel » Tue Jul 08, 2008 10:25 am

mazhar wrote:
thanks judy ... can this be used within the email template ?
Use the following code in Email template

Code: Select all

#if ($Product.ThumbnailUrl.Substring(0,2) == "~/")
    $Store.StoreUrl+$Product.ThumbnailUrl.Substring(2);
    <img src='${Store.StoreUrl}${Product.ThumbnailUrl.Substring(2)}' border="0" />
#else
    <img src='${Store.StoreUrl}${Product.ThumbnailUrl}' border="0" />
#end
That did not work for me. However, after some poking (I don't know ASP) this did.

Code: Select all

#if ($product.ThumbnailUrl.Substring(0,2) == "~/")
    <a href="${store.StoreUrl}/Product.aspx?ProductId=${product.ProductId}"><img src='$store.StoreUrl/$product.ThumbnailUrl.Substring(2)' border="0" /></a>
#else
    <img src='${store.StoreUrl}${product.ThumbnailUrl}' border="0" />
#end
Also making these lower case seemed to make a difference.

Code: Select all

${product.
${store.

Here is my complete code for anyone who wants it. I really hated the email templates. They looked like they had not been updated in many versions.

Code: Select all

<html>
<head>
<style type="text/css">
body {
	margin-left:auto;
	margin-right:auto;
	text-align:center;
}
h1 {
	font-size: 16px;
}
TABLE.Email {
width: 650px;
padding: 5px;
margin: 0px;
border: 1px solid #CCCCCC;
}
TABLE.Email TH {
font-weight: bold;
font-size: 12px;
color: #ffffff;
font-family: Arial, Verdana, Sans-Serif;
font-style: strong;
background-color: #304FBA;
text-align: center;
text-decoration: none;
padding: 5px;
}
TABLE.Email TD {
font-weight: normal;
font-size: 12px;
color: #000000;
font-family: Arial, Verdana, Sans-Serif;
background-color: #ffffff;
text-align: left;
text-decoration: none;
padding: 3px;
}
.head {
	border-bottom: solid 2px #0066FF;
}
.message {
	background-color:#FFFFCC;
	border: dashed 1px #CCCCCC;
	margin-left: 15px;
	margin-right: 15px;
	padding: 10px;
}
</style>
</head>
<body>
<table border="0" align="center" cellspacing="0" class="Email">
  <tr>
    <td class="head"><img src="http://www.frankelcostume.com/App_Themes/FCCI_Theme/images/logo.gif" alt="Frankel's Costume"></td>
    <td class="head" style="text-align:right; color:#CCCCCC; font-size: 1.5em;">You Might Like  </td>
  </tr>
  <tr>
    <td colspan="2">
		<h1>Hello, </strong></h1>
	<p><strong>${fromName}</strong> found this at ${store.Name} and thought you might find it of interest.</p>
	<p><a href="${store.StoreUrl}/Product.aspx?ProductId=${product.ProductId}">$product.Name</a></p>

	<p>

#if ($product.ThumbnailUrl.Substring(0,2) == "~/")
    <a href="${store.StoreUrl}/Product.aspx?ProductId=${product.ProductId}"><img src='$store.StoreUrl/$product.ThumbnailUrl.Substring(2)' border="0" /></a>
#else
    <img src='${store.StoreUrl}${product.ThumbnailUrl}' border="0" />
#end
	</p>

	<p><hr></p>
	<p>${fromName} at ${fromEmail} requested that we send this e-mail.</p>
	<p><strong><a href="${store.StoreUrl}">$store.Name</a></strong><br />
	$store.DefaultWarehouse.FormatAddress(true)</p>
	</td>
  </tr>
</table>
</body>
</html>

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by aaronfrankel » Tue Jul 08, 2008 12:19 pm

Also, after a poking the order confirmation email code with a sharp stick for a couple of hours this morning, I have come up with code to pull the Icon images into the order confirmation email. May need some cleaning up as, again, I don't know what I am doing with ASP. However, after testing it works and the image is linked to the product's page on the web site. Yes, I also tested it with multiple items in the order and it worked just fine.

Code: Select all

				#if ($orderItem.product.IconUrl.Substring(0,2) == "~/")
					<a href="${store.StoreUrl}/Product.aspx?ProductId=${orderItem.ProductId}">
						<img src='$store.StoreUrl/$orderItem.product.IconUrl.Substring(2)' border="0" />
					</a>
				#else
					<p>Image Not Available</p>
				#end
The hardest part was figuring this bit out.

Code: Select all

$orderItem.product.
Hope this is useful to someone else as well.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by jmestep » Tue Jul 08, 2008 3:19 pm

Yes, it is useful and thank you. It was on my list of things to do.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by aaronfrankel » Fri Jul 18, 2008 11:25 am

Instead of the description line, can anyone tell me how to pull the "variant" that was chosen instead? IE small, medium, large, black, white, etc etc.

gregglbk
Ensign (ENS)
Ensign (ENS)
Posts: 12
Joined: Tue Feb 05, 2008 11:53 am

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by gregglbk » Fri Aug 22, 2008 9:59 am

I added this code to my template and it works to some email systems. It does not display the image in gmail anyone have any ideas? I've tried different things and it still does not work.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by jmestep » Fri Aug 22, 2008 11:59 am

I tried it and it's actually a gmail setting. On the email I got, I clicked "display images below" or you can also check "always display images from xxxxx"
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Road Rider
Commander (CMDR)
Commander (CMDR)
Posts: 144
Joined: Sat Jan 26, 2008 12:43 pm
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by Road Rider » Mon Oct 13, 2008 10:37 am

This is exactly what I am looking for, however where in the "order confirmation template" code do I insert this?
Doug Morrison
Director of Marketing and eCommerce
Bike Authority
http://www.bikeauthority.com

User avatar
Road Rider
Commander (CMDR)
Commander (CMDR)
Posts: 144
Joined: Sat Jan 26, 2008 12:43 pm
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by Road Rider » Mon Oct 13, 2008 1:03 pm

Never mind I got it.

Thanks all.
Doug Morrison
Director of Marketing and eCommerce
Bike Authority
http://www.bikeauthority.com

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by aaronfrankel » Wed Nov 12, 2008 10:09 am

aaronfrankel wrote:Instead of the description line, can anyone tell me how to pull the "variant" that was chosen instead? IE small, medium, large, black, white, etc etc.
Did anyone ever figure this out?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by mazhar » Wed Nov 12, 2008 1:04 pm

Instead of the description line, can anyone tell me how to pull the "variant" that was chosen instead? IE small, medium, large, black, white, etc etc.
I think it is possible if you send an Email manually. Here is a post about how to send an Email template manually.
viewtopic.php?f=42&t=8571
You can load a variant depending upon the option choices and then send the Email template manually by passing it the product variant information.

aaronfrankel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Wed May 07, 2008 1:44 pm
Location: Houston, TX
Contact:

Re: Pulling the Thumbnail Image into "Send To Friend"

Post by aaronfrankel » Thu Nov 13, 2008 5:55 pm

mazhar wrote:
Instead of the description line, can anyone tell me how to pull the "variant" that was chosen instead? IE small, medium, large, black, white, etc etc.
I think it is possible if you send an Email manually. Here is a post about how to send an Email template manually.
viewtopic.php?f=42&t=8571
You can load a variant depending upon the option choices and then send the Email template manually by passing it the product variant information.
Looking for automation.

Post Reply