Pulling the Thumbnail Image into "Send To Friend"
Posted: 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?
http://forums.ablecommerce.com/
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 followingmazhar 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" />
Code: Select all
<img src='${store.StoreUrl}${product.ThumbnailUrl}' border="0" />
Code: Select all
http://www.DOMAINNAMEHERE.com~/Assets/ProductImages/59523FO_t.gif
Use the following code in Email templatethanks judy ... can this be used within the 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.mazhar wrote:Use the following code in Email templatethanks judy ... can this be used within the 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
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
Code: Select all
${product.
${store.
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>
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
Code: Select all
$orderItem.product.
Did anyone ever figure this out?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.
I think it is possible if you send an Email manually. Here is a post about how to send an Email template manually.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.
Looking for automation.mazhar wrote:I think it is possible if you send an Email manually. Here is a post about how to send an Email template manually.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.
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.