1

I need to change

logo_url

for transactional emails with external link, for example

https://exampledomainname.com/image.png

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

1 Answer 1

0

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}}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.