As far as I was looking into the web there is no best practice
way to directly rewrite logo_url
, but we can create custom variable and then use it into email templates. We can do it manually from admin or using programming way. My requirements is to implement this in programming way, so we start with shell script(shell\external_logo_url.php
) to create custom variable:
<?php
require_once '../abstract.php';
class External_Logo_Url extends Mage_Shell_Abstract
{
public function run()
{
$variable = Mage::getModel('core/variable')
->setCode('variable-code')
->setName('variable-name')
->setPlainValue('variable-value')
->save();
}
}
$shell = new External_Logo_Url();
$shell->run();
Also we need to change template files in app\locale
, so you need replace all template files or custom templates that you need. You should look for {{var logo_url}}
and replace with {{customVar code=variable-code}}
.