3

In email template files, there are these comments which obviously have some special meaning:

<!--@subject @-->
<!--@vars    @-->
<!--@styles  @-->
  1. How does Magento interpret these special comments?
  2. What is this JSON-like syntax and how does it work?

    {"store url=\"\"":"Store Url", "var logo_url":"Email Logo Image Url"}
    
  3. How do I determine if I have to use a $ when referring to variables?

    <td><a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" /></a></td>
    ...
    <h1>Deer, {{htmlescape var=$order.getCustomerName()}}</h1>
    
2
  1. This is a mini template language that I believe can be traced by looking through Mage_Core_Model_Email_Template if you specifically check out loadDefault you'll see those three patterns.
  2. This json like template'ing syntax is explained reasonably in the documentation.
  3. The available variables are listed in the above documentation. From there you should see which have the $ and which don't (I'm not entirely sure on the distinction).
| 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.