Set different order email for each store view Mangento - configuration

I have two store views of my magento store. I want to set different email template with different logo for each store view. How can i do that? I searched for this but i found solution that work for only default store.
Any one can help me with this.
Thanks in Advance.

You can change logo and header and footer templates here.
_admin->system->configuration->Design->Transactional Emails
We can add more than one footers and header for that, go to
System > Transactional Emails->Add new template
[select templates as Email-footer or Email-header]
And add the contents which you want and save the template
then you can see your new footer and header which all you created here on
_admin->system->configuration->Design->Transactional Emails-> Email Header Template/Email Footer Template [drop down]
make the necessary changes against the store view and check
Change things for store views clear cache and check

Related

Email Template Dynamic Rendering

Developing email templates for a react application that basically populate basic information from app such as customer name and store name, then get sent to customer to log in to complete purchase process. The company has 4 brands so I created four separate email template with the appropriate logos and images. My question is, would it be possible/better to create just one template and use JS to load the correct images and text in? Or is it better to keep the four templates separate and create logic to determine which template to send?
If you know that you will never have to customize the content of each 4 separate brands' emails, you can use one file and dynamically populate the correct branding info. This will require you to write less code, so is a plus for efficiency and cleanliness.
However, that means you can't change the layout for one brand specifically if you need to. Unless you were to create another template for the actual body of the email which differs from brand to brand, which is basically the same as having 4 separate templates initially.
I would keep them separate to allow customization if you need it.

Storing html components in database

I want to store html components of my website in the database in order to let the user choose from a variety of components each time
for example :
one page styled html page with a navbar and about section that could be changed and other stuff , it's layout could contain the following :
<div id="nav-holder">
<!-- Nav html goes here -->
</div>
<div id="about-holder">
<!-- about section html goes here -->
</div>
<!-- other html stuff -->
My db now is structured to hold the template with it's possible components for each section , and is storing a 'text' in it's html column , and I am adding all my styling and scripting to one sheet and js file that is loaded for the whole layout.
Is there any best practice to store and render those components in my db ?
Edit :
My main purpose is to create a website generator with some customization , providing a set of templates that the user chooses and within one template he can customize his template by choosing different components (navs,about sections , ... )
Also I will grab the data from some place and fill it into those templates The user will not be able to modify the data here , it's ready already so there is no need to give the user the ability to modify the data that would be filled in the document
Is there any best practice to store and render those components in my
db ?
Yes, don't! For several reasons, the primary one being that you use your database to persistently store variables related to models. Not html. The place for your html is in your views, the place to make choices as to which html to show is in your controllers.
Other reasons include that reading your html from a database will slow down your apps responsiveness and Rails tends to make text from a database html safe, meaning it will not automatically behave as html. This is a security precaution as a very common attack is to insert 'bad' code into your database which then gets run when you recover it and supply it to an unsuspecting user.
Use partials. Reference section 3.4 of this Rails Guide
Save the users choices of components in the database. If he chooses navbar_23, you store that 9 character string in the database and on request, your template serves him the partial named _navbar_23.html.erb from your views folder.
For example, in your views folder, create a subfolder views/navbars, inside that place your variants of navbars. Partials start with an underscore and end with .html.erb
In your model, store the users choice of navbar in say user.navbar. Just the name, not the starting underscore or .html.erb
In your template;
render partial: "views/navbars/" + user.navbar
Rails will automagically add the underscore and .html.erb when it looks for the file.

Sending Data From One Page To The Other Page

I have a serious problem.
I have two pages (such as settingpage and MainPage). In settingpage, I have a switchbutton with two value (English and China)
I want when click on switchbutton don't navigate form page1 to page2 for sending data but I want change some data on page2 such as format number and ... without navigate or change page.
How I can do it?
Thanks.
There are a couple of ways with which you can achieve this.
Create a static variable on any of the pages and use it as PageName.variableName to access the variable or to set its value.
Use a singleton. http://msdn.microsoft.com/en-us/library/ff650316.aspx

Sendgrid Newsletter App Custom Tags

Anyone know of a doc with the default custom tags for email templates for Sendgrid? I know they have [UNSUB] and I'm using it.
I want Forward to Friend, View in Browser, etc...
I am uploading my own template code, not using the design editor. Do I have to create these? For view in browser, do I have to host my page and point to it?
Thanks
The tags for unsubscribe and view in browser should be [unsubscribe] and [weblink] respectively. Not sure why that's not documented, but I've opened up a ticket to get that fixed. Thanks for the heads up!
Edit:
I dug a little deeper and have a full list of built in tags:
weblink
email
unsubscribe
Also, if you define custom column headers on your lists, you can refer to those in the same manner. (Ex. If you add shoe size to each person in your list, you could do [shoe_size])
And the closing tip is that if you're editing in HTML-mode, you need to follow the full href convention:
<a href="[unsubscribe]" ...

SalesForce.com Display image in S-Control

I need to display an image in an S-Control is SFDC. I would like to be able to reference a static resource like <apex:image url="{!$Resource.TestImage}" />, but that only works in VisualForce pages and I have to modify and existing S-Control (switching to VF is not an option).
What's the best way to accomplish this, so frustrated with the general lack of documentation and hackishness of SFDC development.
Thanks all
You can upload your image to Documents tab and later use normal <img> tag to display it on S-Controls, Visualforce pages and email templates (last one - if this will be an "externally available image"). The generated URL to view it will look somewhat like
https://c.na7.content.force.com/servlet/servlet.FileDownload?file=015A0000001IFxZ
(my test org sits at na7.salesforce.com instance and the last part is gnerated object's ID)