{"id":457,"date":"2015-04-21T10:17:59","date_gmt":"2015-04-21T09:17:59","guid":{"rendered":"http:\/\/dknzdesign.com\/?p=457"},"modified":"2015-04-23T11:58:49","modified_gmt":"2015-04-23T10:58:49","slug":"how-to-get-general-email-address","status":"publish","type":"post","link":"https:\/\/dknzdesign.com\/sl\/blog\/magento\/how-to-get-general-email-address\/","title":{"rendered":"Kako pridobiti splo\u0161ne e-po\u0161tne naslove?"},"content":{"rendered":"<p>Magento store the email addresses like sales, stores, order etc in the admin -&gt; System -&gt; Configuration -&gt; Store Email Addresses. It is needed some time to get those email addresses to use somewhere in the custom email template or somewhere on the pages or on our custom script on the store. Here I am writing some sample code to get the values of those email addresses.<\/p>\n<p><strong>General Contact<\/strong><\/p>\n<pre class=\"php\" style=\"font-family: monospace\"><span style=\"color: #666666;font-style: italic\">\/* Sender Name *\/<\/span>\r\necho $name = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_general\/name'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span> \r\n<span style=\"color: #666666;font-style: italic\">\/* Sender Email *\/<\/span>\r\necho $email = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_general\/email'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/pre>\n<p><strong>Sales Representative<\/strong><\/p>\n<pre class=\"php\" style=\"font-family: monospace\"><span style=\"color: #666666;font-style: italic\">\/* Sender Name *\/<\/span>\r\necho $name = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_sales\/name'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span> \r\n<span style=\"color: #666666;font-style: italic\">\/* Sender Email *\/<\/span>\r\necho $email = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_sales\/email'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/pre>\n<p><strong>Customer Support<\/strong><\/p>\n<pre class=\"php\" style=\"font-family: monospace\"><span style=\"color: #666666;font-style: italic\">\/* Sender Name *\/<\/span>\r\necho $name = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_support\/name'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span> \r\n<span style=\"color: #666666;font-style: italic\">\/* Sender Email *\/<\/span>\r\necho $email = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_support\/email'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/pre>\n<p><strong>Custom Email 1<\/strong><\/p>\n<pre class=\"php\" style=\"font-family: monospace\"><span style=\"color: #666666;font-style: italic\">\/* Sender Name *\/<\/span>\r\necho $name = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_custom1\/name'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span> \r\n<span style=\"color: #666666;font-style: italic\">\/* Sender Email *\/<\/span>\r\necho $email = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_custom1\/email'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/pre>\n<p><strong>Custom Email 2<\/strong><\/p>\n<pre class=\"php\" style=\"font-family: monospace\">\u00a0\r\n<span style=\"color: #666666;font-style: italic\">\/* Sender Name *\/<\/span>\r\necho $name = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_custom2\/name'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span> \r\n<span style=\"color: #666666;font-style: italic\">\/* Sender Email *\/<\/span>\r\necho $email = Mage<span style=\"color: #339933\">::<\/span><span style=\"color: #004000\">getStoreConfig<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">'trans_email\/ident_custom2\/email'<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;\r\n<\/span><\/pre>\n<p>You can easily get the store email addresses from the sample codes provided above.<\/p>","protected":false},"excerpt":{"rendered":"<p>Magento shrani e-po\u0161tne naslove, kot so prodaja, trgovine, naro\u010dila itd., v admin -&gt; System -&gt; Configuration -&gt; Store Email Addresses. Potrebujemo nekaj \u010dasa, da te e-po\u0161tne naslove uporabimo nekje v e-po\u0161tni predlogi po meri ali nekje na straneh ali v na\u0161em skriptu po meri v trgovini. Tukaj sem\u2026<\/p>","protected":false},"author":2,"featured_media":458,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[87,88,89,90],"_links":{"self":[{"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/posts\/457"}],"collection":[{"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/comments?post=457"}],"version-history":[{"count":10,"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/posts\/457\/revisions"}],"predecessor-version":[{"id":468,"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/posts\/457\/revisions\/468"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/media\/458"}],"wp:attachment":[{"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/media?parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/categories?post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dknzdesign.com\/sl\/wp-json\/wp\/v2\/tags?post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}