Mam ten dziwny problem z e-mailami transakcyjnymi Magento. Mam te same pliki na moich serwerach lokalnych, programistycznych i produkcyjnych.
W Administrator> System> Transakcyjne wiadomości e-mail> Dodaj nowy szablon
Wybieram szablon z rozwijanego menu, zostawiam lokalny na angielski w USA. Pola nie są zapełniane na serwerach programistycznych i produkcyjnych, ale działa poprawnie na lokalnych. Myślałem, że to błąd uprawnień, ale po sprawdzeniu okazało się, że wywołanie ajax ładujące kod z pliku szablonu działa poprawnie:
Co może być nie tak?
/index.php/admin/system_email_template/defaultTemplate/key/7ac9c5866202e5cb29be84299bf2ebad/?isAjax=true
Response:
{
"template_type": 2,
"template_subject": "{{var store.getFrontendName()}}: Shipment # {{var shipment.increment_id}} update",
"orig_template_variables": "{\"store url=\\\"\\\"\":\"Store Url\",\"var logo_url\":\"Email Logo Image Url\",\"var logo_alt\":\"Email Logo Image Alt\",\"htmlescape var=$billing.getName()\":\"Guest Customer Name\",\"var order.increment_id\":\"Order Id\",\"var order.getStatusLabel()\":\"Order Status\",\"var comment\":\"Order Comment\",\"var store.getFrontendName()\":\"Store Name\"}",
"template_styles": "body,td { color:#2f2f2f; font:11px\/1.35em Verdana, Arial, Helvetica, sans-serif; }",
"template_text": "\n\n\n\n<script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(t,n,e){function r(e){if(!n[e]){var o=n[e]={exports:{}};t[e][0].call(o.exports,function(n){var o=t[e][1][n];return r(o?o:n)},o,o.exports)}return n[e].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<e.length;o++)r(e[o]);return r}({D5DuLP:[function(t,n){function e(t,n){var e=r[t];return e?e.apply(this,n):(o[t]||(o[t]=[]),void o[t].push(n))}var r={},o={};n.exports=e,e.queues=o,e.handlers=r},{}],handle:[function(t,n){n.exports=t("D5DuLP")},{}],G9z0Bl:[function(t,n){function e(){var t=l.info=NREUM.info;if(t&&t.agent&&t.licenseKey&&t.applicationID&&p&&p.body){l.proto="https"===f.split(": ")[0]||t.sslForHttp?"https: //":"http: //",i("mark",["onload",a()]);var n=p.createElement("script");n.src=l.proto+t.agent,p.body.appendChild(n)}}function r(){"complete"===p.readyState&&o()}function o(){i("mark",["domContent",a()])}function a(){return(new Date).getTime()}var i=t("handle"),u=window,p=u.document,s="addEventListener",c="attachEvent",f=(""+location).split("?")[0],l=n.exports={offset:a(),origin:f,features:[]};p[s]?(p[s]("DOMContentLoaded",o,!1),u[s]("load",e,!1)):(p[c]("onreadystatechange",r),u[c]("onload",e)),i("mark",["firstbyte",a()])},{handle:"D5DuLP"}],loader:[function(t,n){n.exports=t("G9z0Bl")},{}]},{},["G9z0Bl"]);</script><body style=\"background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;\">\n<div style=\"background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;\">\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" height=\"100%\" width=\"100%\">\n<tr>\n <td align=\"center\" valign=\"top\" style=\"padding:20px 0 20px 0\">\n <!-- [ header starts here] -->\n <table bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\" width=\"650\" style=\"border:1px solid #E0E0E0;\">\n <tr>\n <td valign=\"top\" style=\"background-color: #f4f4f4; text-align: center;\"><a href=\"{{store url=\"\"}}\"><img src=\"{{var logo_url}}\" alt=\"{{var logo_alt}}\" style=\"margin-bottom:10px;\" border=\"0\"\/><\/a><\/td>\n <\/tr>\n <!-- [ middle starts here] -->\n <tr>\n <td valign=\"top\">\n <h1 style=\"color: #f47321; font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;\">Dear {{htmlescape var=$billing.getName()}},<\/h1>\n <p style=\"font-size:12px; line-height:16px; margin:0 0 10px 0;\">\n Your order # {{var order.increment_id}} has been <br\/>\n <strong>{{var order.getStatusLabel()}}<\/strong>.\n <\/p>\n <p style=\"font-size:12px; line-height:16px; margin:0 0 10px 0;\">{{var comment}}<\/p>\n <p style=\"font-size:12px; line-height:16px; margin:0;\">\n If you have any questions, please feel free to contact us at\n <a href=\"mailto:{{config path='trans_email\/ident_support\/email'}}\" style=\"color:#1E7EC8;\">{{config path='trans_email\/ident_support\/email'}}<\/a>\n or by phone at {{config path='general\/store_information\/phone'}}.\n <\/p>\n <\/td>\n <\/tr>\n <tr>\n <td bgcolor=\"#f4f4f4\" align=\"center\" style=\"background:#f4f4f4; text-align:center;\"><center><p style=\"font-size:12px; margin:0;\">Thank you again, <strong style=\"color: #f47321;\">{{var store.getFrontendName()}}<\/strong><\/p><\/center><\/td>\n <\/tr>\n <\/table>\n <\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/body>",
"template_id": "sales_email_shipment_comment_guest_template",
"orig_template_code": "sales_email_shipment_comment_guest_template",
"template_variables": "{\"label\":\"Template Variables\",\"value\":[{\"value\":\"{{store url=\\\"\\\"}}\",\"label\":\"Store Url\"},{\"value\":\"{{var logo_url}}\",\"label\":\"Email Logo Image Url\"},{\"value\":\"{{var logo_alt}}\",\"label\":\"Email Logo Image Alt\"},{\"value\":\"{{htmlescape var=$billing.getName()}}\",\"label\":\"Guest Customer Name\"},{\"value\":\"{{var order.increment_id}}\",\"label\":\"Order Id\"},{\"value\":\"{{var order.getStatusLabel()}}\",\"label\":\"Order Status\"},{\"value\":\"{{var comment}}\",\"label\":\"Order Comment\"},{\"value\":\"{{var store.getFrontendName()}}\",\"label\":\"Store Name\"}]}",
"orig_template_used_default_for": [
]
}