Jump to content

built-in macro language


KSD
 Share

Recommended Posts

Hello,

 

I would like to know where I can get more info about the macro language (commands and syntax), CC is using within email templates.

I have tried some sample code like:

 

{if {$DATA.gateway}==Print_Order_Form}{True!}{/if}.

But it didn't work.

 

Link to comment
Share on other sites

I have tried this little example, but it didn't work. I added this code in

 

--------

<p>
 <span style="font-size: 14px;">Dann &uuml;berweisen Sie bitte den Gesamtbetrag an die gegebene Bankverbindung. </span></p>
<p>
 &nbsp;</p>
<p>
 {if $DATA.gateway eq 'Print_Order_Form'}Return form with payment.{/if}

</p>
<p>
 <span style="font-size: 14px;">Bitte bewahren Sie diese E-Mail f&uuml;r Ihre Unterlagen auf. Es ist m&ouml;glich, den Status Ihrer Bestellung online einzusehen.</span></p>
<p>

Edited by KSD
Link to comment
Share on other sites

Let us know which email template. Then we can make sure we have the correct spelling and have the correct array for which it can be found.

You might also try this -- add {debug} to the end of the email's contents. Even though the content will be sent out in an email, the Smarty debug data may be shown in a popup window, or it may be included in the email -- I forget which.

The debug data will show what we need to know.

Link to comment
Share on other sites

I used the 'order complete' email template.

Then I set one order to'completed' and I expected that an email is sent out.

Debug switch was set.

Same result. No email sent out.

 

<p>
 <span style="font-size: 14px;">Hallo {$DATA.first_name}&nbsp;{$DATA.last_name},</span></p>
<p>
 &nbsp;</p>
<p>
 <span style="font-size: 14px;">wir haben am {$DATA.ship_date} Ihre Bestellung Nummer {$DATA.cart_order_id} vom {$DATA.order_date} an {$DATA.first_name} {$DATA.last_name}nach {$DATA.SHIPPING.town} versandt.</span></p>
<p>
 <span style="font-size: 14px;">Im Express-Versand erwarten Sie die Lieferung in etwa 1-2 Arbeitstagen.</span></p>
<p>
 {if $DATA.gateway eq 'Pay On Delivery'}</p>
<p>
 Ihre Sendung wurde als Nachnahme-Sendung verschickt.</p>
<p>
 Bitte legen Sie den Gesamtbetrag der Bestellung &uuml;ber {$DATA.total} Euro schon einmal in bar f&uuml;r den Postboten zur Seite.</p>
<p>
 {/if}</p>
<p>
 <span style="font-size: 14px;">Die Nachverfolgungsnummer zu Ihrer Sendung lautet: {$DATA.ship_tracking}.</span></p>
<p>
 <span style="font-size: 14px;">Sie k&ouml;nnen Ihre Sendung <a href="https://www.deutschepost.de/sendung/simpleQuery.html">hier nachverfolgen</a>,</span></p>
<p>
 <span style="font-size: 14px;">Dort wird Ihnen auch der voraussichtliche Zustellungszeitpunkt genannt.</span></p>
<p>
 <span style="font-size: 14px;">Erfahrungsgem&auml;&szlig; dauert es bis zu 24 Stunden nach Versand, bevor Sie erste Informationen in der Nachverfolgung erhalten.</span></p>
<p>
 &nbsp;</p>
<p>
 <span style="font-size: 14px;">Sie haben Fragen?</span></p>
<p>
 <span style="font-size: 14px;">Wollen mal kl&ouml;nen oder ratschen?</span></p>
<p>
 <span style="font-size: 14px;">Rufen Sie an!</span></p>
<p>
 <span style="font-size: 14px;">Oder schreiben Sie uns!</span></p>
<p>
 &nbsp;</p>
<p>
 <span style="font-size: 14px;">Und nach Erhalt der Ware -&nbsp; lesen wir&nbsp;gern, ob Sie zufrieden waren oder ob Sie Dinge bem&auml;ngeln!&nbsp;</span></p>
<p>
 &nbsp;</p>
<p>
 {debug}</p>

Link to comment
Share on other sites

This is not the correct variable: {$DATA.SHIPPING.town}

Although this would not cause a fault, the correct variable is: {$SHIPPING.town}

As well as using the $DATA array to use elements that are in other arrays: {$SHIPPING.first_name}, {$SHIPPING.last_name}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...