{"id":186691,"date":"2021-04-12T15:14:18","date_gmt":"2021-04-12T13:14:18","guid":{"rendered":"https:\/\/guide.jtl-software.com\/variables-for-email-templates\/"},"modified":"2023-08-08T13:24:23","modified_gmt":"2023-08-08T11:24:23","slug":"variables-for-email-templates","status":"publish","type":"page","link":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/","title":{"rendered":"Variables for email templates"},"content":{"rendered":"<div class=\"wpb-content-wrapper\">[vc_row][vc_column width=&#8221;1\/3&#8243; responsive=&#8221;{&#8220;col&#8220;: &#8220;12&#8220;, &#8220;order-md&#8220;: &#8220;1&#8220;, &#8220;col-lg&#8220;: &#8220;4&#8220;, &#8220;order-lg&#8220;: &#8220;12&#8220;}&#8221; advanced=&#8221;{&#8220;class&#8220;: &#8220;&#8220;, &#8220;hash&#8220;: &#8220;&#8220;}&#8221;]<div id=\"toc\">\n\t<div class=\"card border-0 bg-rysywhite mt-0 mt-lg-5 mb-5 w-100\" data-toc-element>\n\t\t<div class=\"d-none d-lg-flex flex-column\">\n\t\t\t<span class=\"fa-layers mx-auto mt--4 fa-fw fa-3x text-shaftblue\">\n\t\t\t\t<span class=\"fas fa-circle\"><\/span>\n\t\t\t\t<span class=\"fas fa-inverse fa-list-ul\" data-fa-transform=\"shrink-8\"><\/span>\n\t\t\t<\/span>\n\t\t\t<span class=\"font-weight-bold text-shaftblue text-center h5 mt-3 mb-0\">Contents<\/span>\n\t\t<\/div>\n\t\t<div class=\"d-block d-lg-none\">\n\t\t\t<a class=\"text-decoration-none card-header-link collapsed\" data-toggle=\"collapse\" href=\"#collapse-toc\" aria-expanded=\"false\" aria-controls=\"collapse-toc\">\n\t\t\t\t<div class=\"card-header d-flex bg-white align-items-center\" role=\"tab\" id=\"heading-toc\">\n\t\t\t\t\t<span class=\"h4 mb-0 d-flex align-items-center\">\n\t\t\t\t\t\t<span class=\"fa-layers fa-fw fa-2x mr-2 text-shaftblue\">\n\t\t\t\t\t\t\t<span class=\"fas fa-circle\"><\/span>\n\t\t\t\t\t\t\t<span class=\"fas fa-inverse fa-list-ul\" data-fa-transform=\"shrink-8\"><\/span>\n\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<span>Contents<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<span class=\"flex-shrink-0 ml-auto fas fa-caret-down text-gray\"><\/span>\n\t\t\t\t<\/div>\n\t\t\t<\/a>\n\t\t<\/div>\n\t\t<div id=\"collapse-toc\" class=\"collapse show\" data-parent=\"#toc\" role=\"tabpanel\" aria-labelledby=\"heading-toc\">\n\t\t\t<div class=\"card-body p-4 table-of-content\">\n\t\t\t\t<ul data-toc-headings=\"h2,h3\" data-toc class=\"list-shop\"><\/ul>\n\t\t\t<\/div>\n\t    <\/div>\n\t<\/div>\n<\/div>[\/vc_column][vc_column responsive=&#8221;{&#8220;col&#8220;: &#8220;12&#8220;, &#8220;col-md&#8220;: &#8220;8&#8220;, &#8220;order-md&#8220;: &#8220;12&#8220;, &#8220;order-lg&#8220;: &#8220;1&#8220;}&#8221; width=&#8221;2\/3&#8243; advanced=&#8221;{&#8220;class&#8220;: &#8220;&#8220;, &#8220;hash&#8220;: &#8220;&#8220;}&#8221;]<h1 class=\"d-flex align-items-center hl-shop\" id=\"variables-for-email-templates\">Variables for email templates <span id='anchor-variables-for-email-templates' data-href='#variables-for-email-templates' class='far fa-link' data-anchor><\/span><\/h1>\t<p>In the email templates, variables provided by the online shop system can be queried in <a class=\"external text\" href=\"http:\/\/www.smarty.net\/docsv2\/de\/language.syntax.variables.tpl\"  target='_blank' rel='noopener noreferrer' rel=\"nofollow noopener noreferrer\">Smarty syntax<\/a>. Depending on the email template and the intended use, the variables differ.<\/p>\n\t<p>Usually, certain objects (e.g. {$Kunde} (customer)) with properties ( e.g. {$Kunde-&gt;cName} (Customer &gt; Name)) are available for an email template.<\/p>\n<p>For a test, you can have all objects available in an email template and their properties output in a corresponding test email.<br \/>\nTo do this, install the plugin jtl-debug. Detailed information about the plug-in can be found <a href=\"https:\/\/gitlab.com\/jtl-software\/jtl-shop\/plugins\/jtl_debug\">here<\/a>.<\/p>\n<p>This plug-in offers the option <span class=\"highlight\">Alle verf\u00fcgbaren Smarty-Variablen an Body von Mails anh\u00e4ngen<\/span> (Show all available Smarty variables in email bodies). The option allows you to output the objects and their properties in this test email.<\/p>\n\t\t\t\t\t\t<div data-gallery>\n\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/guide.jtl-software.com\/uploads\/plugin-manager-jtl-debug-smarty-jtl-shop-5-1.png\" itemprop=\"contentUrl\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/guide.jtl-software.com\/uploads\/plugin-manager-jtl-debug-smarty-jtl-shop-5-1-1024x183.png\" srcset=\"https:\/\/guide.jtl-software.com\/uploads\/plugin-manager-jtl-debug-smarty-jtl-shop-5-1.png 1600w,https:\/\/guide.jtl-software.com\/uploads\/plugin-manager-jtl-debug-smarty-jtl-shop-5-1-1024x183.png 1024w,https:\/\/guide.jtl-software.com\/uploads\/plugin-manager-jtl-debug-smarty-jtl-shop-5-1-768x137.png 640w\" width=\"1024\" sizes=\"auto, (max-width: 20em) 30vw, (max-width: 30em) 60vw, (max-width: 40em) 90vw\" height=\"183\" alt=\"Smarty feature in JTL-Debug plugin for JTL-Shop 5\" data-pswp=\"{&quot;src&quot;:&quot;https:\\\/\\\/guide.jtl-software.com\\\/uploads\\\/plugin-manager-jtl-debug-smarty-jtl-shop-5-1.png&quot;,&quot;w&quot;:1901,&quot;h&quot;:340}\" class=\"img-fluid mb-5\">\n\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<h2 class=\"d-flex align-items-center hl-wawi\" id=\"variables-in-the-text-of-email-templates\">Variables in the text of email templates <span id='anchor-variables-in-the-text-of-email-templates' data-href='#variables-in-the-text-of-email-templates' class='far fa-link' data-anchor><\/span><\/h2>\t<p>Example using the <span class=\"highlight\">Customer receives credit<\/span> template:<\/p>\n<div data-codecopy=\"1\" class=\"media-item\">\n\t<div class=\"media-object\">\n\t\t<span class=\"fa-stack fa-stacksize-2x\">\n\t\t\t<span class=\"far fa-circle fa-stack-2x text-shop\"><\/span>\n\t\t\t<span class=\"fas fa-code fa-stack-1x text-shop\"><\/span>\n\t\t<\/span>\n\t<\/div>\n\t<div class=\"media-content\">\n\t\t<pre><code class=\"rounded bg-rysywhite p-5 shell\">{includeMailTemplate template=header type=html}\n\nDear {if $Kunde-&gt;cAnrede == &quot;w&quot;}{else}{\/if} {$Kunde-&gt;cAnredeLocalized} {$Kunde-&gt;cNachname},&lt;br&gt; \n&lt;br&gt; \nwe are happy to tell you that we have left a voucher for you in your customer account.&lt;br&gt; \n&lt;br&gt; \n&lt;strong&gt;Voucher value:&lt;\/strong&gt; {$Gutschein-&gt;cLocalizedWert}&lt;br&gt; \n&lt;br&gt; \nReason for issuing the voucher: {$Gutschein-&gt;cGrund}&lt;br&gt; \n&lt;br&gt; \nYou can use this voucher for your next purchase. The sum will then be deducted from the purchase value.&lt;br&gt; \n&lt;br&gt; \nEnjoy your next purchase with us!&lt;br&gt; \n&lt;br&gt; We hope to see you soon &lt;br&gt; at {$Firma-&gt;cName}\n\n{includeMailTemplate template=footer type=html}\n<\/code><\/pre>\n\t\t<span class=\"fas fa-paste text-shaftblue copy-btn\"><\/span>\n\t<\/div>\n<\/div>\n\n\t<p>Let us assume that the values of the variables are as follows:<\/p>\n<div data-codecopy=\"1\" class=\"media-item\">\n\t<div class=\"media-object\">\n\t\t<span class=\"fa-stack fa-stacksize-2x\">\n\t\t\t<span class=\"far fa-circle fa-stack-2x text-shop\"><\/span>\n\t\t\t<span class=\"fas fa-code fa-stack-1x text-shop\"><\/span>\n\t\t<\/span>\n\t<\/div>\n\t<div class=\"media-content\">\n\t\t<pre><code class=\"rounded bg-rysywhite p-5 shell\">            [Kunde] =&gt; stdClass Object\n                (\n                    [cAnrede] =&gt;  w\n                    [cAnredeLocalized] =&gt; Miss\n                    [cNachname] =&gt;  Doe\n                )\n            [Gutschein] =&gt; stdClass Object\n                (\n                    [cLocalizedWert] =&gt;  5,00 Euro\n                    [cGrund] =&gt;  Birthday\n                )\n            [Firma] =&gt; stdClass Object\n                (\n                    [cName] =&gt;  Example shop\n                )\n\n<\/code><\/pre>\n\t\t<span class=\"fas fa-paste text-shaftblue copy-btn\"><\/span>\n\t<\/div>\n<\/div>\n\n\t<p>Using the template, this results in the following credit email.<\/p>\n<div data-codecopy=\"1\" class=\"media-item\">\n\t<div class=\"media-object\">\n\t\t<span class=\"fa-stack fa-stacksize-2x\">\n\t\t\t<span class=\"far fa-circle fa-stack-2x text-shop\"><\/span>\n\t\t\t<span class=\"fas fa-code fa-stack-1x text-shop\"><\/span>\n\t\t<\/span>\n\t<\/div>\n\t<div class=\"media-content\">\n\t\t<pre><code class=\"rounded bg-rysywhite p-5 shell\">Dear Miss Doe,&lt;br&gt;\n&lt;br&gt;\nwe are happy to tell you that we have left a voucher for you in your customer account.&lt;br&gt;\n&lt;br&gt;\n&lt;strong&gt;Voucher value:&lt;\/strong&gt; 5,00 Euro&lt;br&gt;\n&lt;br&gt;\nReason for issuing the voucher: Birthday&lt;br&gt;\n&lt;br&gt;\nYou can use this voucher for your next purchase. The sum will be deducted from your purchase value.&lt;br&gt;\n&lt;br&gt;\nEnjoy your next purchase with us! &lt;br&gt;\n&lt;br&gt; We hope to see you soon &lt;br&gt; at Example Shop<\/code><\/pre>\n\t\t<span class=\"fas fa-paste text-shaftblue copy-btn\"><\/span>\n\t<\/div>\n<\/div>\n\n<h2 class=\"d-flex align-items-center\" id=\"variables-for-the-subject-line\">Variables for the subject line <span id='anchor-variables-for-the-subject-line' data-href='#variables-for-the-subject-line' class='far fa-link' data-anchor><\/span><\/h2>\t<p>You can use the following variables for the subject line:<\/p>\n<div data-codecopy=\"1\" class=\"media-item\">\n\t<div class=\"media-object\">\n\t\t<span class=\"fa-stack fa-stacksize-2x\">\n\t\t\t<span class=\"far fa-circle fa-stack-2x text-shop\"><\/span>\n\t\t\t<span class=\"fas fa-code fa-stack-1x text-shop\"><\/span>\n\t\t<\/span>\n\t<\/div>\n\t<div class=\"media-content\">\n\t\t<pre><code class=\"rounded bg-rysywhite p-5 shell\">#kunde.rabatt#\n#kunde.guthaben#\n#kunde.anrede#\n#kunde.anredelocalized#\n#kunde.titel#\n#kunde.vorname#\n#kunde.nachname#\n#kunde.firma#\n#kunde.strasse#\n#kunde.hausnummer#\n#kunde.plz#\n#kunde.ort#\n#kunde.land#\n#kunde.tel#\n#kunde.fax#\n#kunde.mail#\n#kunde.ustid#\n#kunde.bundesland#\n#kunde.adresszusatz#\n#kunde.mobil#\n#kunde.geburtstag#\n#kunde.www#\n#kunde.passwortklartext#\n\n\n---\n\n#bestellung.guthaben#\n#bestellung.gesamtsumme#\n#bestellung.bestellnr#\n#bestellung.versandinfo#\n#bestellung.tracking#\n#bestellung.kommentar#\n#bestellung.versandartname#\n#bestellung.zahlungsartname#\n#bestellung.status#\n#bestellung.versanddatum#\n#bestellung.erstellt#\n#bestellung.bezahltdatum#\n#bestellung.logistiker#\n#bestellung.trackingurl#\n#bestellung.versanddatum_de#\n#bestellung.bezahldatum_de#\n#bestellung.erstelldatum_de#\n#bestellung.versanddatum_en#\n#bestellung.bezahldatum_en#\n#bestellung.erstelldatum_en#\n#bestellung.bestellwertlocalized#\n#bestellung.warensumme#\n#bestellung.versand#\n#bestellung.zahlungstyp#\n#bestellung.estimateddelivery#\n#bestellung.waehrungsfaktor#\n#bestellung.estimateddeliveryex#\n\n\n---\n\n#firma.name#\n#firma.unternehmer#\n#firma.strasse#\n#firma.hausnummer#\n#firma.plz#\n#firma.ort#\n#firma.land#\n#firma.tel#\n#firma.fax#\n#firma.email#\n#firma.www#\n#firma.kontoinhaber#\n#firma.blz#\n#firma.kontonr#\n#firma.bank#\n#firma.ustid#\n#firma.steuernr#\n#firma.iban#\n#firma.bic#\n\n\n---\n\n#kundengruppe.name#\n#kundengruppe.rabatt#\n#kundengruppe.standard#\n#kundengruppe.shoplogin#\n#kundengruppe.nettopreise#<\/code><\/pre>\n\t\t<span class=\"fas fa-paste text-shaftblue copy-btn\"><\/span>\n\t<\/div>\n<\/div>\n\n[\/vc_column][\/vc_row]<\/div>","protected":false},"excerpt":{"rendered":"Contents Contents Variables for email templates In the email templates, variables provided by the online shop system can be queried <a href=\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/\">[...]<\/a>","protected":false},"author":2,"featured_media":0,"parent":187885,"menu_order":711,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","footnotes":""},"tags":[],"class_list":["post-186691","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Variables for email templates &#8211; JTL-Guide<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Variables for email templates &#8211; JTL-Guide\" \/>\n<meta property=\"og:url\" content=\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/\" \/>\n<meta property=\"og:site_name\" content=\"JTL-Guide\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-08T11:24:23+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/\",\"url\":\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/\",\"name\":\"Variables for email templates &#8211; JTL-Guide\",\"isPartOf\":{\"@id\":\"https:\/\/guide.jtl-software.com\/en\/#website\"},\"datePublished\":\"2021-04-12T13:14:18+00:00\",\"dateModified\":\"2023-08-08T11:24:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/#breadcrumb\"},\"inLanguage\":\"en-en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"JTL-Shop\",\"item\":\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"System administration\",\"item\":\"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Variables for email templates\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/guide.jtl-software.com\/en\/#website\",\"url\":\"https:\/\/guide.jtl-software.com\/en\/\",\"name\":\"JTL-Guide\",\"description\":\"Dokumentation f\u00fcr die gesamte Produktfamilie von JTL\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/guide.jtl-software.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-en\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Variables for email templates &#8211; JTL-Guide","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/","og_locale":"en_US","og_type":"article","og_title":"Variables for email templates &#8211; JTL-Guide","og_url":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/","og_site_name":"JTL-Guide","article_modified_time":"2023-08-08T11:24:23+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/","url":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/","name":"Variables for email templates &#8211; JTL-Guide","isPartOf":{"@id":"https:\/\/guide.jtl-software.com\/en\/#website"},"datePublished":"2021-04-12T13:14:18+00:00","dateModified":"2023-08-08T11:24:23+00:00","breadcrumb":{"@id":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/#breadcrumb"},"inLanguage":"en-en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/variables-for-email-templates\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"JTL-Shop","item":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/"},{"@type":"ListItem","position":2,"name":"System administration","item":"https:\/\/guide.jtl-software.com\/en\/jtl-shop\/system-administration\/"},{"@type":"ListItem","position":3,"name":"Variables for email templates"}]},{"@type":"WebSite","@id":"https:\/\/guide.jtl-software.com\/en\/#website","url":"https:\/\/guide.jtl-software.com\/en\/","name":"JTL-Guide","description":"Dokumentation f\u00fcr die gesamte Produktfamilie von JTL","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/guide.jtl-software.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-en"}]}},"_links":{"self":[{"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/pages\/186691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/comments?post=186691"}],"version-history":[{"count":5,"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/pages\/186691\/revisions"}],"predecessor-version":[{"id":227512,"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/pages\/186691\/revisions\/227512"}],"up":[{"embeddable":true,"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/pages\/187885"}],"wp:attachment":[{"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/media?parent=186691"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guide.jtl-software.com\/en\/wp-json\/wp\/v2\/tags?post=186691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}