-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathAMPscriptBasics_dynamicBodyContent.html
72 lines (47 loc) · 1.48 KB
/
AMPscriptBasics_dynamicBodyContent.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* three conditions - empty; points till none left; and coupon which we need to pass over a tier for */
%%[ IF @displayPrompt1 == 'coupon' THEN ]%%
<!-- use debug to check to see if the correct tier passed over for the coupon display on the landing page -->
%%[ IF @debug == 1 THEN ]%%
<br>tier: %%=v(@tier)=%%
%%[ ENDIF ]%%
<tr>
<td><br><br>You've earned a coupon for tier 1: <br>
<!-- leave cpURL ID open to wait for it from zuzanna -->
<a href="%%=CloudPagesURL('','tier',@tier)=%%">%%__AdditionalEmailAttribute1%%</a>
</td>
</tr>
%%[ ELSEIF @displayPrompt1 == 'remainder' THEN ]%%
<tr>
<td><br><br>
You have to collect %%=Subtract(10,@rewardTier1)=%% more points to get a tier 1 reward.
</td>
</tr>
%%[ ELSE ]%%
<tr>
<td><br><br>
You do not have any reward points for tier 1.
</td>
</tr>
%%[ ENDIF ]%%
%%[ IF @displayPrompt2 == 'coupon' THEN ]%%
%%[ IF @debug == 1 THEN ]%%
<br>tier: %%=v(@tier)=%%
%%[ ENDIF ]%%
<tr>
<td><br><br>You've earned a coupon for tier 2: <br>
<a href="%%=CloudPagesURL('','tier',@tier)=%%">%%__AdditionalEmailAttribute1%%</a>
</td>
</tr>
%%[ ELSEIF @displayPrompt2 == 'remainder' THEN ]%%
<tr>
<td><br><br>
You have to collect %%=Subtract(10,@rewardTier2)=%% more points to get a tier 2 reward.
</td>
</tr>
%%[ ELSE ]%%
<tr>
<td><br><br>
You do not have any reward points for tier 2.
</td>
</tr>
%%[ ENDIF ]%%