0

We have a "{{config path variable" like below and I am seeing the following:

This variable {{config path='web/unsecure/base_url'}} is visible in email templates and in newsletter templates

But not or sometimes in custom variables (HTML)

{{config path='web/unsecure/base_url'}}

With sometimes I mean sometimes. It looks like it has something to do with other variables that are or aren't found in the same template ... Please find some examples below


Question: has anyone experienced something similar before?


Some tests I conducted

TEST 1

Created an empty email template with the following 3 links, where TEST123 contains the same first 3 links:

{{config path='web/unsecure/base_url'}}

{{config path='snh/emailsettings/headerfnt'}}

{{store url''}}

________________________

{{customVar code=TEST123}}

The result is that var 1-2-3 do print, but 4-5-6 do not

TEST 2

Created an empty email template with the following 3 links, where TEST123 contains the same first 3 links:

    {{customVar code=TEST123}

________________________

{{config path='web/unsecure/base_url'}}

    {{config path='snh/emailsettings/headerfnt'}}

    {{store url''}}

The result is that var 1-2-3-4-5-6 do print


Conclusion so far My conclusion is that apparently there is something to do with the order of variables being found. customvars need to be found and processed BEFORE other variables are found. I am digging through Varien filter & Core Template to find some logic as to why

  • 1
    but what gets outputted? Blank? Have a look in the database core_variable tables. Are your custom variables saved correctly, or possible escaped/altered in some way? – ProxiBlue Aug 8 '13 at 15:51
  • Updated question – snh_nl Aug 9 '13 at 7:45
1

It's probably your database entries.

Take a look at core_config_data:

SELECT `value` FROM `core_config_data` WHERE `path` = 'snh/emailsettings/headerfnt';

If it does return something, then it'd be a scope problem then. Check if scope and scope_id checks out (global, website, store level?). Safest way to go is default and 0, respectively.

If it does not return anything, then you need to insert something for this. You obviously probably know now what to insert, right?

| improve this answer | |
  • tested what exactly? there are a bunch of stuff to test above. – Seth Jeremi Malaki Aug 9 '13 at 7:06
  • Tested if the config value was set up correct. And it is. – snh_nl Aug 9 '13 at 7:46
0

This seems to be known in Magento. Posted in bugs/features.

| improve this answer | |
0

Unfortunately magento2 supports only specific list of configurations to use in email template as config path.

To use your custom config path in email template you need to override the core functionality.

Below article explained it very well.

https://gordonlesti.com/magento-2-email-template-config-directives/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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