An error occurred while processing the template.
The following has evaluated to null or missing: ==> qstringmap["bankercode"] [in template "10153#10191#6524599" at line 8, column 17] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign bCode = qstringmap["bankercod... [in template "10153#10191#6524599" at line 8, column 1] ----
1<#assign url = themeDisplay.getURLCurrent() >
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
5<#assign url404 = '/error/404.html'>
6
7
8<#assign bCode= qstringmap["bankercode"]?first>
9<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)>
10<#list bData as b>
11 <#assign lc = b.locationcode >
12 <#assign rLC = b.reallocationcode >
13 <#assign mappedLC = b.mappedLocationCode >
14</#list>
15<#if bCode?starts_with("amp") && (url?contains("11t1m"))>
16 <#assign ameriprise = true>
17<#else>
18 <#assign ameriprise = false>
19</#if>
20
21<#if mappedLC?has_content && !ameriprise>
22 <#assign lc = mappedLC >
23</#if>
24
25<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bCode)>
26<#if fiData?first?has_content>
27 <#assign fi = fiData?first>
28 <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))>
29 <#assign subbu_special = fi.offerId>
30 </#if>
31</#if>
32
33
34<#if lc?has_content>
35 <#assign prefix = "00000" >
36 <#assign lcWithPrefix = prefix + lc>
37 <#assign withPrefixLength = lcWithPrefix?length >
38 <#assign startHere = withPrefixLength - 5>
39 <#assign lc = lcWithPrefix?substring(startHere)>
40 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
41 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
42
43 <#assign clientProfile = clientProfileList?first>
44 <#assign partnerName = clientProfile.getMarketingNameLong()>
45 <#assign pbu = clientProfile.getPbu()>
46 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
47 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! />
48 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
49 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
50 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\://.*")>
51 <#assign partnerUrl = 'https://' + partnerUrl>
52 </#if>
53
54 <#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')>
55 <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case>
56 <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')>
57 <script>
58 console.log('logo url', '${cdnLogoUrl}${logoFileName}');
59 </script>
60 <#if pbu == "0864054">
61 <#assign override = "berkshire">
62 <#else>
63 <#assign override = " ">
64 </#if>
65 <#-- this one should be delete for prod -->
66
67 <#assign cdnLogoUrl = "https://4f61efb10f32ceb57895-3733e103896f37259213d6ad72acbe68.ssl.cf2.rackcdn.com">
68 <#assign logoFileName = pbu + "-" + subbu + ".png">
69
70 <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')>
71 <#if (subbu_special?has_content)>
72 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
73 <script>
74 console.log('new subbu', '${subbu_special!''}');
75 </script>
76 <#else>
77 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
78 </#if>
79 <#assign temp = []>
80 <#assign consumerCards = []>
81 <#assign businessCards = []>
82 <#assign offerTypeList = []>
83 <#assign index = 0>
84 <#assign ameriprise_cards= []>
85 <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']>
86 <#assign businessOfferTypes =['144', '128', '143', '121', '123']>
87 <#list fiCardsData as fib>
88 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
89 <#assign offerTypeList = offerTypeList + [fib.offerType]>
90 <#assign temp = temp + fiCardsData[index..index]>
91 <#if ameriprise>
92 <#if (fib.offerType == "101" || fib.offerType == "103")>
93 <#assign ameriprise_cards= ameriprise_cards + fiCardsData[index..index]>
94 </#if>
95 <#else>
96 <#if consumerOfferTypes?seq_contains(fib.offerType)>
97 <#assign consumerCards = consumerCards + fiCardsData[index..index]>
98 <#elseif (businessOfferTypes?seq_contains(fib.offerType))>
99 <#assign businessCards = businessCards + fiCardsData[index..index]>
100 </#if>
101 </#if>
102 </#if>
103 <#assign index = index + 1>
104
105 </#list>
106 <#assign fiCardsData = temp>
107 <#if ameriprise>
108 <#assign consumerCards = ameriprise_cards?sort_by("offerType")>
109 </#if>
110
111 <#if (fiCardsData?size > 0)>
112 <#if (subbu_special?has_content)>
113 <#assign lc_used = fiCardsData?first.WebLocationCode>
114 <#else>
115 <#if ameriprise>
116 <#assign lc_used = mappedLC>
117 <#else>
118 <#assign lc_used = lc>
119 </#if>
120 </#if>
121 <#assign offerId = "">
122 <#assign sourceCode = "">
123 <#assign cardArtImage = "">
124 <#assign productUrl = "">
125 <#assign product = "">
126 <#assign preparerType = "customer">
127 <#assign apr = "">
128 <#assign cardIndex = 0>
129 <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)>
130 <#if (offerTypeList?seq_contains("108")) || (offerTypeList?seq_contains("109")) >
131 <#list consumerCards as card>
132 <#if (card.offerType=="108") || (card.offerType=="109") >
133 <#assign offerId = card.offerId>
134 <#assign sourceCode = card.sourceCode>
135 <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png">
136 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg">
137 <#assign productUrl="consumer-platinum">
138 <#assign product="Platinum">
139 <#assign cardIndex = 2>
140 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)>
141 <#if (scrapedData?size > 0)>
142 <#list scrapedData as sItem>
143 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
144 <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
145 <#break>
146 </#if>
147 </#list>
148 <script>
149 $(document).ready(function () {
150 var aprText = "${apr}";
151 if (aprText) {
152 try {
153 var matches= aprText.match(/\d+(\.\d+)?%?/g);
154 var billing_cycle = matches[1];
155 var apr_min = apr_min = matches[2];
156 var apr_max = apr_max = matches[3];
157 if (billing_cycle) {
158 $(".scraped-billing-cycle").html(billing_cycle);
159 }
160 if (apr_min) {
161 $(".scraped-apr-min").html(apr_min);
162 }
163 if (apr_max) {
164 $('.scraped-apr-max').html(apr_max);
165 }
166
167 } catch (e) {
168 console.log(e);
169 }
170 }
171 });
172 </script>
173 </#if>
174 </#if>
175 </#list>
176 <#else>
177 <#assign displayedCard = consumerCards[0]>
178 <script>
179 console.log('dispalyed card:','${displayedCard.offerType}');
180 </script>
181 <#assign offerId = displayedCard.offerId>
182 <#assign sourceCode = displayedCard.sourceCode>
183 <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png">
184 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg">
185 <#if ameriprise>
186 <#if (displayedCard.offerType == "101")>
187 <#assign productUrl="ameriprise-premier-visa-signature">
188 <#assign product="Premier Visa Signature">
189 <#assign cardIndex = 0>
190 <#elseif (displayedCard.offerType == "103")>
191 <#assign productUrl = "ameriprise-visa-signature">
192 <#assign product="Visa Signature">
193 <#assign cardIndex = 1>
194 </#if>
195 <#else>
196 <#if (displayedCard.offerType == "101" || displayedCard.offerType == "103")>
197 <#assign productUrl="real-rewards">
198 <#assign product="Real Rewards">
199 <#assign cardIndex = 1>
200 <#elseif (displayedCard.offerType == "108" || displayedCard.offerType == "109")>
201 <#assign productUrl = "consumer-platinum2103">
202 <#assign product="Platinum">
203 <#assign cardIndex = 2>
204 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)>
205 <#if (scrapedData?size > 0)>
206 <#list scrapedData as sItem>
207 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
208 <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
209 <#break>
210 </#if>
211 </#list>
212 <script>
213 $(document).ready(function () {
214 var aprText = "${apr}";
215 if (aprText) {
216 try {
217 var matches= aprText.match(/\d+(\.\d+)?%?/g);
218 var billing_cycle = matches[1];
219 var apr_min = apr_min = matches[2];
220 var apr_max = apr_max = matches[3];
221 if (billing_cycle) {
222 $(".scraped-billing-cycle").html(billing_cycle);
223 }
224 if (apr_min) {
225 $(".scraped-apr-min").html(apr_min);
226 }
227 if (apr_max) {
228 $('.scraped-apr-max').html(apr_max);
229 }
230
231 } catch (e) {
232 console.log(e);
233 }
234 }
235 });
236 </script>
237 </#if>
238 <#elseif (displayedCard.offerType == "115")>
239 <#assign productUrl = "secured">
240 <#assign product="Secured">
241 <#assign cardIndex = 3>
242 </#if>
243 </#if>
244 </#if>
245 </#if>
246 <#if (class.getData() == "landing-business" && businessCards?size > 0)>
247 <#if (offerTypeList?seq_contains("144")) >
248 <#list businessCards as card>
249 <#if (card.offerType=="144")>
250 <#assign offerId = card.offerId>
251 <#assign sourceCode = card.sourceCode>
252 <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png">
253 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg">
254 <#assign productUrl="smart-business-rewards">
255 <#assign product="Smart Business Rewards">
256 <#assign cardIndex = 0>
257 </#if>
258 </#list>
259 <#else>
260 <#assign displayedCard = businessCards[0]>
261 <#assign offerId = displayedCard.offerId>
262 <#assign sourceCode = displayedCard.sourceCode>
263 <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png">
264 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg">
265
266 <#if (displayedCard.offerType=="143")>
267 <#assign productUrl="business-real-rewards">
268 <#assign product="Business Real Rewards">
269 <#assign cardIndex = 0>
270 <#elseif (displayedCard.offerType=="128")>
271 <#assign productUrl = "business-cashback">
272 <#assign product="Business Cash">
273 <#assign cardIndex = 1>
274 <#elseif (displayedCard.offerType=="121")>
275 <#assign productUrl = "visa-business">
276 <#assign product="Visa Business">
277 <#assign cardIndex = 3>
278 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)>
279 <#if (scrapedData?size > 0)>
280 <#list scrapedData as sItem>
281 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
282 <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
283 <#break>
284 </#if>
285 </#list>
286 <script>
287 $(document).ready(function () {
288 var aprText = "${apr}";
289 if (aprText) {
290 try {
291 var matches= aprText.match(/\d+(\.\d+)?%?/g);
292 var billing_cycle = matches[1];
293 var apr_min = apr_min = matches[2];
294 var apr_max = apr_max = matches[3];
295 if (billing_cycle) {
296 $(".scraped-billing-cycle").html(billing_cycle);
297 }
298 if (apr_min) {
299 $(".scraped-apr-min").html(apr_min);
300 }
301 if (apr_max) {
302 $('.scraped-apr-max').html(apr_max);
303 }
304
305 } catch (e) {
306 console.log(e);
307 }
308 }
309 });
310 </script>
311 </#if>
312 </#if>
313 </#if>
314 </#if>
315 <#if product != "">
316 <#if ameriprise>
317 <#assign card_art_alt = partnerName + " " + product + " Card">
318 <#assign rollover_text = partnerName + " " + product + " Card">
319 <#else>
320 <#assign card_art_alt = partnerName>
321 <#assign rollover_text = partnerName + " " + product + " Credit Card">
322 <#assign card_text = product + " Card">
323 </#if>
324 </#if>
325 <div class="jn-hero-container product-${productUrl} tier1-hero-${class.getData()}" title="${rollover_text!''}">
326 <div class="hero-main">
327 <div class="hero-main-logo">
328 <#if partnerUrl?has_content>
329 <a href="${partnerUrl!''}" title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a>
330 <#else>
331 <a title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a>
332 </#if>
333 </div>
334 <div class="hero-main-container">
335 <div class="hero-main-offer bg-color-white">
336 <div class="offer-header bg-color-black text-color-white text-bold">${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div>
337 <div class="offer-detail">
338 <div class="offer-detail-head">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div>
339 <div class="offer-detail-text text-color-default">
340 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()}
341 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()}
342 </div>
343 <div class="offer-detail-cardArt">
344 <img src="${cardArtImage!''}" alt="${card_art_alt!''}" srcset="" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
345 <p>${card_text!''}</p>
346 </div>
347 <#if ameriprise>
348 <a data-button-name="cta-button-top" title="Learn More about ${partnerName!''} credit cards" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" href="javascript:void(0);" onclick="goToByScroll('product-display')">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>
349 <#else>
350 <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm">
351 <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label>
352 <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea>
353 <input type="submit" data-button-name="cta-button-top" data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card"
354 class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled />
355 </form>
356 </#if>
357 </div>
358 </div>
359 </div>
360 </div>
361 </div>
362
363 </#if>
364</#if>
An error occurred while processing the template.
The following has evaluated to null or missing: ==> qstringmap["bankercode"] [in template "10153#10191#6524603" at line 29, column 17] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign bCode = qstringmap["bankercod... [in template "10153#10191#6524603" at line 29, column 1] ----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign url = themeDisplay.getURLCurrent() >
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
5<#assign url404 = '/error/404.html'>
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' >
7<#assign environment = url?replace('/index.*','','r')>
8
9
10
11<#assign text_to_apply_source = "vanity url" >
12<#if qstringmap["sms"]?has_content>
13 <#assign sms = 1 >
14 <#assign text_to_apply_source = "sms" >
15</#if>
16<#if qstringmap["qrCode"]?has_content>
17 <#assign text_to_apply_source = "qr code" >
18</#if>
19
20<#if qstringmap["ecid"]?has_content>
21 <#assign ecidExt="&ecid="+qstringmap["ecid"]?first>
22 <#assign campaignId = qstringmap["ecid"]?first >
23<#else>
24 <#assign ecidExt="">
25 <#assign campaignId = "" >
26</#if>
27<#-- check bankercode validity -->
28
29<#assign bCode= qstringmap["bankercode"]?first>
30
31<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bCode)>
32<#if fiData?first?has_content>
33 <#assign fi = fiData?first>
34 <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))>
35 <#assign subbu_special = fi.offerId>
36 </#if>
37</#if>
38
39<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)>
40<#list bData as b>
41 <#assign lc = b.locationcode >
42 <#assign bName = b.branch >
43 <#assign bPhone = b.businessphone >
44 <#assign boeid = b.oeid >
45 <#assign fName = b.firstname?trim >
46 <#assign lName = b.lastname?trim >
47 <#assign rLC = b.reallocationcode >
48 <#assign mappedLC = b.mappedLocationCode >
49</#list>
50
51<#if qstringmap["ecdma-lc"]?has_content>
52 <#assign lc_url= qstringmap["ecdma-lc"]?first>
53</#if>
54
55<#if bCode?starts_with("amp") && (url?contains("11t1m"))>
56 <#assign ameriprise = true>
57<#else>
58 <#assign ameriprise = false>
59</#if>
60<#if mappedLC?has_content && !ameriprise>
61 <#assign lc = mappedLC >
62</#if>
63
64
65<#if lc?has_content>
66 <#assign firstNameLength = fName?length >
67 <#assign lastNameLength = lName?length >
68 <#if firstNameLength + lastNameLength > 19 >
69 <#if lastNameLength > 18 >
70 <#assign bLName = lName?substring(0,18)>
71 <#else>
72 <#assign bLName = lName>
73 </#if>
74 <#assign maxFirstName = 19 - bLName?length >
75 <#if firstNameLength > maxFirstName >
76 <#assign bFName = fName?substring(0,maxFirstName)>
77 <#else>
78 <#assign bFName = fName>
79 </#if>
80 <#else>
81 <#assign bFName = fName>
82 <#assign bLName = lName>
83 </#if>
84
85 <#assign prefix = "00000" >
86 <#assign lcWithPrefix = prefix + lc >
87 <#assign withPrefixLength = lcWithPrefix?length >
88 <#assign startHere = withPrefixLength - 5>
89 <#assign lc = lcWithPrefix?substring(startHere)>
90 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
91 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
92 <#if (clientProfileList?first?has_content)>
93 <#assign clientProfile = clientProfileList?first>
94 <#assign partnerName = clientProfile.getMarketingNameLong()>
95 <#assign pbu = clientProfile.getPbu()>
96 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
97 <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')>
98 <#if (subbu_special?has_content)>
99 <script>
100 console.log("special subbu:", '${subbu_special}');
101 </script>
102 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
103 <#else>
104 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
105 <script>
106 console.log("subbu:", '${subbu}');
107 </script>
108 </#if>
109
110 <#-- Begin: filter cards by sourceCode and offerId and remove duplicated cards-->
111 <#assign temp = []>
112 <#assign consumerCards = []>
113 <#assign businessCards = []>
114 <#assign offerTypeList = []>
115 <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']>
116 <#assign businessOfferTypes =['144', '128', '143', '121', '123']>
117 <#assign index = 0>
118 <#list fiCardsData as fib>
119 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
120 <#assign offerTypeList = offerTypeList + [fib.offerType]>
121 <#assign temp = temp + fiCardsData[index..index]>
122 <#if consumerOfferTypes?seq_contains(fib.offerType)>
123 <#assign consumerCards = consumerCards + fiCardsData[index..index]>
124 <#elseif (businessOfferTypes?seq_contains(fib.offerType))>
125 <#assign businessCards = businessCards + fiCardsData[index..index]>
126 </#if>
127 </#if>
128 <#assign index = index + 1>
129 </#list>
130
131
132 <#assign fiCardsData = temp>
133
134 <#if (fiCardsData?size > 0)>
135 <#if (subbu_special?has_content)>
136 <#assign lc_used = fiCardsData?first.WebLocationCode>
137 <#else>
138 <#if ameriprise>
139 <#assign lc_used = lc_url>
140 <#else>
141 <#assign lc_used = mappedLC>
142 </#if>
143 </#if>
144 </#if>
145
146 <#if (consumerCards?size > 0 || businessCards?size > 0)>
147
148 <div class="content-container content-container-main jn-consumer-content" id="product-display">
149 <#if ((consumerCards?size > 0) && (businessCards?size > 0))>
150 <nav class="jn-primary-nav two-tabs">
151 <ul>
152 <li title="${partnerName!''} - Personal products">
153 <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a>
154 </li>
155 <li title="${partnerName!''} - Business products">
156 <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a>
157 </li>
158 </ul>
159 </nav>
160 <#else>
161 <#if (consumerCards?size > 0)>
162 <nav class="jn-primary-nav" title="${partnerName!''} - Personal products">
163 <ul>
164 <li>
165 <p class="tab-nav" id="consumerTab"><span>Personal</span></p>
166 </li>
167 </ul>
168 </nav>
169 </#if>
170 <#if (businessCards?size > 0)>
171 <nav class="jn-primary-nav" title="${partnerName!''} - Business products">
172 <ul>
173 <li>
174 <p class="tab-nav" id="businessTab"><span>Business</span></p>
175 </li>
176 </ul>
177 </nav>
178 </#if>
179 </#if>
180 <#if (consumerCards?size > 0)>
181 <div class="tab-more-wrapper">
182 <div class="jn-consumer-content-wrapper jn-tab-content active transition-start" data-id="consumerTab" title="${partnerName!''} - Personal products">
183 <#list consumerCards as fib>
184 <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" >
185 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">
186 <#if ameriprise>
187 <#if (fib.offerType == "101")>
188 <#assign productName = "premier-visa-signature">
189 <#assign product="Premier Visa Signature">
190 <#assign cardIndex = 0>
191 <#elseif (fib.offerType == "103")>
192 <#assign productName = "visa-signature">
193 <#assign product="Visa Signature">
194 <#assign cardIndex = 1>
195 </#if>
196 <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()>
197 <#assign titleText = titleText?replace('<[^>]+>','','r')>
198 <#else>
199 <#switch fib.offerType>
200 <#case "101">
201 <#assign productName = "real-rewards">
202 <#assign product="Real Rewards">
203 <#assign cardIndex = 1>
204 <#break>
205 <#case "108">
206 <#assign productName = "consumer-platinum2103">
207 <#assign product="Platinum">
208 <#assign cardIndex = 2>
209
210 <#break>
211 <#case "109">
212 <#assign productName = "consumer-platinum2103">
213 <#assign product="Platinum">
214 <#assign cardIndex = 2>
215 <#break>
216 <#case "115">
217 <#assign productName = "secured">
218 <#assign product="Secured">
219 <#assign cardIndex = 3>
220 <#break>
221 <#case "104">
222 <#assign productName = "max-cash">
223 <#assign product="Max Cash">
224 <#assign cardIndex = 0>
225 <#break>
226 <#default>
227 </#switch>
228
229 <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()>
230 <#assign titleText = titleText?replace('<[^>]+>','','r')>
231
232
233 <#assign APR="">
234 <#assign AMF="">
235 <#assign BAL="">
236 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)>
237 <#if (scrapedData?size > 0)>
238 <#list scrapedData as sItem>
239 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
240 <#assign APR = sItem.scrapedValue>
241 <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) >
242 <#assign AMF = sItem.scrapedValue>
243 <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) >
244 <#assign BAL = sItem.scrapedValue>
245 </#if>
246 <#if (APR?has_content && AMF?has_content && BAL?has_content)>
247 <#break>
248 </#if>
249 </#list>
250 </#if>
251 </#if>
252 <#if ameriprise>
253 <#assign rollover_text = partnerName + " " + product + " " + " Card">
254 <#else>
255 <#assign rollover_text = partnerName + " " + product + " " + " Credit Card">
256 </#if>
257 <div class="jn-consumer-item item-${fib.offerType}" title="${rollover_text!''}">
258 <img src="${cardArtImage!''}" alt="${rollover_text!''}"
259 class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
260 <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4>
261 <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p>
262 <ul class="actions">
263 <li>
264 <form action="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}" method="post" class="BAAForm">
265 <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label>
266 <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea>
267 <a class="applyNowLink apply-now-button" href="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}"
268 data-button-name="apply-now-link" data-product-name="${productName}"
269 title="Apply Now for ${rollover_text!''}">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a>
270 </form>
271 </li>
272 <li>
273 <#if ameriprise>
274 <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc_used}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a>
275 <#else>
276 <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a>
277 </#if>
278 </li>
279 </ul>
280 <div class="jn-additional">
281 <ul class="${fib.offerType}">
282 <#if !ameriprise>
283 <#if (fib.offerType == "104")>
284 <li class="${fib.offerType}">
285 <p>
286 <strong>APR<sup>*</sup> for Purchases: </strong>
287 ${APR!''}
288 </p>
289
290 </li>
291 <li class="${fib.offerType}">
292 <p>
293 <strong>Intro APR<sup>*</sup> for Balance Transfers: </strong>
294 ${BAL!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a>
295 </p>
296 </li>
297 <#elseif (fib.offerType== "115")>
298 <li class="${fib.offerType}">
299 <p>
300 <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong>
301 ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a>
302 </p>
303 </li>
304 <#else>
305 <li class="${fib.offerType}">
306 <p>
307 <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>
308 ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a>
309 </p>
310 </li>
311 </#if>
312 </#if>
313 <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content>
314 <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo>
315 <li>${marketingInfo.getData()}</li>
316 </#list>
317 </#if>
318 <#if !ameriprise>
319 <li>
320 <p>Annual Fee: ${AMF!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a></p>
321 </li>
322 </#if>
323 </ul>
324 </div>
325 </div>
326
327
328 </#list>
329 </div>
330
331 </div>
332
333 </#if>
334 <#if (businessCards?size > 0)>
335 <div class="tab-more-wrapper">
336 <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products">
337
338 <#list businessCards as fib>
339 <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">
340 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">
341 <#switch fib.offerType>
342 <#case "144">
343 <#assign productName = "smart-business-rewards">
344 <#assign product="Smart Business Rewards">
345 <#assign cardIndex = 4>
346 <#break>
347 <#case "128">
348 <#assign productName = "business-cashback">
349 <#assign product="Business Cash">
350 <#assign cardIndex = 5>
351 <#break>
352 <#case "143">
353 <#assign productName = "business-real-rewards">
354 <#assign product="Business Real Rewards">
355 <#assign cardIndex = 6>
356 <#break>
357 <#case "121">
358 <#assign productName = "visa-business">
359 <#assign product="Business Card">
360 <#assign cardIndex = 7>
361 <#break>
362 <#default>
363 </#switch>
364 <#assign APR="">
365 <#assign AMF="">
366 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)>
367 <#if (scrapedData?size > 0)>
368 <#list scrapedData as sItem>
369 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
370 <#assign APR = sItem.scrapedValue>
371 <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) >
372 <#assign AMF = sItem.scrapedValue>
373 </#if>
374 <#if (APR?has_content && AMF?has_content)>
375 <#break>
376 </#if>
377 </#list>
378 </#if>
379
380 <div class="jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card">
381 <img src="${cardArtImage!''}" alt="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
382 <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4>
383 <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p>
384 <ul class="actions">
385 <li>
386 <form action="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}" method="post" class="BAAForm">
387 <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label>
388 <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea>
389 <a class="applyNowLink apply-now-button"
390 href="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}"
391 data-button-name="apply-now-link" data-product-name="${productName}"
392 title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a>
393 </form>
394 </li>
395 <li><a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a></li>
396 </ul>
397 <div class="jn-additional">
398 <ul>
399 <#if (fib.offerType == "144")>
400 <li>
401 <p>
402 <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong>
403 ${APR!''}
404 <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a>
405 </p>
406 </li>
407 <#else>
408 <li>
409 <p>
410 <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>
411 ${APR!''}
412 <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a>
413 </p>
414 </li>
415 </#if>
416 <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content>
417 <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo>
418 <li>${marketingInfo.getData()}</li>
419 </#list>
420 </#if>
421 <li><p>Annual Fee: ${AMF!''} <a
422 href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a></p>
423 </li>
424 </ul>
425 </div>
426 </div>
427
428 </#list>
429
430 </div>
431 </div>
432 </#if>
433 <div class="more-link" ><a href="#" role="button" aria-label="More Cards"><div class="more-text">MORE <br> CARDS </div><div class="more-caret"></div></a></div>
434 <div class="less-link"><a href="#" role="button" aria-label="Less Cards"><div class="less-caret"></div> <div class="less-text">BACK</div></a></div>
435 </div>
436 <script>
437 var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]';
438 var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]';
439 $(document).ready(function () {
440 var banker_code = "${bCode!''}";
441 var tabs=$('.tab-nav');
442 var slideDiv = $('.jn-tab-content.active');
443 var screenWidthMobile = 768;
444 var screenWidth = window.innerWidth;
445
446 if (tabs.length == 1) {
447 if ($(consumerSelector).length > 0) {
448 if(banker_code && (banker_code.indexOf("amp") == 0) && (banker_code.length > 6)) {
449 $("nav.jn-primary-nav").hide();
450 changeCardLayout(consumerSelector);
451 createMetaTag("consumer");
452 } else {
453 hideHeroAndDisclaimer('business');
454 showHeroAndDisclaimer('consumer');
455 changeCardLayout(consumerSelector);
456 renumberFootnote("consumer");
457 createMetaTag("consumer");
458 }
459 }
460 if ($(businessSelector).length > 0) {
461 $(businessSelector).addClass('active');
462 hideHeroAndDisclaimer('consumer');
463 showHeroAndDisclaimer('business');
464 changeCardLayout(businessSelector);
465 renumberFootnote("business");
466 createMetaTag("business");
467 }
468 if(screenWidth > screenWidthMobile) {
469 if ($("#consumerTab").length > 0) {
470 if ($(consumerSelector + ' .jn-consumer-item').length > 3) {
471 $('.more-link').show();
472 } else {
473 $('.more-link').hide();
474 $('.less-link').hide();
475 }
476 } else if ($("#businessTab").length > 0) {
477 if ($(businessSelector + ' .jn-consumer-item').length > 3) {
478 $('.more-link').show();
479 } else {
480 $('.more-link').hide();
481 $('.less-link').hide();
482 }
483 }
484
485 }
486 }
487 if (tabs.length == 2) {
488 renumberFootnote("consumer");
489 renumberFootnote("business");
490 createMetaTag("consumer");
491 if ($(consumerSelector + ' .jn-consumer-item').length < 3) {
492 changeCardLayout(consumerSelector);
493 }
494 if ($(businessSelector + ' .jn-consumer-item').length < 3) {
495 changeCardLayout(businessSelector);
496 }
497 if(screenWidth > screenWidthMobile) {
498 if ($(consumerSelector + ' .jn-consumer-item').length > 3) {
499 $('.more-link').show();
500 } else {
501 $('.more-link').hide();
502 $('.less-link').hide();
503 }
504 /*
505 if ($(businessSelector + ' .jn-consumer-item').length > 3) {
506 $('.more-link').show();
507 } else {
508 $('.more-link').hide();
509 $('.less-link').hide();
510 }
511 */
512
513 $(tabs).click(function(){
514 if ($(this).attr('id') === "consumerTab") {
515 if ($(consumerSelector + ' .jn-consumer-item').length > 3) {
516 slideDiv = $('.jn-tab-content.active');
517 $(slideDiv).removeClass('transition-left');
518 $('.less-link').hide();
519 $('.more-link').show();
520 } else {
521 $('.less-link').hide();
522 $('.more-link').hide();
523 }
524 }
525
526 if ($(this).attr('id') === "businessTab") {
527 if ($(businessSelector + ' .jn-consumer-item').length > 3) {
528 slideDiv = $('.jn-tab-content.active');
529 $(slideDiv).removeClass('transition-left');
530 $('.less-link').hide();
531 $('.more-link').show();
532 } else {
533 $('.less-link').hide();
534 $('.more-link').hide();
535 }
536 }
537 });
538
539 }
540 var tabsNav = document.querySelectorAll('.tab-nav');
541 togglePrimaryNav(tabsNav);
542
543 }
544 $('.more-link, .less-link').click(function(e){
545 e.preventDefault();
546 });
547 $('.more-link').click(function(){
548 slideDiv = $('.jn-tab-content.active');
549 $(slideDiv).addClass('transition-left');
550 $('.less-link').show();
551 $(this).hide();
552 });
553 $('.less-link').click(function(){
554 slideDiv = $('.jn-tab-content.active');
555 $(slideDiv).removeClass('transition-left');
556 $(this).hide();
557 $('.more-link').show();
558 });
559
560 });
561
562 // Primary Nav function
563
564 function togglePrimaryNav(elem) {
565 for (var i = 0; i < elem.length; i++) {
566 elem[i].addEventListener("click", function(e) {
567
568 var current = this,
569 allSections = document.querySelectorAll('[data-id]'),
570 section = document.querySelector("[data-id='"+ current.id +"']");
571
572 for (var a = 0; a < allSections.length; a++) {
573 allSections[a].classList.remove('active');
574 }
575 for (var c = 0; c < elem.length; c++) {
576 if (current != elem[c]) {
577 elem[c].classList.remove('active');
578 } else {
579 current.classList.add('active');
580 section.classList.add('active');
581 hideHeroAndDisclaimer('consumer');
582 hideHeroAndDisclaimer('business');
583 if(current.getAttribute('id') === "consumerTab"){
584 showHeroAndDisclaimer('consumer');
585 } else if(current.getAttribute('id') === "businessTab"){
586 showHeroAndDisclaimer('business');
587 }
588 }
589 }
590 e.preventDefault();
591 });
592 }
593 }
594
595 function renumberFootnote(type) {
596 var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]';
597 var disclaimerSelector = '.tier1-disclaimer-landing-' + type;
598 var heroSelector = '.tier1-hero-landing-' + type;
599 var numOfFootnote = $(disclaimerSelector + ' sup').length;
600 var showList = [];
601 var hideList=[];
602 for (var i = 1; i <= numOfFootnote; i++) {
603 var cssClass="tag-" + i;
604 if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) {
605 showList.push(i);
606 } else {
607 hideList.push(i);
608 }
609 }
610 for (var i = 1; i < showList.length + 1; i++) {
611 if(showList[i-1] != i) {
612 var className="tag-" + showList[i-1];
613 $(heroSelector).find("." + className).html(i);
614 $(discriptionSelector).find("." + className).html(i);
615 $(disclaimerSelector).find("." + className).html(i);
616 }
617 }
618 for (var i = 0; i <hideList.length; i++) {
619 var cname="tag-" + hideList[i];
620 $(disclaimerSelector).find("." + cname).parent().hide();
621 }
622 }
623
624 function changeCardLayout(cssSelector) {
625 var numOfCards = $(cssSelector + ' .jn-consumer-item').length;
626 if(numOfCards == 1) {
627 $(cssSelector).addClass('one-card');
628 } else if (numOfCards == 2) {
629 $(cssSelector).addClass('two-card');
630 }
631 }
632 function hideHeroAndDisclaimer(type) {
633 try {
634 document.querySelector('.tier1-hero-landing-'+ type).classList.remove('show');
635 document.querySelector('.tier1-hero-landing-'+ type).classList.add('hide');
636 } catch (e) {
637 console.log(e);
638 }
639
640 try {
641 document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('show');
642 document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('hide');
643 } catch (e) {
644 console.log(e);
645 }
646
647 }
648 function showHeroAndDisclaimer(type) {
649 try {
650 document.querySelector('.tier1-hero-landing-'+ type).classList.add('show');
651 document.querySelector('.tier1-hero-landing-'+ type).classList.remove('hide');
652 } catch (e) {
653 console.log(e);
654 }
655
656 try {
657 document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('show');
658 document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('hide');
659 } catch (e) {
660 console.log(e);
661 }
662
663 }
664 function createMetaTag(type) {
665 var partnerName = "${partnerName!0}";
666 var product_name = $('.jn-hero-container .jn-button').data('product-name');
667 var metaDesc = "";
668 if (type == "consumer") {
669 if(location.pathname.indexOf("11t1m") != -1) {
670 metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $375 cash value when deposited into an eligible account after spending $3,000 in eligible net purchases within the first 90 days of account opening."
671 } else {
672 if(product_name == "consumer-platinum2103") {
673 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 20 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card.";
674 } else if(product_name == "real-rewards") {
675 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase.";
676 } else if(product_name == "secured") {
677 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
678 } else if(product_name == "max-cash") {
679 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select.";
680 }
681 }
682
683 } else if (type == "business") {
684 if(product_name == "business-cashback") {
685 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses.";
686 } else if(product_name == "business-real-rewards") {
687 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on.";
688 } else if(product_name == "business-visa") {
689 metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles";
690 } else if(product_name == "smart-business-rewards") {
691 metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business. Earn a $200 Bonus and 2x Rewards on your top 2 spend categories each month with the "+partnerName+" Credit Card.";
692 }
693 }
694 var m = document.createElement('meta');
695 m.name = 'description';
696 m.content = metaDesc;
697 document.head.appendChild(m);
698 }
699 function goToByScroll(id) {
700 var element = document.getElementById(id);
701 element.scrollIntoView(true);
702 }
703 function slideAmount(length) {
704
705 }
706
707 </script>
708 <script>
709 var reportingData = window.reportingData || {};
710 document.addEventListener('DOMContentLoaded', function() {
711 console.log('inside ready');
712 var page = location.pathname.split('/')[location.pathname.split('/').length-1];
713 var hostName = location.hostname;
714 function getDomainFromHostname(hostname) {
715 var parts = hostname.split('.');
716 return parts.length === 3 ? parts[1] : parts[0];
717 }
718 var domain = getDomainFromHostname(hostName);
719 var partnerName = "${partnerName!0}";
720 var ameriprise = '${ameriprise?string("yes", "no")}';
721 var locationCode = "${rLC!lc}";
722 var eidAmp = "";
723 if (ameriprise == "yes") {
724 var bankercode_amp = '${bCode}';
725 eidAmp = bankercode_amp.substring(3);
726 locationCode ="";
727 document.title = "Ameriprise Financial Credit Card Overview Page";
728 } else {
729 document.title = partnerName + " Credit Card Index Page";
730 }
731
732 var lc = '${lc!0}';
733
734 var regex = /\d+/g;
735 var bdNumber = "${bPhone!''}";
736 var phoneNum = bdNumber.match(regex);
737 var areaCode = "";
738 var exchangeCode = "";
739 var num = "";
740 if(phoneNum != null) {
741 phoneNum = phoneNum.join("");
742 areaCode = phoneNum.substring(0,3);
743 exchangeCode = phoneNum.substring(3,6);
744 num = phoneNum.substring(6,10);
745 }
746
747 /* update SiteCatalyst data object */
748 reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' ');
749 reportingData.page_type = 'product';
750 reportingData.site_section = 'credit cards';
751 reportingData.platform = 'microsite';
752 reportingData.campaign_id = '${campaignId}';
753 reportingData.location_code = '${rLC!0}';
754 reportingData.partner_name = "${partnerName}";
755 reportingData.product = 'All Cards';
756 reportingData.text_to_apply_source = '${text_to_apply_source}';
757 reportingData.visitor_type = 'prospect';
758 reportingData.Banker_id = '${boeid}';
759 reportingData.Banker_code = '${bCode}';
760
761
762 /* SiteCatalyst pageView tracking */
763 AUI().ready(function() {
764 if (window.publisherFW) {
765 //console.log('reportingData', reportingData);
766 window.publisherFW.publishEvent("pageView", reportingData);
767 }
768 });
769
770
771 $('.jn-button').removeAttr('disabled');
772 $('.jn-button').removeClass('jn-disabled');
773
774 jQuery('.applyNowLink').on('click', function(e){
775 $(this).closest('.BAAForm').submit();
776 ga("send", {
777 hitType: "event",
778 eventAction: "ApplyNow",
779 eventCategory: "click",
780 eventLabel: "BottomButton"
781 });
782 return false;
783 });
784 jQuery(".BAAForm").on("submit", function(e){
785 e.preventDefault();
786 console.log("in custom submit");
787 var xmlData;
788 if(ameriprise == "yes") {
789 xmlData = '<?xml version="1.0"?>'+
790 "<prefillData>"+
791 "<versionNumber>1.0</versionNumber>"+
792 "<applicationData>"+
793 "<referral>" +
794 "<employeeId>" + eidAmp + "</employeeId>" +
795 "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+
796 "<divisionNumber></divisionNumber>"+
797 "</referral>" +
798 "<bankerInformation>"+
799 "<locationCode>" + locationCode + "</locationCode>"+
800 "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+
801 "<employeeID>${boeid!0}</employeeID>"+
802 "<name>" +
803 "<first>${bFName!'0'}</first>" +
804 "<last>${bLName!'0'}</last>" +
805 "</name>"+
806 "<phone>"+
807 "<areaCode>"+areaCode+"</areaCode>"+
808 "<exchange>"+exchangeCode+"</exchange>"+
809 "<number>"+num+"</number>"+
810 "</phone>"+
811 "</bankerInformation>"+
812 "</applicationData>"+
813 "</prefillData>"
814 } else {
815 xmlData = '<?xml version="1.0"?>'+
816 "<prefillData>"+
817 "<versionNumber>1.0</versionNumber>"+
818 "<applicationData>"+
819 "<bankerInformation>"+
820 "<locationCode>" + locationCode + "</locationCode>"+
821 "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+
822 "<employeeID>${boeid!0}</employeeID>"+
823 "<name>" +
824 "<first>${bFName!'0'}</first>" +
825 "<last>${bLName!'0'}</last>" +
826 "</name>"+
827 "<phone>"+
828 "<areaCode>"+areaCode+"</areaCode>"+
829 "<exchange>"+exchangeCode+"</exchange>"+
830 "<number>"+num+"</number>"+
831 "</phone>"+
832 "</bankerInformation>"+
833 "</applicationData>"+
834 "</prefillData>"
835 }
836 $(this).children(".appDataBAA").val(xmlData);
837 var buttonName = $(this).find(".apply-now-button").data("button-name");
838 var productName = $(this).find(".apply-now-button").data("product-name");
839 /* SiteCatalyst onClick tracking */
840 reportingData.apply_button = buttonName;
841 reportingData.product = productName;
842
843 if (window.publisherFW) {
844 console.log('clicked', reportingData);
845 window.publisherFW.publishEvent("onClick", reportingData);
846 }
847
848 this.submit();
849 });
850
851
852 });
853 </script>
854
855 </#if>
856 </#if>
857</#if>
An error occurred while processing the template.
The following has evaluated to null or missing: ==> qstringmap["bankercode"] [in template "10153#10191#7973759" at line 5, column 17] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign bCode = qstringmap["bankercod... [in template "10153#10191#7973759" at line 5, column 1] ----
1<#assign url = themeDisplay.getURLCurrent() >
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
4
5<#assign bCode= qstringmap["bankercode"]?first>
6<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)>
7<#list bData as b>
8 <#assign lc = b.locationcode >
9 <#assign rLC = b.reallocationcode >
10 <#assign mappedLC = b.mappedLocationCode >
11</#list>
12<#if mappedLC?has_content && !(url?contains("11t1m"))>
13 <#assign lc = mappedLC >
14</#if>
15<#if lc?has_content>
16 <#assign prefix = "00000" >
17 <#assign lcWithPrefix = prefix + lc >
18 <#assign withPrefixLength = lcWithPrefix?length >
19 <#assign startHere = withPrefixLength - 5>
20 <#assign lc = lcWithPrefix?substring(startHere)>
21 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
22 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
23
24 <#assign clientProfile = clientProfileList?first>
25 <#assign partnerName=clientProfile.getMarketingNameLong()>
26</#if>
27<div class="content-container" title="${partnerName} - Disclaimer">
28 <div class="jn-disclaimer tier1-disclaimer-${class.getData()}">
29 ${content.getData()}
30 </div>
31</div>
An error occurred while processing the template.
The following has evaluated to null or missing: ==> qstringmap["bankercode"] [in template "10153#10191#5843861" at line 6, column 17] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign bCode = qstringmap["bankercod... [in template "10153#10191#5843861" at line 6, column 1] ----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
4<#assign url404 = '/error/404.html'>
5
6<#assign bCode= qstringmap["bankercode"]?first>
7<#assign bCode = htmlUtil.escape(bCode)>
8<#assign bCode = htmlUtil.escapeJS(bCode)>
9
10<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)>
11<#list bData as b>
12 <#assign lc = b.locationcode >
13 <#assign rLC = b.reallocationcode >
14 <#assign mappedLC = b.mappedLocationCode >
15</#list>
16
17<#if bCode?starts_with("amp") && (url?contains("11t1m"))>
18 <#assign ameriprise = true>
19<#else>
20 <#assign ameriprise = false>
21</#if>
22<#if mappedLC?has_content && !ameriprise>
23 <#assign lc = mappedLC >
24</#if>
25
26<#if lc?has_content>
27
28 <#assign prefix = "00000" >
29 <#assign lcWithPrefix = prefix + lc >
30 <#assign withPrefixLength = lcWithPrefix?length >
31 <#assign startHere = withPrefixLength - 5>
32 <#assign lc = lcWithPrefix?substring(startHere)>
33<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
34 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
35
36 <#assign clientProfile = clientProfileList?first>
37 <#assign pbu = clientProfile.getPbu()>
38 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
39 <#assign partnerName=clientProfile.getMarketingNameLong()>
40 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! />
41 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
42 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
43 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\://.*")>
44 <#-- add protocal if missing -->
45 <#assign partnerUrl = 'https://' + partnerUrl>
46 </#if>
47 <footer class="footer bg-color-black text-color-white">
48 ${footerContent.getData()}
49 </footer>
50
51 <!-- BEGIN CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP -->
52 <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script>
53 <style>
54 #opt-out-button,
55 .modal__btn.learn-more {
56 background: #0C2074;
57 border: 1px solid #0C2074;
58 color: white;
59 text-transform: uppercase;
60 text-decoration: none;
61 font-size: 16px;
62 padding: 0.5rem 2rem;
63 display: inline-block;
64 border-radius: 0;
65 }
66 #opt-out-button:hover,
67 .modal__btn.learn-more:hover {
68 color: white;
69 border-color: #2C76AF !important;
70 background-color: #2C76AF !important;
71 }
72 .modal__btn.learn-more {
73 background: white;
74 border: 1px solid #0C2074;
75 color: #0C2074;
76 }
77 #opt-out-button[disabled="true"] {
78 background-color: rgba(0,0,0,.15);
79 color: rgba(0,0,0,.45);
80 border-color: rgba(0,0,0,.25);
81 }
82 #opt-out-button:hover[disabled="true"] {
83 background-color: rgba(0,0,0,.15) !important;
84 color: rgba(0,0,0,.45) !important;
85 border-color: rgba(0,0,0,.25) !important;
86 }
87 #opt-out-button:focus {
88 outline-style: solid;
89 outline-color: white;
90 outline-offset: -3px;
91 outline-width: 1px;
92 }
93 .opt-out-link svg {
94 width: 30px;
95 height: 14px;
96 width: auto;
97 vertical-align: middle;
98 }
99 .modal__overlay {
100 position: fixed;
101 top: 0;
102 left: 0;
103 right: 0;
104 bottom: 0;
105 background: rgba(0,0,0,0.6);
106 display: flex;
107 justify-content: center;
108 align-items: center;
109 }
110
111 .modal__container {
112 background-color: #fff;
113 padding: 30px;
114 max-width: 500px;
115 max-height: 100vh;
116 border-radius: 4px;
117 overflow-y: auto;
118 box-sizing: border-box;
119 }
120
121 .modal__header {
122 display: flex;
123 justify-content: space-between;
124 align-items: center;
125 }
126
127 .modal__title {
128 margin-top: 0;
129 margin-bottom: 0;
130 font-weight: 600;
131 font-size: 20px;
132 line-height: 1.25;
133 color: #00449e;
134 box-sizing: border-box;
135 }
136
137 .modal__close {
138 background: transparent;
139 border: 1px solid white;
140 padding: 4px 8px;
141 }
142 .modal__close:hover {
143 border: 1px solid black;
144 }
145
146 .modal__header .modal__close:before { content: "\2715"; }
147
148 .modal__content {
149 margin-top: 2rem;
150 margin-bottom: 2rem;
151 line-height: 1.5;
152 }
153
154 @keyframes mmfadeIn {
155 from { opacity: 0; }
156 to { opacity: 1; }
157 }
158
159 @keyframes mmfadeOut {
160 from { opacity: 1; }
161 to { opacity: 0; }
162 }
163
164 @keyframes mmslideIn {
165 from { transform: translateY(15%); }
166 to { transform: translateY(0); }
167 }
168
169 @keyframes mmslideOut {
170 from { transform: translateY(0); }
171 to { transform: translateY(-10%); }
172 }
173
174 .micromodal-slide {
175 display: none;
176 }
177
178 .micromodal-slide.is-open {
179 display: block;
180 }
181
182 .micromodal-slide[aria-hidden="false"] .modal__overlay {
183 animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
184 }
185
186 .micromodal-slide[aria-hidden="false"] .modal__container {
187 animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
188 }
189
190 .micromodal-slide[aria-hidden="true"] .modal__overlay {
191 animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
192 }
193
194 .micromodal-slide[aria-hidden="true"] .modal__container {
195 animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
196 }
197
198 .micromodal-slide .modal__container,
199 .micromodal-slide .modal__overlay {
200 will-change: transform;
201 }
202 </style>
203
204 <div class="modal micromodal-slide" id="modal-1" aria-hidden="true">
205 <div class="modal__overlay" tabindex="-1" data-micromodal-close>
206 <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
207 <header class="modal__header">
208 <h2 class="modal__title" id="modal-1-title">
209 Your California privacy choices
210 </h2>
211 <button class="modal__close" aria-label="Close modal" data-micromodal-close></button>
212 </header>
213 <div class="modal__content" id="modal-1-content">
214 <div id="message-no-cookie">
215 <p>
216 We use technologies, such as cookies, that gather information on our website. That information is used for a variety of purposes, such as to understand how visitors interact with our websites, or to serve advertisements on our websites or on other websites. The use of technologies, such as cookies, constitutes a ‘share’ or ‘sale’ of personal information under the California Privacy Rights Act. You can stop the use of certain third-party tracking technologies that are not considered our service providers by clicking on “Opt-Out” below or by broadcasting the global privacy control signal.</p>
217
218 <p> </p>
219
220 <p>Note that due to technological limitations, if you visit our website from a different computer or device, or clear cookies on your browser that store your preferences, you will need to return to this screen to opt-out and/or rebroadcast the signal. You can find a description of the types of tracking technologies, and your options with respect to those technologies, by clicking “Learn more” below.</p>
221 </div>
222 <div id="message-with-cookie">
223 <p>You have successfully opted-out.</p>
224 </div>
225 </div>
226 <div class="modal__footer">
227 <a href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank" class="modal__btn learn-more" aria-label="Learn more">Learn More</a>
228 <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button>
229 </div>
230 </div>
231 </div>
232 </div>
233 <!-- END CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP -->
234 <script>
235 const fdicNode = document.querySelector('.footer .fdic');
236 </script>
237 <#if url?contains("11t1m")>
238 <script>
239 document.querySelector('.footer .copyright').classList.add("ecdma-footer-client-name-copyright");
240 fdicNode.innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a>';
241 </script>
242 <#else>
243 <script>
244 document.querySelector('.footer .copyright').classList.add("ecdma-footer-client-name-copyright");
245 fdicNode.innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a>';
246 var newNode = document.createElement("div");
247 newNode.classList.add("member-agreement");
248 newNode.innerHTML='<a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!0}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a>';
249 var parent = fdicNode.parentNode;
250 parent.insertBefore(newNode, fdicNode);
251 </script>
252 </#if>
253
254 <#if partnerUrl?has_content>
255 <script>
256 document.querySelector('.copyright .homelink').innerHTML="<a class='text-color-white' href='${partnerUrl!''}' title='${partnerName!''}' target='_blank'>Home</a>";
257 </script>
258 </#if>
259
260 <script>
261 /* BEGIN CALIFORNIA OPT-OUT MODAL TRIGGER */
262 fdicNode.insertAdjacentHTML('afterend', '<div style="display: inline-block; margin-left: 100px;"><a href="javascript:void(0);" class="opt-out-link text-color-white" data-micromodal-trigger="modal-1">Your California privacy choices <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve"><path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#fff"/><path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#06f"/><path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" fill="#fff"/><path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" fill="#06f"/></svg></a></div>');
263 /* END CALIFORNIA OPT-OUT MODAL TRIGGER */
264 </script>
265 <!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC -->
266
267 <script>
268 window.getCookieDomain = function() {
269 var hostname = window.location.hostname.split(".");
270 return hostname && hostname.slice(hostname.length - 2).join(".");
271 }
272 window.setToOptOut = function() {
273 if (window.getCookie('privacy_optout')) {
274 document.getElementById('message-no-cookie').style.display = 'none';
275 document.getElementById('message-with-cookie').style.display = 'block';
276 document.getElementById('opt-out-button').setAttribute('disabled', true)
277 } else {
278 document.getElementById('message-no-cookie').style.display = 'block';
279 document.getElementById('message-with-cookie').style.display = 'none';
280 }
281 }
282 window.getCookie = function(name) {
283 var value = '; ' + document.cookie;
284 var parts = value.split('; ' + name + '=');
285 if (parts.length === 2) return parts.pop().split(';').shift();
286 }
287 window.californiaOptOut = function() {
288 if (!window.getCookie('privacy_optout')) {
289 document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;';
290 try {
291 if (window.CustomEvent) {
292 window.dispatchEvent(new CustomEvent('privacy_optout'));
293 } else {
294 var privacyOptoutEvent = document.createEvent('Event');
295 privacyOptoutEvent.initEvent('privacy_optout', true, true);
296 window.dispatchEvent(privacyOptoutEvent);
297 }
298 window.setToOptOut();
299 } catch (err) {
300 console.error(err);
301 }
302 }
303 }
304 MicroModal.init({
305 onShow: window.setToOptOut
306 });
307 AUI().ready(function() {
308 // user browser setting for Global Privacy Control to opt out of sharing information with third parties
309 const isBrowserGpcOptOut = navigator.globalPrivacyControl;
310 if(isBrowserGpcOptOut === true) {
311 window.californiaOptOut();
312 }
313 });
314 </script>
315 <!-- END CALIFORNIA OPT-OUT MODAL LOGIC -->
316
317</#if>