1

I'm looking to add an email template to make it available in the transactional emails templates list in back office.

I'm a newbie to magento 2 and a huge newbie to magento 1. My project is under V1.14.1.0

Actually I already made this task for a magento 2 project when i started learning the tech. But I don't know the M1 structure good enough to make it for a magento 1 project.

So here I am looking for some help as I can't really find any documentations (at least not that I'm able to understand properly).

So here are my questions

1 - Where is the location of the custom / new mail templates in magento 1 ? Magento 2 is in MODULE/view/frontend/email/my_mail_template.html

2 - Is the template syntax the same ?

This is what my email template file looks like in Magento 2.

<!--@subject Test subjects@-->
<!--@vars {
"var data.name":"Test Name"
} @-->

{{template config_path="design/email/header_template"}}

{{trans "Name: %name" name=$name}}

{{template config_path="design/email/footer_template"}}

3 - Where do I setup the configuration to let magento 1 see there is a new template ? Magento 2 was in MODULE/etc/email_templates.xml

And the content looked like this

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="my_mail_template" label="My mail" file="notification_question_template.html" type="html" module="Week2_TP" area="frontend"/>
</config>

4 - Once I've created my template, my main goal is to send it under some specific events. Like, if it remains only one month of subscription to an user, the mail will be sent to warn an user at this moment. How do we handle this under Magento 1 ? We need to setup some kind of cron task on the server ? I guess yes, but then how to setup this cron ? I guess magento provides services to do that ?

Thanks for your assistance. Sorry there is a lot of questions in one, but I rather explain the whole scope.

Your Answer

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

Browse other questions tagged or ask your own question.