{"id":1084,"date":"2009-09-02T16:32:00","date_gmt":"2009-09-02T08:32:00","guid":{"rendered":"http:\/\/fanhaijun.com\/?p=1084"},"modified":"2009-09-02T16:32:00","modified_gmt":"2009-09-02T08:32:00","slug":"how-to-change-the-magento-email-templates","status":"publish","type":"post","link":"https:\/\/fanhaijun.com\/?p=1084","title":{"rendered":"How to change the Magento Email Templates"},"content":{"rendered":"<p>You\u2019ll probably know by now that the transactional email templates in Magento are a bit, with respect, \u201cnaff\u201d. To edit through the admin will take forever and a day so here\u2019s a couple of useful solutions to help make things easier.<\/p>\n<h4>1. Locate the email templates<\/h4>\n<p>The Magento email templates are located in (note: \u201cen_US\u201d may change depending on language).<\/p>\n<p>magento\\app\\locale\\en_US\\template\\email\\account_new.html\u201d(24,48):    <br \/>magento\\app\\locale\\en_US\\template\\email\\admin_password_new.html\u201d(27,73):     <br \/>magento\\app\\locale\\en_US\\template\\email\\newsletter_subscr_confirm.html\u201d(28,69):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_creditmemo.html\u201d(23,63):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_creditmemo.html\u201d(75,62):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_invoice.html\u201d(23,63):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_invoice.html\u201d(75,62):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_new.html\u201d(23,63):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_new.html\u201d(79,62):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_shipment.html\u201d(23,63):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_shipment.html\u201d(81,62):     <br \/>magento\\app\\locale\\en_US\\template\\email\\order_update.html\u201d(26,52):     <br \/>magento\\app\\locale\\en_US\\template\\email\\password_new.html\u201d(24,41):     <br \/>magento\\app\\locale\\en_US\\template\\email\\wishlist_share.html\u201d(23,65):<\/p>\n<h4>2. Edit your information in<\/h4>\n<p>replace <strong>alt=\u201dMagento\u201d<\/strong> with <strong>alt=\u201dyour store name\u201d<\/strong><\/p>\n<p>replace <strong>Magento Demo Store<\/strong> with <strong>your store name<\/strong><\/p>\n<p>replace <strong>mailto:magento@varien.com<\/strong> with <strong>mailto:email@yourstore.com<\/strong><\/p>\n<p>replace <strong>dummyemail@magentocommerce.com<\/strong> with <strong>email@yourstore.com<\/strong><\/p>\n<p>replace <strong>(800) DEMO-STORE<\/strong> with <strong>(0800) YOUR STORE NUMBER<\/strong><\/p>\n<p>replace <strong>Monday &#8211; Friday, 8am &#8211; 5pm PST<\/strong> with <strong>your own store opening times and timezone<\/strong><\/p>\n<h4>3. Advanced &#8211; Automated Shell Script<\/h4>\n<p>Another option would be to create a shell script with all you\u2019re information in which goes through the directories in question and replaces text as we need. Note: You will need your Store View Name and Store Name to match your domain name.<\/p>\n<p>#!\/bin\/sh    <br \/>phone=(123)456-7890<\/p>\n<p>find app\/locale\/en_US\/template\/email\/sales -type f -exec sed -i \u2019s\/alt=\u201dMagento\u201d\/alt=\u201d{{var order.getStoreGroupName()}}\u201d\/g\u2019 {} \\;    <br \/>find app\/locale\/en_US\/template\/email\/sales -type f -exec sed -i \u2019s\/Magento Demo Store\/{{var order.getStoreGroupName()}} \/g\u2019 {} \\;     <br \/>find app\/locale\/en_US\/template\/email\/sales -type f -exec sed -i \u2019s\/mailto:magento@varien.com\/sales@{{var order.getStoreGroupName()}}\/g\u2019 {} \\;     <br \/>find app\/locale\/en_US\/template\/email\/sales -type f -exec sed -i \u2019s\/dummyemail@magentocommerce.com\/sales@{{var order.getStoreGroupName()}}\/g\u2019 {} \\;<\/p>\n<p>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u2019s\/alt=\u201dMagento\u201d\/alt=\u201d{{var customer.store.name}}\u201d\/g\u2019 {} \\;    <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u2019s\/Magento Demo Store\/{{var customer.store.name}} \/g\u2019 {} \\;     <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u2019s\/mailto:magento@varien.com\/sales@{{var customer.store.name}}\/g\u2019 {} \\;     <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u2019s\/dummyemail@magentocommerce.com\/sales@{{var customer.store.name}}\/g\u2019 {} \\;<\/p>\n<p>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u201cs\/(800)DEMO-STORE\/$phone\/g\u201d {} \\;    <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u201cs\/(800)DEMO-NUMBER\/$phone\/g\u201d {} \\;     <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u201cs\/(800) DEMO-NUMBER\/$phone\/g\u201d {} \\;     <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u201cs\/(800) DEMO-STORE\/$phone\/g\u201d {} \\;     <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u2019s\/Monday &#8211; Friday, 8am &#8211; 5pm PST\/24\u00d77\/g\u2019 {} \\;     <br \/>find app\/locale\/en_US\/template\/email -type f -exec sed -i \u2019s\/logo_email.gif\/logo.gif\/g\u2019 {} \\;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You\u2019ll probably know by now th&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[104],"tags":[209,211],"class_list":["post-1084","post","type-post","status-publish","format-standard","hentry","category-technogy","tag-magento","tag-magento-email-templates"],"_links":{"self":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/posts\/1084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1084"}],"version-history":[{"count":0,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=\/wp\/v2\/posts\/1084\/revisions"}],"wp:attachment":[{"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fanhaijun.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}