An error occurred while processing the template.
The following has evaluated to null or missing:
==> clientProfileList?first [in template "10154#10192#18387089" at line 62, column 26]
----
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 clientProfile = clientProfile... [in template "10154#10192#18387089" at line 62, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() >
4<#assign themeDisplay = serviceContext.getThemeDisplay() />
5<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
6<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
7<#assign url404 = '/error/404.html' >
8<#assign environment = url?replace('/11t3.*','','r')>
9
10<#assign text_to_apply_source = "vanity url" >
11<#if qstringmap["sms"]?has_content>
12 <#assign sms = 1 >
13 <#assign text_to_apply_source = "sms" >
14</#if>
15<#if qstringmap["qrCode"]?has_content>
16 <#assign text_to_apply_source = "qr code" >
17</#if>
18
19<#assign lc = qstringmap["ecdma-lc"]?first>
20<#assign lc = htmlUtil.escape(lc)>
21<#assign lc = htmlUtil.escapeJS(lc)>
22
23<#assign prefix = "00000" >
24<#assign lcWithPrefix = prefix + lc >
25<#assign withPrefixLength = lcWithPrefix?length >
26<#assign startHere = withPrefixLength - 5>
27<#assign lc = lcWithPrefix?substring(startHere)>
28
29<#if qstringmap["ecid"]?has_content>
30 <#assign ecidExt = qstringmap["ecid"]?first>
31 <#assign ecidExt = htmlUtil.escape(ecidExt)>
32 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
33 <#assign ecidExt = "&ecid=" + ecidExt>
34
35
36 <#assign campaignId = qstringmap["ecid"]?first >
37 <#assign campaignId = htmlUtil.escape(campaignId)>
38 <#assign campaignId = htmlUtil.escapeJS(campaignId)>
39<#else>
40 <#assign ecidExt="">
41 <#assign campaignId = "" >
42</#if>
43
44<#assign isFromDCOLink = false>
45<#assign dcoSourceCode = ''>
46<#if qstringmap["sourcecode"]?has_content>
47 <#assign dcoSourceCode = qstringmap["sourcecode"]?first>
48 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
49 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
50<#elseif qstringmap["sourceCode"]?has_content>
51 <#assign dcoSourceCode = qstringmap["sourceCode"]?first>
52 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
53 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
54</#if>
55
56<#if dcoSourceCode?has_content>
57 <#assign isFromDCOLink = true>
58</#if>
59
60<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! />
61<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
62<#assign clientProfile = clientProfileList?first>
63<#assign partnerName = clientProfile.getMarketingNameLong()>
64<#assign pbu = clientProfile.getPbu()>
65<#assign subbu = clientProfile.getSUBBRANDBUNBR()>
66
67<#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case>
68<#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!>
69<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+pbu+'&'+subbu)>
70
71 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! />
72<#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
73<#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
74<script>
75//console.log('Partner URL', ${partnerUrl});
76</script>
77<#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
78 <#assign partnerUrl = 'https://' + partnerUrl>
79</#if>
80<script>
81//console.log('Partner URL', ${partnerUrl});
82
83</script>
84<#-- Begin: filter duplicated cards-->
85<#assign temp = []>
86<#assign offerTypeList = []>
87<#if (fiCardsData?size > 0)>
88
89
90<!-- redirect to PANO start -->
91<!-- parse URL for page to determine product -->
92<#if (fiCardsData?first.redirectToPANO == "1")>
93 <#assign pageend = url?index_of("?") - 1 >
94 <#assign urlwoquery = url[0..pageend] >
95 <#assign pagestart = urlwoquery?last_index_of("/") + 1 >
96 <#assign productURL = urlwoquery[pagestart..] >
97 <#assign qstringonly = httpUtil.getQueryString(url) >
98
99 <#if (productURL == "consumer-platinum")>
100 <#assign PANOofferType = "108">
101 <#elseif (productURL == "zero-plus")>
102 <#assign PANOofferType = "109">
103 <#elseif (productURL == "zero-plus-business")>
104 <#assign PANOofferType = "132">
105 <#elseif (productURL == "max-cash")>
106 <#assign PANOofferType = "104">
107 <#elseif (productURL == "consumer-edr")>
108 <#assign PANOofferType = "101">
109 <!-- PANOofferType = "103" -->
110 <#elseif (productURL == "secured")>
111 <#assign PANOofferType = "115">
112 <#elseif (productURL == "smart-business-rewards")>
113 <#assign PANOofferType = "144">
114 <#elseif (productURL == "business-cash-preferred")>
115 <#assign PANOofferType = "128">
116 <#elseif (productURL == "business-real-rewards")>
117 <#assign PANOofferType = "143">
118 <#elseif (productURL == "business-platinum")>
119 <#assign PANOofferType = "121">
120 <#elseif (productURL == "max-cash-secured")>
121 <#assign PANOofferType = "147">
122 <#elseif (productURL == "college-real-rewards")>
123 <#assign PANOofferType = "141">
124 <#elseif (productURL == "travel-rewards-plus")>
125 <#assign PANOofferType = "138">
126 <#elseif (productURL == "reserve-rewards-plus")>
127 <#assign PANOofferType = "154">
128 <#else>
129 <#assign PANOofferType = "0">
130 </#if>
131 <#assign redirectToPANO = 'https://www.mycardapply.com/synindex/?' + qstringonly + "&offertype=" + PANOofferType >
132 <script>
133 console.log('${productURL}');
134 console.log('${PANOofferType}');
135 console.log('${redirectToPANO}');
136 <!-- append #business to PANO Redirect URL if current URL contains #business. PANO uses this to show business tab as selected -->
137 if(window.location.href.includes('#business')){
138 location.href = '${redirectToPANO}'+'#business';
139 } else {
140 location.href = '${redirectToPANO}';
141 }
142 </script>
143</#if>
144<!-- redirect to PANO end -->
145
146
147 <#assign index = 0>
148 <#list fiCardsData as fib>
149 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
150 <#assign offerTypeList = offerTypeList + [fib.offerType]>
151 <#assign temp = temp + fiCardsData[index..index]>
152 </#if>
153 <#assign index = index + 1>
154 </#list>
155 <#assign fiCardsData = temp>
156 <#if (fiCardsData?size > 0)>
157 <div class="content-container content-container-main">
158 <#if url?contains("index")>
159 <#assign product="All Cards">
160 <h1 class="sr-only">${partnerName!'Elan'} Credit Cards</h1>
161 <header class="page-header">
162 <div class="page-header__logo">
163 <#if partnerUrl?has_content>
164 <a href="${partnerUrl!''}">
165 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
166 </a>
167 <#else>
168 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
169 </#if>
170 </div>
171 </header>
172 <#else>
173 <header class="page-header">
174 <#if !isFromDCOLink>
175 <div class="back-overview hide-desktop">
176 <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a>
177 </div>
178 </#if>
179
180 <div class="header-main-logo">
181 <#if partnerUrl?has_content>
182 <a href="${partnerUrl!''}">
183 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
184 </a>
185 <#else>
186 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo">
187 </#if>
188 </div>
189 <#if !isFromDCOLink>
190 <div class="styled-select slate">
191 <nav class="styled-select__dropdown">
192 <div class="back-overview hide-mobile-flex">
193 <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a>
194 </div>
195 <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false">
196 <span class="selected-option"></span>
197 <div class="jn-arrow arrow arrow-right"></div>
198 </a>
199 <a href="javascript:void(0)" aria-label="Open page navigation menu" class="jn-hamburger hamburger" aria-expanded="false">
200 <div class="first-line transform transformed1"></div>
201 <div></div>
202 <div class="transform transformed2"></div>
203 <div></div>
204 </a>
205 <ul>
206 <#list fiCardsData as fib>
207 <#switch fib.offerType>
208 <#case "101">
209 <#assign productURL = "202302/consumer-edr">
210 <#assign productName = "Everyday Rewards+">
211 <#break>
212 <#case "103">
213 <#assign productURL = "202302/consumer-edr">
214 <#assign productName = "Everyday Rewards+">
215 <#break>
216 <#case "104">
217 <#assign productURL = "max-cash">
218 <#assign productName = "Max Cash Preferred Card">
219 <#break>
220 <#case "108">
221 <#assign productURL="202308/consumer-platinum">
222 <#assign productName="Platinum Card">
223 <#break>
224 <#case "109">
225 <#assign productURL="202308/consumer-platinum">
226 <#assign productName="Platinum Card">
227 <#break>
228 <#case "115">
229 <#assign productURL = "secured">
230 <#assign productName = "Secured Card" >
231 <#break>
232 <#case "138">
233 <#assign productURL = "202305/travel-rewards-plus">
234 <#assign productName = "Travel Rewards+" >
235 <#break>
236 <#case "141">
237 <#assign productURL = "college-real-rewards">
238 <#assign productName = "College Real Rewards" >
239 <#break>
240 <#case "147">
241 <#assign productURL = "max-cash-secured">
242 <#assign productName = "Max Cash Secured Card" >
243 <#break>
244 <#case "154">
245 <#assign productURL = "202305/reserve-rewards-plus">
246 <#assign productName = "Reserve Rewards+" >
247 <#break>
248 <#case "121">
249 <#assign productURL = "202208/business-platinum">
250 <#assign productName = "Business Card" >
251 <#break>
252 <#case "128">
253 <#assign productURL = "business-cash-preferred">
254 <#assign productName = "Business Cash Preferred" >
255 <#break>
256 <#case "143">
257 <#assign productURL = "business-real-rewards">
258 <#assign productName = "Business Real Rewards Card" >
259 <#break>
260 <#case "144">
261 <#assign productURL = "smart-business-rewards">
262 <#assign productName = "Smart Business Rewards Card" >
263 <#break>
264 <#default>
265 </#switch>
266 <#if url?matches(".*/${productURL}\\?.*")>
267 <li class="selected" data-value="${productName}" selected="selected"><a href="javascript:void(0)">${productName}</a></li>
268 <#else>
269 <li class="dropdown-item" data-value="${productName}">
270 <a href="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}">
271 ${productName}
272 </a>
273 </li>
274 </#if>
275 </#list>
276 </ul>
277 </nav>
278
279 </div>
280 </#if>
281 </header>
282 <script>
283 function toggleFlyOutMenu() {
284 $('.styled-select').toggleClass('show-select');
285 var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded');
286 if(ariaExpanded !== null) {
287 var isAriaExpanded;
288 if(ariaExpanded === "true") {
289 isAriaExpanded = true;
290 } else {
291 isAriaExpanded = false
292 }
293 $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded);
294 const ariaLabel = isAriaExpanded? "Open page navigation menu" : "Close page navigation menu";
295 $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded).attr('aria-label', ariaLabel);
296 }
297 }
298 AUI().ready(function () {
299 var pageSelected = $('.selected').attr('data-value');
300 $('.jn-hamburger, .dropdown-select').click(function () {
301 toggleFlyOutMenu();
302 });
303 $('.styled-select__dropdown').keydown(function(event) {
304 var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first();
305 var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last();
306
307 if(event.keyCode === 9 ) {
308 // if they tab outside of the nav close the navigation
309 //shift + tab pressed
310 if(event.shiftKey && firstNavigationLink.is(document.activeElement)) {
311 toggleFlyOutMenu();
312 } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) {
313 toggleFlyOutMenu();
314 }
315 }
316 });
317 $('.selected-option').text(pageSelected);
318 });
319 </script>
320 </#if>
321 </div>
322 <script>
323 var reportingData = {};
324
325 //document.addEventListener('DOMContentLoaded', function() {
326 AUI().ready(function () {
327 //console.log('inside ready');
328 var page = location.pathname.split('/')[location.pathname.split('/').length-1];
329 var hostName = location.hostname;
330 function getDomainFromHostname(hostname) {
331 var parts = hostname.split('.');
332 return parts.length === 3 ? parts[1] : parts[0];
333 }
334 var domain = getDomainFromHostname(hostName);
335 var partnerName = "${partnerName!''}";
336 var product = "All Cards";
337 var title = "";
338 var metaDesc = "";
339 var m = document.createElement('meta');
340 switch(page) {
341 case "max-cash-secured":
342 product="Max Cash Secured Card";
343 title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card";
344 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
345 break;
346 case "max-cash":
347 product="Max Cash Preferred Card";
348 title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card";
349 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select.";
350 break;
351 case "consumer-platinum":
352 product="Platinum Card";
353 title = "The purchasing power of Zero | "+partnerName+" Platinum Card";
354 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 18 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card.";
355 break;
356 case "consumer-edr":
357 product="Everyday Rewards+";
358 title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+";
359 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn 15,000 when you spend $500 within the first 90 days.";
360 break;
361 case "secured":
362 product="Secured Card";
363 title = "Strengthen your finances | "+partnerName+" Secured Card";
364 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
365 break;
366 case "college-real-rewards":
367 product="College Real Rewards";
368 title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards";
369 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
370 break;
371 case "smart-business-rewards":
372 product="Smart Business Rewards Card";
373 title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card";
374 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.";
375 break;
376 case "business-cash-preferred":
377 product="Business Cash Preferred";
378 title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred";
379 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses.";
380 break;
381 case "business-real-rewards":
382 product="Business Real Rewards Card";
383 title = "Earn up to 1.5X points with no caps | "+partnerName+" Business Real Rewards Card";
384 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ;
385 break;
386 case "business-platinum":
387 product="Business Card";
388 title = "Pay down your other credit card balances faster | "+partnerName+" Business Card";
389 metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 18 Billing Cycles.";
390 break;
391 case "travel-rewards-plus":
392 product="Travel Rewards+"
393 title = partnerName + " | Travel Rewards+ Card";
394 metaDesc = "Make travel more rewarding with unlimited 4x points on travel and frequent popular categories."
395 break;
396 case "reserve-rewards-plus":
397 product="Reserve Rewards+"
398 title = partnerName + " | Reserve Rewards+ Card";
399 metaDesc = "Get exceptional rewards on travel and frequent purchases with this exclusive metal card.";
400 break;
401 default:
402 product = "All Cards";
403 title = partnerName + " Credit Card Index Page";
404 metaDesc = "Apply Today for a "+partnerName+" Credit Card.";
405 }
406 document.title = title;
407 m.name = 'description';
408 m.content = metaDesc;
409 document.head.appendChild(m);
410
411 var lc = "${lc!'0'}";
412
413 /* update SiteCatalyst data object */
414 reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' ');
415 reportingData.page_type = 'product';
416 reportingData.site_section = 'credit cards';
417 reportingData.platform = 'microsite';
418 reportingData.campaign_id = '${campaignId}';
419 reportingData.location_code = lc;
420 reportingData.partner_name = partnerName;
421 reportingData.product = product;
422 reportingData.text_to_apply_source = '${text_to_apply_source}';
423 reportingData.visitor_type = 'prospect';
424 reportingData.Banker_id = '0';
425 reportingData.Banker_code = '0';
426
427
428 /* SiteCatalyst pageView tracking */
429 AUI().ready(function() {
430 if (window.publisherFW) {
431 //console.log("pageView");
432 window.publisherFW.publishEvent("pageView", reportingData);
433 }
434 });
435
436 jQuery('.jn-button, .applyNowLink').on('click', function(e){
437 var buttonName = $(this).data('button-name');
438 var productName = $(this).data('product-name');
439 /* SiteCatalyst onClick tracking */
440 reportingData.applyButton = buttonName;
441 reportingData.product = productName;
442
443 if (window.publisherFW) {
444 //console.log('clicked', reportingData);
445 window.publisherFW.publishEvent("onClick", reportingData);
446 }
447
448 });
449
450 jQuery('.applyNowLink').on('click', function(e){
451 ga("send", {
452 hitType: "event",
453 eventAction: "ApplyNow",
454 eventCategory: "click",
455 eventLabel: "BottomButton"
456 });
457 });
458
459 });
460 </script>
461 <#else>
462 <script>
463 console.log("Empty card list");
464 location.href = '${url404}';
465 </script>
466 </#if>
467<#else>
468 <script>
469 console.log("FI Cards Data empty", "pbu:", "${pbu}", ",subbu:","${subbu}");
470 location.href = '${url404}';
471 </script>
472</#if>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> clientProfileList?first [in template "10154#10192#18372542" at line 19, column 26]
----
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 clientProfile = clientProfile... [in template "10154#10192#18372542" at line 19, column 1]
----
1<#assign uniqueID = randomNamespace />
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()>
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4<#assign environment = url?replace('/11t3/index.*','','r')>
5
6<#assign lc= qstringmap["ecdma-lc"]?first>
7<#assign lc = htmlUtil.escape(lc)>
8<#assign lc = htmlUtil.escapeJS(lc)>
9
10<#assign prefix = "00000" >
11<#assign lcWithPrefix = prefix + lc >
12<#assign withPrefixLength = lcWithPrefix?length >
13<#assign startHere = withPrefixLength - 5>
14<#assign lc = lcWithPrefix?substring(startHere)>
15
16<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! >
17<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
18<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
19<#assign clientProfile = clientProfileList?first>
20<#assign partnerName = clientProfile.getMarketingNameLong()>
21<#assign pbu = clientProfile.getPbu()>
22<#assign subbu = clientProfile.getSUBBRANDBUNBR()>
23<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!>
24
25
26<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuDataByFeaturedCard','0&'+ pbu + '&'+subbu + '&' + lc)>
27<#assign personalBusinessOfferTypes = utilServ.makeCall('SAA_DistinctCardOffers', '0')>
28
29<#assign personalOfferTypes = []>
30<#assign businessOfferTypes = []>
31
32<#list personalBusinessOfferTypes as pbOfferType>
33 <#if pbOfferType.groupname?has_content && pbOfferType.offertype?has_content>
34 <#if pbOfferType.groupname == "Personal">
35 <#assign personalOfferTypes += [pbOfferType.offertype]>
36 <#elseif pbOfferType.groupname == "Business">
37 <#assign businessOfferTypes += [pbOfferType.offertype]>
38 </#if>
39 </#if>
40</#list>
41
42
43<#assign productTypeValue = "">
44<#if productType.getData()?has_content>
45 <#assign productKey = productType.getData()>
46 <#assign productTypeValue = productType.optionsMap[productKey]>
47
48</#if>
49
50<#assign personalCards = []>
51<#assign businessCards = []>
52<#assign finalList = []>
53<#assign index = 0>
54
55<#list fiCardsData as fib>
56 <#if (fib.offerType?has_content)>
57 <#if (personalOfferTypes?seq_contains(fib.offerType))>
58 <#assign personalCards = personalCards + fiCardsData[index..index]>
59 <#elseif (businessOfferTypes?seq_contains(fib.offerType))>
60 <#assign businessCards = businessCards + fiCardsData[index..index]>
61 </#if>
62 </#if>
63 <#assign index = index + 1>
64</#list>
65
66
67<#if productTypeValue == "Personal">
68 <#list personalCards as personalCard>
69 <#if product.getSiblings()?has_content>
70 <#list product.getSiblings() as productItem>
71 <#if personalCard.offerType == productItem.productOfferType.getData()>
72 <#assign finalList = finalList + [personalCard]>
73 </#if>
74 </#list>
75 </#if>
76 </#list>
77<#elseif productTypeValue == "Business">
78 <#list businessCards as businessCard>
79 <#if product.getSiblings()?has_content>
80 <#list product.getSiblings() as productItem>
81 <#if businessCard.offerType == productItem.productOfferType.getData()>
82 <#assign finalList = finalList + [businessCard]>
83 </#if>
84 </#list>
85 </#if>
86 </#list>
87</#if>
88
89<#macro renderCards finalListMacro>
90 <#assign count = 0>
91 <#list finalListMacro as result>
92 <#if count < 3>
93 <#if product.getSiblings()?has_content>
94 <#list product.getSiblings() as productItem>
95 <#if result.offerType == productItem.productOfferType.getData()>
96
97 <#assign productOfferTypeValue = product.productOfferType.optionsMap[productItem.productOfferType.getData()]>
98 <#assign productOfferType = productOfferTypeValue?substring(productOfferTypeValue?index_of(" - ") + 3)!''>
99 <div class="card">
100 <div class="card__content">
101
102 <div class="card__content-left">
103 <#assign cardArtImage = cdnCardArtUrl + "/" + result.filename + ".png" >
104 <#assign cardArtImageAlt = cdnCardArtUrl + "/" + result.filename + ".jpg" >
105 <#assign cardArtImageAltText = partnerName + " " + productOfferType>
106 <img class="card__image" src="${cardArtImage!''}" alt="${cardArtImageAltText}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
107
108 <#if (productItem.learnMoreURL.getData())??>
109 <a class="card__learn-more" href="${environment}${productItem.learnMoreURL.getData()!''}?ecdma-lc=${lc}" rel="noopener noreferrer">
110 Learn More <span class="sr-only">about ${productOfferType!''}</span>
111 </a>
112 </#if>
113
114 </div>
115
116
117 <div class="card__content-right">
118 <h3 class="product-offer-type">
119 ${productOfferType?upper_case!''}
120
121 <#if (productItem.cardNameFootnotes.getData())??>
122 <sup>${productItem.cardNameFootnotes.getData()}</sup>
123 </#if>
124 </h3>
125
126 <#if (productItem.offerCopy.getData())??>
127 <div class="offer-copy">
128 ${productItem.offerCopy.getData()}
129 </div>
130 </#if>
131
132 </div>
133 </div>
134 </div>
135
136 </#if>
137 </#list>
138 </#if>
139 <#assign count = count + 1>
140 </#if>
141 </#list>
142</#macro>
143
144<#if (finalList?? && finalList?has_content && finalList?size > 1)>
145 <#assign count = 0>
146 <#assign countGlider = 0>
147 <div class="${productTypeValue}-featured-cards tier3-syn-featured-cards-2024 <#if productTypeValue == 'Business'>hide</#if>" id="${uniqueID}">
148 <h2 id="featured-glider-label" class="super-head">FEATURED CREDIT CARD OFFERS</h2>
149 <div class="card-container">
150 <@renderCards finalListMacro=finalList />
151 </div>
152 <div class="featured-glider-container" aria-roledescription="carousel" aria-labelledby="featured-glider-label">
153 <div id="featured-glider-slides" class="featured-glider">
154 <@renderCards finalListMacro=finalList />
155 </div>
156 <button aria-label="Previous slide" class="glider-prev" aria-controls="featured-glider-slides"></button>
157 <button aria-label="Next slide" class="glider-next" aria-controls="featured-glider-slides"></button>
158 <div role="tablist" class="dots"></div>
159 </div>
160 </div>
161</#if>
162<style>
163 #content .tier3-syn-featured-cards-2024 {
164 max-width: 1336px;
165 padding: 0 20px;
166 margin: 0 auto;
167 }
168 @media (min-width: 1376px) {
169 #content .tier3-syn-featured-cards-2024 {
170 margin-top: 30px;
171 }
172 }
173 #content .tier3-syn-featured-cards-2024 .featured-glider-container {
174 display: block !important;
175 position: relative;
176 margin-bottom: 20px;
177 }
178 #content .tier3-syn-featured-cards-2024 .featured-glider-container .card {
179 flex: 375px;
180 }
181 @media (min-width: 1200px) {
182 #content .tier3-syn-featured-cards-2024 .featured-glider-container {
183 display: none !important;
184 }
185 }
186 #content .tier3-syn-featured-cards-2024 .featured-glider {
187 padding-top: 40px;
188 margin-bottom: 15px;
189 overflow-x: hidden;
190 }
191 #content .tier3-syn-featured-cards-2024 .card-container {
192 display: flex;
193 gap: 30px;
194 flex-wrap: nowrap;
195 justify-content: space-between;
196 margin-top: 40px;
197 margin-bottom: 60px;
198 display: none !important;
199 justify-content: center;
200
201 }
202 @media (min-width: 1200px) {
203 #content .tier3-syn-featured-cards-2024 .card-container {
204 display: flex !important;
205 }
206 }
207 #content .tier3-syn-featured-cards-2024 .card {
208 background-color: var(--ecdma-bg-color);
209 border-radius: 10px;
210 padding: 0 20px 15px 20px;
211 margin: 0 20px;
212 flex: 33%;
213 flex-grow: 0;
214 }
215 @media (min-width: 1200px) {
216 #content .tier3-syn-featured-cards-2024 .card {
217 margin: 0;
218 }
219 }
220 #content .tier3-syn-featured-cards-2024 .card__content {
221 display: flex;
222 height: 100%;
223 }
224 #content .tier3-syn-featured-cards-2024 .card__content-left {
225 display: flex;
226 flex-direction: column;
227 margin-right: 20px;
228 justify-content: space-between;
229 height: 100%;
230 }
231 #content .tier3-syn-featured-cards-2024 .card__content-right {
232 flex: 1;
233 margin-top: 20px;
234 }
235 #content .tier3-syn-featured-cards-2024 .card__image {
236 border-radius: 12px;
237 width: 100%;
238 height: auto;
239 border-radius: 8px;
240 max-width: 112px !important;
241 max-height: 112px;
242 margin-top: -10px;
243 object-fit: contain;
244 }
245 #content .tier3-syn-featured-cards-2024 .card__image--vertical {
246 margin-top: -20px;
247 }
248 #content .tier3-syn-featured-cards-2024 .product-offer-type {
249 margin-bottom: 6px;
250 color: white;
251 letter-spacing: 1px;
252 font-size: 13px;
253 font-weight: 400;
254 line-height: 1.5;
255 }
256 #content .tier3-syn-featured-cards-2024 .product-offer-type sup {
257 font-size: 10px;
258 line-height: 13px;
259 }
260 #content .tier3-syn-featured-cards-2024 .offer-copy {
261 color: white;
262 }
263 #content .tier3-syn-featured-cards-2024 .card__learn-more {
264 background-color: #fff;
265 border: 1px solid white;
266 color: var(--ecdma-text-color);
267 font-size: 13px;
268 cursor: pointer;
269 text-decoration: none;
270 text-align: center;
271 text-transform: capitalize;
272 line-height: 15px;
273 margin-top: 5px;
274 min-width: 112px;
275 height: 35px;
276 line-height: 35px;
277 }
278 #content .tier3-syn-featured-cards-2024 .card__learn-more:hover {
279 background-color: var(--ecdma-hover-color);
280 color: #fff;
281 }
282 #content .tier3-syn-featured-cards-2024 .card__learn-more:focus {
283 outline: 1px solid white;
284 outline-offset: 3px;
285 }
286</style>
287<script>
288/* This template is added to a single page multiple times. iife keeps glider/vars from overriding each other */
289(() => {
290 let featuredGlider = null;
291 if(document.querySelector('#${uniqueID}.tier3-syn-featured-cards-2024 .featured-glider')) {
292 featuredGlider = new Glider(document.querySelector('#${uniqueID}.tier3-syn-featured-cards-2024 .featured-glider'), {
293 slidesToShow: 'auto',
294 itemWidth: 375,
295 slidesToScroll: 1,
296 scrollLockDelay: 100,
297 draggable: true,
298 scrollLock: true,
299 arrows: {
300 prev: '#${uniqueID}.tier3-syn-featured-cards-2024 .glider-prev',
301 next: '#${uniqueID}.tier3-syn-featured-cards-2024 .glider-next'
302 },
303 dots: '#${uniqueID}.tier3-syn-featured-cards-2024 .dots',
304 });
305 }
306 const images = document.querySelectorAll('#${uniqueID}.tier3-syn-featured-cards-2024 .card__image');
307 images.forEach(img => {
308 const width = img.naturalWidth;
309 const height = img.naturalHeight;
310 if(height > width) {
311 img.classList.add('card__image--vertical');
312 }
313 });
314
315 AUI().ready(() => {
316 /* Make the slider the correct size after the theme and everything is loaded*/
317 if(document.querySelector('#${uniqueID}.tier3-syn-featured-cards-2024 .featured-glider')){
318 featuredGlider.refresh(false);
319 }
320
321 const productTypeValue = '${productTypeValue}';
322 const thisTabSelector = productTypeValue === "Personal"? '#tab-Personal' : '#tab-Business';
323 /* If the resize the screen and one of the featured card glider is hidden. The hidden glider dose not resize. On show of glider resize it. */
324 document.querySelectorAll(thisTabSelector).forEach(tab => {
325 tab.onclick = () => {
326 setTimeout(() => {featuredGlider.refresh(false);}, 0);
327 };
328 });
329 })
330})();
331</script>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> clientProfileList?first [in template "10154#10192#18372542" at line 19, column 26]
----
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 clientProfile = clientProfile... [in template "10154#10192#18372542" at line 19, column 1]
----
1<#assign uniqueID = randomNamespace />
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()>
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4<#assign environment = url?replace('/11t3/index.*','','r')>
5
6<#assign lc= qstringmap["ecdma-lc"]?first>
7<#assign lc = htmlUtil.escape(lc)>
8<#assign lc = htmlUtil.escapeJS(lc)>
9
10<#assign prefix = "00000" >
11<#assign lcWithPrefix = prefix + lc >
12<#assign withPrefixLength = lcWithPrefix?length >
13<#assign startHere = withPrefixLength - 5>
14<#assign lc = lcWithPrefix?substring(startHere)>
15
16<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! >
17<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
18<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
19<#assign clientProfile = clientProfileList?first>
20<#assign partnerName = clientProfile.getMarketingNameLong()>
21<#assign pbu = clientProfile.getPbu()>
22<#assign subbu = clientProfile.getSUBBRANDBUNBR()>
23<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!>
24
25
26<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuDataByFeaturedCard','0&'+ pbu + '&'+subbu + '&' + lc)>
27<#assign personalBusinessOfferTypes = utilServ.makeCall('SAA_DistinctCardOffers', '0')>
28
29<#assign personalOfferTypes = []>
30<#assign businessOfferTypes = []>
31
32<#list personalBusinessOfferTypes as pbOfferType>
33 <#if pbOfferType.groupname?has_content && pbOfferType.offertype?has_content>
34 <#if pbOfferType.groupname == "Personal">
35 <#assign personalOfferTypes += [pbOfferType.offertype]>
36 <#elseif pbOfferType.groupname == "Business">
37 <#assign businessOfferTypes += [pbOfferType.offertype]>
38 </#if>
39 </#if>
40</#list>
41
42
43<#assign productTypeValue = "">
44<#if productType.getData()?has_content>
45 <#assign productKey = productType.getData()>
46 <#assign productTypeValue = productType.optionsMap[productKey]>
47
48</#if>
49
50<#assign personalCards = []>
51<#assign businessCards = []>
52<#assign finalList = []>
53<#assign index = 0>
54
55<#list fiCardsData as fib>
56 <#if (fib.offerType?has_content)>
57 <#if (personalOfferTypes?seq_contains(fib.offerType))>
58 <#assign personalCards = personalCards + fiCardsData[index..index]>
59 <#elseif (businessOfferTypes?seq_contains(fib.offerType))>
60 <#assign businessCards = businessCards + fiCardsData[index..index]>
61 </#if>
62 </#if>
63 <#assign index = index + 1>
64</#list>
65
66
67<#if productTypeValue == "Personal">
68 <#list personalCards as personalCard>
69 <#if product.getSiblings()?has_content>
70 <#list product.getSiblings() as productItem>
71 <#if personalCard.offerType == productItem.productOfferType.getData()>
72 <#assign finalList = finalList + [personalCard]>
73 </#if>
74 </#list>
75 </#if>
76 </#list>
77<#elseif productTypeValue == "Business">
78 <#list businessCards as businessCard>
79 <#if product.getSiblings()?has_content>
80 <#list product.getSiblings() as productItem>
81 <#if businessCard.offerType == productItem.productOfferType.getData()>
82 <#assign finalList = finalList + [businessCard]>
83 </#if>
84 </#list>
85 </#if>
86 </#list>
87</#if>
88
89<#macro renderCards finalListMacro>
90 <#assign count = 0>
91 <#list finalListMacro as result>
92 <#if count < 3>
93 <#if product.getSiblings()?has_content>
94 <#list product.getSiblings() as productItem>
95 <#if result.offerType == productItem.productOfferType.getData()>
96
97 <#assign productOfferTypeValue = product.productOfferType.optionsMap[productItem.productOfferType.getData()]>
98 <#assign productOfferType = productOfferTypeValue?substring(productOfferTypeValue?index_of(" - ") + 3)!''>
99 <div class="card">
100 <div class="card__content">
101
102 <div class="card__content-left">
103 <#assign cardArtImage = cdnCardArtUrl + "/" + result.filename + ".png" >
104 <#assign cardArtImageAlt = cdnCardArtUrl + "/" + result.filename + ".jpg" >
105 <#assign cardArtImageAltText = partnerName + " " + productOfferType>
106 <img class="card__image" src="${cardArtImage!''}" alt="${cardArtImageAltText}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
107
108 <#if (productItem.learnMoreURL.getData())??>
109 <a class="card__learn-more" href="${environment}${productItem.learnMoreURL.getData()!''}?ecdma-lc=${lc}" rel="noopener noreferrer">
110 Learn More <span class="sr-only">about ${productOfferType!''}</span>
111 </a>
112 </#if>
113
114 </div>
115
116
117 <div class="card__content-right">
118 <h3 class="product-offer-type">
119 ${productOfferType?upper_case!''}
120
121 <#if (productItem.cardNameFootnotes.getData())??>
122 <sup>${productItem.cardNameFootnotes.getData()}</sup>
123 </#if>
124 </h3>
125
126 <#if (productItem.offerCopy.getData())??>
127 <div class="offer-copy">
128 ${productItem.offerCopy.getData()}
129 </div>
130 </#if>
131
132 </div>
133 </div>
134 </div>
135
136 </#if>
137 </#list>
138 </#if>
139 <#assign count = count + 1>
140 </#if>
141 </#list>
142</#macro>
143
144<#if (finalList?? && finalList?has_content && finalList?size > 1)>
145 <#assign count = 0>
146 <#assign countGlider = 0>
147 <div class="${productTypeValue}-featured-cards tier3-syn-featured-cards-2024 <#if productTypeValue == 'Business'>hide</#if>" id="${uniqueID}">
148 <h2 id="featured-glider-label" class="super-head">FEATURED CREDIT CARD OFFERS</h2>
149 <div class="card-container">
150 <@renderCards finalListMacro=finalList />
151 </div>
152 <div class="featured-glider-container" aria-roledescription="carousel" aria-labelledby="featured-glider-label">
153 <div id="featured-glider-slides" class="featured-glider">
154 <@renderCards finalListMacro=finalList />
155 </div>
156 <button aria-label="Previous slide" class="glider-prev" aria-controls="featured-glider-slides"></button>
157 <button aria-label="Next slide" class="glider-next" aria-controls="featured-glider-slides"></button>
158 <div role="tablist" class="dots"></div>
159 </div>
160 </div>
161</#if>
162<style>
163 #content .tier3-syn-featured-cards-2024 {
164 max-width: 1336px;
165 padding: 0 20px;
166 margin: 0 auto;
167 }
168 @media (min-width: 1376px) {
169 #content .tier3-syn-featured-cards-2024 {
170 margin-top: 30px;
171 }
172 }
173 #content .tier3-syn-featured-cards-2024 .featured-glider-container {
174 display: block !important;
175 position: relative;
176 margin-bottom: 20px;
177 }
178 #content .tier3-syn-featured-cards-2024 .featured-glider-container .card {
179 flex: 375px;
180 }
181 @media (min-width: 1200px) {
182 #content .tier3-syn-featured-cards-2024 .featured-glider-container {
183 display: none !important;
184 }
185 }
186 #content .tier3-syn-featured-cards-2024 .featured-glider {
187 padding-top: 40px;
188 margin-bottom: 15px;
189 overflow-x: hidden;
190 }
191 #content .tier3-syn-featured-cards-2024 .card-container {
192 display: flex;
193 gap: 30px;
194 flex-wrap: nowrap;
195 justify-content: space-between;
196 margin-top: 40px;
197 margin-bottom: 60px;
198 display: none !important;
199 justify-content: center;
200
201 }
202 @media (min-width: 1200px) {
203 #content .tier3-syn-featured-cards-2024 .card-container {
204 display: flex !important;
205 }
206 }
207 #content .tier3-syn-featured-cards-2024 .card {
208 background-color: var(--ecdma-bg-color);
209 border-radius: 10px;
210 padding: 0 20px 15px 20px;
211 margin: 0 20px;
212 flex: 33%;
213 flex-grow: 0;
214 }
215 @media (min-width: 1200px) {
216 #content .tier3-syn-featured-cards-2024 .card {
217 margin: 0;
218 }
219 }
220 #content .tier3-syn-featured-cards-2024 .card__content {
221 display: flex;
222 height: 100%;
223 }
224 #content .tier3-syn-featured-cards-2024 .card__content-left {
225 display: flex;
226 flex-direction: column;
227 margin-right: 20px;
228 justify-content: space-between;
229 height: 100%;
230 }
231 #content .tier3-syn-featured-cards-2024 .card__content-right {
232 flex: 1;
233 margin-top: 20px;
234 }
235 #content .tier3-syn-featured-cards-2024 .card__image {
236 border-radius: 12px;
237 width: 100%;
238 height: auto;
239 border-radius: 8px;
240 max-width: 112px !important;
241 max-height: 112px;
242 margin-top: -10px;
243 object-fit: contain;
244 }
245 #content .tier3-syn-featured-cards-2024 .card__image--vertical {
246 margin-top: -20px;
247 }
248 #content .tier3-syn-featured-cards-2024 .product-offer-type {
249 margin-bottom: 6px;
250 color: white;
251 letter-spacing: 1px;
252 font-size: 13px;
253 font-weight: 400;
254 line-height: 1.5;
255 }
256 #content .tier3-syn-featured-cards-2024 .product-offer-type sup {
257 font-size: 10px;
258 line-height: 13px;
259 }
260 #content .tier3-syn-featured-cards-2024 .offer-copy {
261 color: white;
262 }
263 #content .tier3-syn-featured-cards-2024 .card__learn-more {
264 background-color: #fff;
265 border: 1px solid white;
266 color: var(--ecdma-text-color);
267 font-size: 13px;
268 cursor: pointer;
269 text-decoration: none;
270 text-align: center;
271 text-transform: capitalize;
272 line-height: 15px;
273 margin-top: 5px;
274 min-width: 112px;
275 height: 35px;
276 line-height: 35px;
277 }
278 #content .tier3-syn-featured-cards-2024 .card__learn-more:hover {
279 background-color: var(--ecdma-hover-color);
280 color: #fff;
281 }
282 #content .tier3-syn-featured-cards-2024 .card__learn-more:focus {
283 outline: 1px solid white;
284 outline-offset: 3px;
285 }
286</style>
287<script>
288/* This template is added to a single page multiple times. iife keeps glider/vars from overriding each other */
289(() => {
290 let featuredGlider = null;
291 if(document.querySelector('#${uniqueID}.tier3-syn-featured-cards-2024 .featured-glider')) {
292 featuredGlider = new Glider(document.querySelector('#${uniqueID}.tier3-syn-featured-cards-2024 .featured-glider'), {
293 slidesToShow: 'auto',
294 itemWidth: 375,
295 slidesToScroll: 1,
296 scrollLockDelay: 100,
297 draggable: true,
298 scrollLock: true,
299 arrows: {
300 prev: '#${uniqueID}.tier3-syn-featured-cards-2024 .glider-prev',
301 next: '#${uniqueID}.tier3-syn-featured-cards-2024 .glider-next'
302 },
303 dots: '#${uniqueID}.tier3-syn-featured-cards-2024 .dots',
304 });
305 }
306 const images = document.querySelectorAll('#${uniqueID}.tier3-syn-featured-cards-2024 .card__image');
307 images.forEach(img => {
308 const width = img.naturalWidth;
309 const height = img.naturalHeight;
310 if(height > width) {
311 img.classList.add('card__image--vertical');
312 }
313 });
314
315 AUI().ready(() => {
316 /* Make the slider the correct size after the theme and everything is loaded*/
317 if(document.querySelector('#${uniqueID}.tier3-syn-featured-cards-2024 .featured-glider')){
318 featuredGlider.refresh(false);
319 }
320
321 const productTypeValue = '${productTypeValue}';
322 const thisTabSelector = productTypeValue === "Personal"? '#tab-Personal' : '#tab-Business';
323 /* If the resize the screen and one of the featured card glider is hidden. The hidden glider dose not resize. On show of glider resize it. */
324 document.querySelectorAll(thisTabSelector).forEach(tab => {
325 tab.onclick = () => {
326 setTimeout(() => {featuredGlider.refresh(false);}, 0);
327 };
328 });
329 })
330})();
331</script>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> clientProfileList?first [in template "10154#10192#460256133" at line 16, column 26]
----
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 clientProfile = clientProfile... [in template "10154#10192#460256133" at line 16, column 1]
----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()>
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
3<#assign lc= qstringmap["ecdma-lc"]?first>
4<#assign lc = htmlUtil.escape(lc)>
5<#assign lc = htmlUtil.escapeJS(lc)>
6
7<#assign prefix = "00000" >
8<#assign lcWithPrefix = prefix + lc >
9<#assign withPrefixLength = lcWithPrefix?length >
10<#assign startHere = withPrefixLength - 5>
11<#assign lc = lcWithPrefix?substring(startHere)>
12
13<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! >
14<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
15<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
16<#assign clientProfile = clientProfileList?first>
17<#assign pbu = clientProfile.getPbu()>
18<#assign subbu = clientProfile.getSUBBRANDBUNBR()>
19<#assign fiCardsDataWT = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu + '&'+subbu + '&' + lc)>
20<#assign personalBusinessWT = utilServ.makeCall('SAA_PillGrouping', '0')>
21<#assign personalWT = []>
22<#assign businessWT = []>
23
24<#list personalBusinessWT as pbWT>
25 <#if pbWT.groupName?has_content && pbWT.offerType?has_content && pbWT.pillName?has_content> <#if pbWT.groupName == "Personal">
26 <#assign personalWT += [pbWT]>
27
28 <#elseif pbWT.groupName == "Business">
29 <#assign businessWT += [pbWT]>
30
31 </#if>
32 </#if>
33</#list>
34
35
36<#assign fiPersonalRaw = personalWT?filter(personalPill -> fiCardsDataWT?filter(fib -> personalPill.offerType == fib.offerType)?size > 0)>
37<#assign fiBusinessRaw = businessWT?filter(businessPill -> fiCardsDataWT?filter(fib -> businessPill.offerType == fib.offerType)?size > 0)>
38
39<#assign fiPersonalWT = []>
40<#list fiPersonalRaw as item>
41 <#if !(fiPersonalWT?map(it -> it.offerType)?seq_contains(item.offerType))>
42 <#assign fiPersonalWT += [item]>
43 </#if>
44</#list>
45
46<#assign fiBusinessWT = []>
47<#list fiBusinessRaw as item>
48 <#if !(fiBusinessWT?map(it -> it.offerType)?seq_contains(item.offerType))>
49 <#assign fiBusinessWT += [item]>
50 </#if>
51</#list>
52
53<#assign fiPersonalSizeWT = fiPersonalWT?size />
54<#assign fiBusinessSizeWT = fiBusinessWT?size />
55
56<#assign hasTabs = entries?has_content>
57<#assign PersonalTab = "Personal">
58<#assign BusinessTab = "Business">
59
60<#if hasTabs>
61 <div class="Tier3-Syn-Tabs-2024-Feature">
62 <#if (fiPersonalSizeWT > 0 && fiBusinessSizeWT >0 ) >
63 <div role="tablist" class="card-type-tabs" aria-label="Choose a credit card type to explore details">
64 <button
65 id="tab-Personal"
66 role="tab"
67 class="card-type-tabs__button"
68 aria-selected="true"
69 aria-controls="content-Personal"
70 data-tab="content-Personal">
71 ${PersonalTab}
72 </button>
73 <button
74 id="tab-Business"
75 role="tab"
76 class="card-type-tabs__button"
77 aria-selected="false"
78 aria-controls="content-Business"
79 data-tab="content-Business">
80 ${BusinessTab}
81 </button>
82 </div>
83 </#if>
84 <div class="all-card-types-content">
85 <#if (fiPersonalSizeWT > 0)>
86 <div
87 id="content-Personal"
88 class="card-type-content"
89 role="tabpanel"
90 aria-labelledby="tab-Personal"
91 style="display: block;">
92
93 <#list entries as entry>
94 <#if entry_index == 0>
95 <#assign assetRenderer = entry.getAssetRenderer() />
96 <@liferay_journal["journal-article"]
97 articleId=assetRenderer.getAssetObject().articleId
98 ddmTemplateKey=assetRenderer.getAssetObject().ddmTemplateKey
99 groupId=assetRenderer.getAssetObject().groupId />
100 </#if>
101 </#list>
102 </div>
103 </#if>
104 <#if (fiBusinessSizeWT > 0)>
105 <div
106 id="content-Business"
107 class="card-type-content"
108 role="tabpanel"
109 aria-labelledby="tab-Business"
110 style="display: none;">
111
112 <#list entries as entry>
113 <#if entry_index == 1>
114 <#assign assetRenderer = entry.getAssetRenderer() />
115 <@liferay_journal["journal-article"]
116 articleId=assetRenderer.getAssetObject().articleId
117 ddmTemplateKey=assetRenderer.getAssetObject().ddmTemplateKey
118 groupId=assetRenderer.getAssetObject().groupId />
119 </#if>
120 </#list>
121 </div>
122 </#if>
123 </div>
124 </div>
125</#if>
126
127<script>
128 AUI().ready(() => {
129 if(${fiPersonalSizeWT} > 0) {
130 hideOrShowDisclaimers("Personal");
131 } else {
132 hideOrShowDisclaimers("Business");
133 }
134 if (window.location.hash === '#business') {
135 const businessTab = document.getElementById('tab-Business');
136 if (businessTab) {
137 businessTab.click();
138 }
139 }
140 });
141 function setPillAndSelectToDefault() {
142 const buttons = document.querySelectorAll('.Tier3-Syn-Tabs-2024 .card-feature-pills__button');
143 buttons.forEach(button => {
144 button.classList.remove('active');
145 button.setAttribute('aria-selected', 'false');
146 });
147
148 buttons.forEach(button => {
149 if (button.getAttribute('data-pill') === 'All Cards') {
150 button.classList.add('active');
151 button.setAttribute('aria-selected', 'true');
152 }
153 });
154
155 const cardFeatureSelect = document.querySelectorAll('.Tier3-Syn-Tabs-2024 .card-feature-select' );
156 cardFeatureSelect.forEach(select=> {
157 if(select.value) {
158 select.value = 'All Cards';
159 }
160 });
161 }
162 document.addEventListener("DOMContentLoaded", function () {
163 const tabs = document.querySelectorAll(".card-type-tabs__button");
164 const tabContents = document.querySelectorAll(".card-type-content");
165
166 tabs.forEach((tab) => {
167 tab.addEventListener("click", () => {
168
169 tabs.forEach((t) => t.setAttribute("aria-selected", "false"));
170
171 tabContents.forEach((content) => {
172 content.style.display = "none";
173 });
174
175 tab.setAttribute("aria-selected", "true");
176
177 const targetContent = document.getElementById(tab.dataset.tab);
178 targetContent.style.display = "block";
179
180 const productType = tab.textContent.trim(); // Get the tab label as the product type
181 widgetButtonSlection(productType);
182 });
183 });
184 });
185
186 function widgetButtonSlection( productType) {
187 hideOrShowFeaturedCards(productType);
188 hideOrShowDisclaimers(productType);
189 hideAllPillSections();
190 document.getElementById("allcards-container-"+productType).style.display = "block";
191 setPillAndSelectToDefault();
192 }
193
194 function hideAllPillSections() {
195 document.getElementById("allcards-container-Personal").style.display = "none";
196 document.getElementById("cashback-container-Personal").style.display = "none";
197 document.getElementById("points-container-Personal").style.display = "none";
198 document.getElementById("travel-container-Personal").style.display = "none";
199 document.getElementById("noannualfee-container-Personal").style.display = "none";
200 document.getElementById("buildcredit-container-Personal").style.display = "none";
201 document.getElementById("lowintrorate-container-Personal").style.display = "none";
202
203 document.getElementById("allcards-container-Business").style.display = "none";
204 document.getElementById("cashback-container-Business").style.display = "none";
205 document.getElementById("points-container-Business").style.display = "none";
206 document.getElementById("travel-container-Business").style.display = "none";
207 document.getElementById("noannualfee-container-Business").style.display = "none";
208 document.getElementById("buildcredit-container-Business").style.display = "none";
209 document.getElementById("lowintrorate-container-Business").style.display = "none";
210 }
211
212 function hideOrShowFeaturedCards(type) {
213 const personalFeaturedCards = document.querySelector('.Personal-featured-cards');
214 const businessFeaturedCards = document.querySelector('.Business-featured-cards');
215
216 if (type === "Personal") {
217 if (personalFeaturedCards) {
218 personalFeaturedCards.classList.remove('hide');
219 }
220 if (businessFeaturedCards) {
221 businessFeaturedCards.classList.add('hide');
222 }
223 } else if (type === "Business") {
224 if (businessFeaturedCards) {
225 businessFeaturedCards.classList.remove('hide');
226 }
227 if (personalFeaturedCards) {
228 personalFeaturedCards.classList.add('hide');
229 }
230 }
231 }
232
233 function hideOrShowDisclaimers(type) {
234 const personalDisclaimers = document.querySelector('.tier3-disclaimer-landing-consumer');
235 const businessDisclaimers = document.querySelector('.tier3-disclaimer-landing-business');
236 if (type === "Personal") {
237 if (personalDisclaimers) {
238 personalDisclaimers.classList.remove('hide');
239 }
240 if (businessDisclaimers) {
241 businessDisclaimers.classList.add('hide');
242 }
243 } else if (type === "Business") {
244 if (businessDisclaimers) {
245 businessDisclaimers.classList.remove('hide');
246 }
247 if (personalDisclaimers) {
248 personalDisclaimers.classList.add('hide');
249 }
250 }
251 }
252</script>
253
254<style>
255 .Tier3-Syn-Tabs-2024-Feature {
256 /*@include page-width-container;*/
257 max-width: 1336px;
258 margin: 0 20px;
259 }
260 @media (min-width: 1376px) {
261 .Tier3-Syn-Tabs-2024-Feature {
262 margin: 0 auto;
263 }
264 }
265 .card-type-tabs {
266 display: flex;
267 justify-content: flex-start;
268 border-bottom: 1px solid #cccccc;
269 }
270
271 .card-type-tabs__button {
272 align-items: center;
273 background-color: transparent;
274 border: none;
275 border-bottom: 4px solid transparent;
276 color: #333;
277 display: flex;
278 flex-direction: column;
279 justify-content: center;
280 padding: 10px 30px;
281 text-align: center;
282 font-size: 20px;
283 font-weight: 700;
284 line-height: 25px;
285 margin-bottom: -1px;
286 flex: 1;
287 }
288 @media (min-width: 992px) {
289 .card-type-tabs__button {
290 flex: 0;
291 }
292 }
293 .card-type-tabs__button:focus {
294 outline: 1px solid #173989;
295 }
296 .card-type-tabs__button[aria-selected="true"] {
297 color: var(--ecdma-text-color);
298 border-bottom: 4px solid var(--ecdma-text-color);
299 }
300 .card-type-tabs__button:hover {
301 color: var(--ecdma-hover-color);
302 border-bottom: 4px solid var(--ecdma-hover-color);
303 }
304
305 .all-card-types-content {
306 }
307
308 .card-type-content {
309 display: none;
310 }
311
312 .card-type-content[style="display: block;"] {
313 display: block !important;
314 }
315
316</style>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> clientProfileList?first [in template "10154#10192#18387094" at line 18, column 30]
----
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 clientProfile = clientProfile... [in template "10154#10192#18387094" at line 18, column 5]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4
5<#assign lc = qstringmap["ecdma-lc"]?first>
6<#assign lc = htmlUtil.escape(lc)>
7<#assign lc = htmlUtil.escapeJS(lc)>
8
9<#assign prefix = "00000" >
10<#assign lcWithPrefix = prefix + lc >
11<#assign withPrefixLength = lcWithPrefix?length >
12<#assign startHere = withPrefixLength - 5>
13<#assign lc = lcWithPrefix?substring(startHere)>
14<#if lc?has_content>
15
16 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
17 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
18 <#assign clientProfile = clientProfileList?first>
19 <#assign partnerName = clientProfile.getMarketingNameLong()>
20
21 <#assign pbu = clientProfile.getPbu()>
22 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
23
24 <#assign fultonBankpbu = "0727491">
25 <#if pbu == fultonBankpbu>
26 <style>
27 #hideFultonInfo {
28 display: none;
29 }
30 </style>
31 </#if>
32
33 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>
34 <#if (fiCardsData?size > 0) >
35 <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)>
36
37 <#if (cardProvider?size > 0)>
38 <#-- This will be V for visa or M for mastercard. -->
39 <#assign cardProviderAbbreviated = cardProvider[0].cardType>
40 <#else>
41 <script>
42 console.log("No card provider(Visa/Master Card) found for disclaimer");
43 </script>
44 </#if>
45
46 <div class="page-disclaimer tier3-disclaimer-${class.getData()}" title="${partnerName!''} - Disclaimer">
47 <div class="page-disclaimer__content">
48 <#if pbuList.getData()?has_content && pbuList.getData()?contains(pbu) && disclaimerBank.getData()?has_content>
49 ${disclaimerBank.getData()}
50 <#else>
51 <#if (disclaimersVisa?has_content && cardProviderAbbreviated?contains("V"))>
52 ${disclaimersVisa.getData()}
53 </#if>
54 <#if (disclaimersMasterCard?has_content && cardProviderAbbreviated?contains("M")) >
55 ${disclaimersMasterCard.getData()}
56 </#if>
57 </#if>
58 </div>
59 </div>
60 <#else>
61 <script>
62 console.log("card data empty");
63 </script>
64 </#if>
65<#else>
66 <script>
67 console.log("No lc for disclaimer");
68 </script>
69</#if>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> clientProfileList?first [in template "10154#10192#18387094" at line 18, column 30]
----
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 clientProfile = clientProfile... [in template "10154#10192#18387094" at line 18, column 5]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4
5<#assign lc = qstringmap["ecdma-lc"]?first>
6<#assign lc = htmlUtil.escape(lc)>
7<#assign lc = htmlUtil.escapeJS(lc)>
8
9<#assign prefix = "00000" >
10<#assign lcWithPrefix = prefix + lc >
11<#assign withPrefixLength = lcWithPrefix?length >
12<#assign startHere = withPrefixLength - 5>
13<#assign lc = lcWithPrefix?substring(startHere)>
14<#if lc?has_content>
15
16 <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
17 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
18 <#assign clientProfile = clientProfileList?first>
19 <#assign partnerName = clientProfile.getMarketingNameLong()>
20
21 <#assign pbu = clientProfile.getPbu()>
22 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
23
24 <#assign fultonBankpbu = "0727491">
25 <#if pbu == fultonBankpbu>
26 <style>
27 #hideFultonInfo {
28 display: none;
29 }
30 </style>
31 </#if>
32
33 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>
34 <#if (fiCardsData?size > 0) >
35 <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)>
36
37 <#if (cardProvider?size > 0)>
38 <#-- This will be V for visa or M for mastercard. -->
39 <#assign cardProviderAbbreviated = cardProvider[0].cardType>
40 <#else>
41 <script>
42 console.log("No card provider(Visa/Master Card) found for disclaimer");
43 </script>
44 </#if>
45
46 <div class="page-disclaimer tier3-disclaimer-${class.getData()}" title="${partnerName!''} - Disclaimer">
47 <div class="page-disclaimer__content">
48 <#if pbuList.getData()?has_content && pbuList.getData()?contains(pbu) && disclaimerBank.getData()?has_content>
49 ${disclaimerBank.getData()}
50 <#else>
51 <#if (disclaimersVisa?has_content && cardProviderAbbreviated?contains("V"))>
52 ${disclaimersVisa.getData()}
53 </#if>
54 <#if (disclaimersMasterCard?has_content && cardProviderAbbreviated?contains("M")) >
55 ${disclaimersMasterCard.getData()}
56 </#if>
57 </#if>
58 </div>
59 </div>
60 <#else>
61 <script>
62 console.log("card data empty");
63 </script>
64 </#if>
65<#else>
66 <script>
67 console.log("No lc for disclaimer");
68 </script>
69</#if>