Skip to content

Instantly share code, notes, and snippets.

@kellyjandrews
Last active August 29, 2015 14:04
Show Gist options
  • Save kellyjandrews/112f4f98cb33783d7fb0 to your computer and use it in GitHub Desktop.
Save kellyjandrews/112f4f98cb33783d7fb0 to your computer and use it in GitHub Desktop.
Guide Sample Scripts
%%{={{ }}=}%%
<html>
<head>
<style>
body {font-family: "Helvetica"}
h1,h2,h3,h4,h5,h6,p{padding: 0; margin:0;}
.header {padding-top:12px;}
</style>
</head>
<body>
{{> [myNTO Rewards Header]}}
<h1>Hello, {{[First Name]}}!</h1>
{{#if myNTO != "0"}}
<h2 class="header">myNTO Info</h2>
<hr>
<p><b>Number:</b>{{_subscriberkey}}</p>
<p>{{myNTO_Balance}} Points as of %%=FormatDate(Now(), "m/d/YY")=%%</p>
<p>{{myNTO_Status}} Member</p>
{{#else}}
<h2 class="header">You are not a member</h2>
{{/if}}
{{#with Order_Details}}
<h4 class="header">Order ID:{{OrderID}}</h4>
<hr />
{{#each Order_Details}}
{{#Products}}
<strong>Sku:</strong>{{sku}}<br>
<strong>Product Name:</strong> {{Product_Name}}<br>
<img src="{{Thumbnail_URL}}" /><br>
{{/Products}}
{{/each}}
{{/with}}
{{#if [Category Preference] != "Unknown"}}
<h4 class="header">Products from the "{{[Category Preference]}}" category.</h4>
<hr />
{{#name:Products}}
{{.datasource prefs type=query maxRows = 5}}
{
"query" : {
"target" : {
"key" : "name:Products",
},
"filter" : {"expression" : "Product_Category == [Category Preference]"}
}
}
{{/datasource}}
<strong>Sku:</strong>{{sku}}<br>
<strong>Product Name:</strong> {{Product_Name}}<br>
<img src="{{Thumbnail_URL}}" /><br>
{{/Products}}
{{/if}}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment