I need to change
logo_url
for transactional emails with external link, for example
but I can't hardcode all or even one file in
app/locale
Is there any way to add external url as logo_url? As when I go here:
System > Configuration > General > Design > Transactional Emails
I can only add image to hosting area
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}}
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.