For logo:
There is an email var for that:
{{skin url="images/logo_email.gif" _area='frontend'}}
To make it your own, upload and replace logo_email.gif
For email variables:
Some of these exist by default:
General Store Email address:
{{config path="trans_email/ident_general/email"}}
Store Name:
{{config path="general/store_information/name"}}
Store Code is trickier. This is not exposed in the config to my knowledge for use by the email templates. I suggest using a custom template file, and refer this way:
{{block type="core/template" template="custom/storecode.phtml"}}
storecode.phtml:
<?php
echo Mage::app()->getStore()->getCode();
Alternatively, and maybe less-desirable, are Custom Variables.
Custom Variables
System > Custom Variable > Add New Variable
To Implement a custom variable into a Transactional Email, do the
following: In the Admin Panel, select System > Transactional Emails
Click the row of predefined template to edit or click [Add New
Template] button to create a new one. Create a new transactional email
first if needed. In the Template Content field, select a location for
your custom variable. Click [ Insert Variable ] and select the Custom
Variable you would like to insert.
Source: http://www.magentocommerce.com/knowledge-base/entry/creating-custom-variables
I know that you can include static blocks using e.g.:
{{block type="cms/block" block_id="static-block-id" }}
That block simply uses _toHtml()
to output the content from the static block.
protected function _toHtml()
{
$blockId = $this->getBlockId();
...
return $html;
}
Similarly, you could try and populate the _toHtml()
function with HTML in your module to output what ever you need to output. You cannot use PHP variables such as $order
to pass in your data for processing.
Best Answer
You have to create first block and defined function inside block for getting store name and store email, inside construct method pass
ScopeConfigInterface
objectCreate the method
getStoreName()
,getStoreEmail()
Call function inside your template file, like echo
$block->getStoreEmail()
andecho $block->getStoreName();