Adding My Own .tpl File

I cretaed an addon and add shipping_statuses.php under to app/addons/My_addon_name/controllers/frontend/



Here I use the code below:



Mailer::sendMail(array(
'to' => "mail@test.com",
'from' => 'company_orders_department',
'data' => array(
'shipment' => $shipment,
'order_info' => "",
),
'tpl' => 'shipments/shipment_products.tpl',
'company_id' => "",
), 'J', $lang_code);




I don't want to use 'tpl' => 'shipments/shipment_products.tpl'. instead of “shipments/shipment_products.tpl” I want to use my own .tpl file. What should I do? Where shoul I locate my .tpl file and what code should I use above?

You can use the following format:



'tpl' => 'addons/your_addon/shipment_products.tpl'




If you will use area C (not J), the path to the files will be



design\themes\THEME\mail\templates\addons\your_addon\shipment_products.tpl



If you will use area A (not J), the path to the files will be



design\backend\mail\templates\addons\your_addon\shipment_products.tpl



File shipment_products_sub.tpl from the same directory will be used as subject

[quote name=‘eComLabs’ timestamp=‘1420732002’ post=‘201981’]

You can use the following format:


<br />
'tpl' => 'addons/your_addon/shipment_products.tpl'<br />

```<br />
<br />
If you will use area C (not J), the path to the files will be<br />
<br />
design\themes\THEME\mail\templates\addons\your_addon\shipment_products.tpl<br />
<br />
If you will use area A (not J), the path to the files will be<br />
<br />
design\backend\mail\templates\addons\your_addon\shipment_products.tpl<br />
<br />
File shipment_products_sub.tpl from the same directory will be used as subject<br />
[/quote]<br />
Thanks a lot. Great answer as always. <img src="upload://rA9Qa8gnUPZzRZRdI8kt3dpjkrs.png" class="bbc_emoticon" alt=":)">