Page 1 of 1
store logo in product tell a friend Email
Posted: Thu Jan 01, 2009 7:05 am
by mazhar
Dow load the attachment containing modified files for this change. Place the user control files into conlib. Then edit the Send Product to Friend.htm file and copy its contents and paste them into the Send Product To Friend Email template of store.
Re: store logo in product tell a friend Email
Posted: Mon Jul 20, 2009 2:33 pm
by ZLA
I tried adding
to an email template but it didn't come through. When I examined the eml file using notepad, it contained this:
Does ${logoUrl} actually work?
Re: store logo in product tell a friend Email
Posted: Tue Jul 21, 2009 3:44 am
by mazhar
It was a custom parameter, if you look at the code file before sending the Email I was adding this parameter to Email template's available parameter list, I am taking about following code part
Code: Select all
//Store Logo
string logoUrl = Token.Instance.Store.StoreUrl;
logoUrl += "App_Themes/"+Page.Theme + "/images/logo.gif";
template.Parameters["logoUrl"] = logoUrl;
Re: store logo in product tell a friend Email
Posted: Tue Jul 21, 2009 6:31 am
by ZLA
Doh!
In that case, couldn't I just use this instead:
Code: Select all
<img src="${Store.StoreUrl}/App_Themes/MyTheme/images/logo.gif" >
Since I want to add this to all of our email templates including those that are triggered automatically, I can't assign a custom parameter or I'd have to manually generate all emails. Hardcoding the name of the theme seems a reasonable compromise. (I assume there's no nVelocity variable for the current page theme, right?)
Re: store logo in product tell a friend Email
Posted: Tue Jul 21, 2009 6:38 am
by ZLA
Is it possible to access the store theme via $Store.Settings.StoreTheme?
Re: store logo in product tell a friend Email
Posted: Wed Jul 22, 2009 2:58 pm
by ZLA
StoreSettings work! To semi-dynamically add store logo to email templates, just include:
Code: Select all
<img src="${store.StoreUrl}App_Themes/${store.Settings.StoreTheme}/images/logo.jpg" />
where you have to specify the actual logo filename and its folder location. But this will work for any instance (Dev, Test or Prod) and any Theme as long as the file name is the same.
For those of us on 7.0.2 or before, here's some sql to add the logo at the top of the email:
Code: Select all
UPDATE ac_EmailTemplates SET
body = REPLACE(body
, '<body>', '<body>' + char(13) + char(10) +
'<img src="${store.StoreUrl}App_Themes/${store.Settings.StoreTheme}/images/logo.jpg" />' )
WHERE body LIKE '%<body>%'
UPDATE ac_EmailTemplates SET
body = '<img src="${store.StoreUrl}App_Themes/${store.Settings.StoreTheme}/images/logo.jpg" />' + char(13) + char(10) + body
WHERE body NOT LIKE '%<body>%'
There are two statements because the note added by customer or merchant templates are html fragments and don't have any a body tag.