Web Content Display

Web Content Display

An error occurred while processing the template.
Error on line 36, column 1 in 10154#10192#153417670
clientProfileList?first is undefined.
It cannot be assigned to clientProfile
1<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService") > 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign url = request.attributes.CURRENT_URL > 
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
5<#assign url404 = '/error/404.html' > 
6<#assign environment = url?replace('/11t3.*','','r')> 
7 
8<#assign text_to_apply_source = "vanity url" > 
9<#if qstringmap["sms"]?has_content> 
10    <#assign sms = 1 > 
11    <#assign text_to_apply_source = "sms" > 
12</#if> 
13<#if qstringmap["qrCode"]?has_content> 
14    <#assign text_to_apply_source = "qr code" > 
15</#if> 
16 
17<#assign lc= qstringmap["ecdma-lc"]?first>   
18<#assign prefix = "00000" > 
19<#assign lcWithPrefix = prefix + lc > 
20<#assign withPrefixLength = lcWithPrefix?length > 
21<#assign startHere = withPrefixLength - 5> 
22<#assign lc = lcWithPrefix?substring(startHere)> 
23 
24<#if qstringmap["ecid"]?has_content> 
25    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
26    <#assign campaignId = qstringmap["ecid"]?first > 
27<#else> 
28    <#assign ecidExt=""> 
29    <#assign campaignId = "" > 
30</#if> 
31 
32 
33 
34<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
35<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
36<#assign clientProfile = clientProfileList?first> 
37<#assign partnerName = clientProfile.getMarketingNameLong()> 
38<#assign pbu = clientProfile.getPbu()> 
39<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
40 
41<#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
42<#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
43<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+pbu+'&'+subbu)> 
44 
45<#-- Begin: filter duplicated cards--> 
46<#assign temp = []> 
47<#assign offerTypeList = []>   
48<#if (fiCardsData?size > 0)>      
49    <#assign index = 0> 
50    <#list fiCardsData as fib> 
51        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>  
52            <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
53            <#assign temp = temp + fiCardsData[index..index]>  
54        </#if>   
55        <#assign index = index + 1>               
56    </#list>  
57    <#assign fiCardsData = temp> 
58    <#if (fiCardsData?size > 0)> 
59        <div class="content-container content-container-main" title="${partnerName!''}"> 
60            <#if url?contains("index")> 
61                <#assign product="All Cards"> 
62                <header class="jn-header"> 
63                    <div class="header-logo">  
64                        <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}" title="${partnerName!''}"> 
65                    </div>  
66                </header>         
67            <#else> 
68                <header class="jn-header"> 
69                    <div>  
70                        <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}"><< Back to Overview</a> 
71                    </div>  
72                    <div>  
73                        <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}" title="${partnerName!''}"> 
74                        <div class="styled-select slate"> 
75                            <select> 
76                                <#list fiCardsData as fib> 
77                                    <#if (fib.offerType=="108" || fib.offerType=="109")> 
78                                        <#assign productURL="consumer-platinum"> 
79                                        <#assign productName="Platinum Card"> 
80                                    <#elseif fib.offerType=="104"> 
81                                        <#assign productURL = "max-cash"> 
82                                        <#assign productName = "Max Cash Preferred Card">     
83                                    <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
84                                        <#assign productURL = "real-rewards"> 
85                                        <#assign productName = "Real Rewards Card">                                        
86                                    <#elseif fib.offerType == "115"> 
87                                        <#assign productURL = "secured"> 
88                                        <#assign productName = "Secured Card" > 
89                                    <#elseif fib.offerType == "144"> 
90                                        <#assign productURL = "smart-business-rewards"> 
91                                        <#assign productName = "Smart Business Rewards Card" >                                         
92                                    <#elseif fib.offerType == "128"> 
93                                        <#assign productURL = "business-cashback"> 
94                                        <#assign productName = "Business Cash Card" > 
95                                    <#elseif fib.offerType == "143"> 
96                                        <#assign productURL = "business-real-rewards"> 
97                                        <#assign productName = "Business Real Rewards Card" > 
98                                    <#elseif fib.offerType == "121"> 
99                                        <#assign productURL = "visa-business"> 
100                                        <#assign productName = "Business Card" > 
101                                    </#if> 
102                                    <#if url?matches(".*/${productURL}.*")> 
103                                        <#assign product = productURL> 
104                                        <option value="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}" selected="selected">${productName}</option> 
105                                    <#else> 
106                                        <option value="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}">${productName}</option> 
107                                    </#if> 
108                                </#list> 
109                            </select> 
110                        </div> 
111                    </div>  
112                </header> 
113                <script> 
114                    AUI().ready(function () { 
115                        jQuery('.styled-select select').change(function () { 
116                            location.href = this.value; 
117                        }); 
118                    }); 
119                </script>            
120            </#if> 
121        </div> 
122        <script> 
123                 document.addEventListener('DOMContentLoaded', function() { 
124                    console.log('inside ready'); 
125                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
126                    var hostName = location.hostname;                                 
127                    function getDomainFromHostname(hostname) { 
128                        var parts = hostname.split('.'); 
129                        return parts.length === 3 ? parts[1] : parts[0]; 
130
131                    var domain = getDomainFromHostname(hostName); 
132                    var partnerName = "${partnerName!''}"; 
133                    var product = "All Cards"; 
134                    switch(page) { 
135                        case "max-cash": 
136                            product="Max Cash Preferred Card" 
137                            break;                         
138                        case "consumer-platinum": 
139                            product="Platinum Card" 
140                            break; 
141                        case "real-rewards": 
142                            product="Real Rewards Card" 
143                            break; 
144                        case "secured": 
145                            product="Secured Card" 
146                            break; 
147                        case "smart-business-rewards": 
148                            product="Smart Business Rewards Card" 
149                            break;                             
150                        case "business-cashback": 
151                            product="Business Cash Card" 
152                            break; 
153                        case "business-real-rewards": 
154                            product="Business Real Rewards Card" 
155                            break; 
156                        case "visa-business": 
157                            product="Business Card" 
158                            break; 
159                        default:   
160                            product = "All Cards";                           
161
162                    var lc = "${lc!'0'}"; 
163                    var pageType = "product"; 
164                    if (page == "index") { 
165                        document.title = partnerName + " Credit Card Index Page"; 
166                    }  
167                     var utag_data = window.utag_data || {}; 
168                                                             
169                    /* update SiteCatalyst data object */ 
170                        utag_data.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
171                        utag_data.page_type = 'product';  
172                        utag_data.site_section = 'credit cards'; 
173                        utag_data.platform = 'microsite'; 
174                        utag_data.campaign_id = '${campaignId}'; 
175                        utag_data.location_code = lc; 
176                        utag_data.partner_name = partnerName; 
177                        utag_data.product = product; 
178                        utag_data.text_to_apply_source = '${text_to_apply_source}'; 
179                        utag_data.visitor_type = 'prospect';         
180                        utag_data.Banker_id = '0'; 
181                        utag_data.Banker_code = '0';        
182 
183 
184                    /* SiteCatalyst  pageView tracking */ 
185                        AUI().ready(function() { 
186                            if (window.publisherFW) { 
187                                //console.log("pageView"); 
188                                window.publisherFW.publishEvent("pageView", utag_data); 
189                            }  
190                        }); 
191 
192                    jQuery('.jn-button, .applyNowLink').on('click', function(e){ 
193                        var buttonName = $(this).data('button-name'); 
194                        var productName = $(this).data('product-name'); 
195                        /* SiteCatalyst  onClick tracking */ 
196                        utag_data.applyButton = buttonName; 
197                        utag_data.product = productName; 
198 
199                            if (window.publisherFW) { 
200                                //console.log('clicked', utag_data); 
201                                window.publisherFW.publishEvent("onClick", utag_data); 
202                            }   
203 
204                    }); 
205 
206                    jQuery('.applyNowLink').on('click', function(e){ 
207                        ga("send", { 
208                            hitType: "event", 
209                            eventAction: "ApplyNow", 
210                            eventCategory: "click", 
211                            eventLabel: "BottomButton" 
212                        }); 
213                    }); 
214             
215                }); 
216        </script>    
217    <#else> 
218        <script> 
219            console.log("Empty card list"); 
220            location.href = '${url404}'; 
221        </script> 
222    </#if>    
223<#else> 
224    <script> 
225        console.log("FI Cards Data empty", "pbu:", "${pbu}", ",subbu:","${subbu}"); 
226        location.href = '${url404}'; 
227    </script> 
228</#if> 

Web Content Display

An error occurred while processing the template.
Error on line 31, column 1 in 10154#10192#153417688
clientProfileList?first is undefined.
It cannot be assigned to clientProfile
1<#assign url = request.attributes.CURRENT_URL > 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
5<#assign url404 = '/error/404.html'> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7 
8<#assign lc= qstringmap["ecdma-lc"]?first>   
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 
15 
16<#if qstringmap["ecid"]?has_content> 
17    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
18<#else> 
19    <#assign ecidExt=""> 
20</#if> 
21 
22<#assign campaignId = "" > 
23<#assign ecidExt=""> 
24<#if qstringmap["ecid"]?has_content> 
25    <#assign campaignId = qstringmap["ecid"]?first > 
26    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
27</#if> 
28 
29<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
30<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
31<#assign clientProfile = clientProfileList?first> 
32<#assign partnerName = clientProfile.getMarketingNameLong()> 
33<#assign pbu = clientProfile.getPbu()> 
34<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
35<#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
36 
37<#assign fiCardsData=utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu + '&'+subbu)> 
38<#assign temp = []> 
39<#assign consumerCards = []> 
40<#assign businessCards = []>  
41<#assign offerTypeList = []>       
42<#assign index = 0> 
43<#assign consumerOfferTypes = ["101", "108", "109", "115", "104"]> 
44<#assign businessOfferTypes = ["128", "123", "121", "143", "144"]> 
45<#list fiCardsData as fib>  
46    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))> 
47        <#assign offerTypeList = offerTypeList + [fib.offerType]>  
48        <#if (consumerOfferTypes?seq_contains(fib.offerType))> 
49            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
50        <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
51            <#assign businessCards = businessCards + fiCardsData[index..index]> 
52        </#if>                            
53        <#assign temp = temp + fiCardsData[index..index]>  
54    </#if>   
55    <#assign index = index + 1>               
56</#list>  
57 
58<#assign fiCardsData = temp> 
59<#if (fiCardsData?size > 0)>    
60    <#if url?contains("index")>                    
61        <#assign offerId = ""> 
62        <#assign sourceCode = ""> 
63        <#assign cardArtImage = ""> 
64        <#assign productUrl = ""> 
65        <#assign cardIndex = 1> 
66        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
67            <#if (offerTypeList?seq_contains("104")) > 
68                <#list consumerCards as card> 
69                    <#if (card.offerType=="104")> 
70                        <#assign offerId = card.offerId> 
71                        <#assign sourceCode = card.sourceCode> 
72                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
73                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
74                        <#assign productUrl="max-cash"> 
75                        <#assign product="Max Cash Preferred"> 
76                        <#assign cardIndex = 0> 
77                    </#if> 
78                </#list> 
79            <#else> 
80                <#assign displayedCard = consumerCards[0]> 
81                <#assign offerId = displayedCard.offerId> 
82                <#assign sourceCode = displayedCard.sourceCode> 
83                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
84                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
85                <#if (displayedCard.offerType=="101" || displayedCard.offerType=="103")> 
86                    <#assign productUrl="real-rewards"> 
87                    <#assign product="Real Rewards"> 
88                    <#assign cardIndex = 1> 
89                <#elseif (displayedCard.offerType=="108" || displayedCard.offerType=="109" )> 
90                    <#assign productUrl = "consumer-platinum"> 
91                    <#assign product="Platinum"> 
92                    <#assign cardIndex = 2> 
93                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
94                        <#if (scrapedData?size > 0)> 
95                            <#list scrapedData as sItem> 
96                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
97                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
98                                    <#break> 
99                                </#if> 
100                            </#list> 
101                            <script> 
102                                $(document).ready(function () { 
103                                    var aprText = "${apr}"; 
104                                    if (aprText) { 
105                                        try { 
106                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
107                                            var billing_cycle = matches[1]; 
108                                            var apr_min = apr_min = matches[2]; 
109                                            var apr_max = apr_max = matches[3]; 
110                                            if (billing_cycle) { 
111                                                $(".scraped-billing-cycle").html(billing_cycle); 
112
113                                            if (apr_min) { 
114                                                $(".scraped-apr-min").html(apr_min); 
115
116                                            if (apr_max) { 
117                                                $('.scraped-apr-max').html(apr_max); 
118
119 
120                                        } catch (e) { 
121                                            console.log(e); 
122
123
124                                }); 
125                            </script> 
126                        </#if>                       
127                <#elseif (displayedCard.offerType=="115")> 
128                    <#assign productUrl = "secured"> 
129                    <#assign product="Secured"> 
130                    <#assign cardIndex = 3> 
131                </#if> 
132            </#if> 
133            <#if product != ""> 
134                <#assign card_text = product + " Card"> 
135            </#if>  
136        </#if> 
137        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
138            <#if (offerTypeList?seq_contains("144")) > 
139                <#list businessCards as card> 
140                    <#if (card.offerType=="144")> 
141                        <#assign offerId = card.offerId> 
142                        <#assign sourceCode = card.sourceCode> 
143                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
144                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
145                        <#assign productUrl="smart-business-rewards"> 
146                        <#assign product="Smart Business Rewards"> 
147                        <#assign cardIndex = 0> 
148                    </#if> 
149                </#list> 
150            <#else> 
151                <#assign displayedCard = businessCards[0]> 
152                <#assign offerId = displayedCard.offerId> 
153                <#assign sourceCode = displayedCard.sourceCode> 
154                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
155                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
156                <#if (displayedCard.offerType=="143")> 
157                    <#assign productUrl="business-real-rewards"> 
158                    <#assign product="Business Real Rewards"> 
159                    <#assign cardIndex = 2> 
160                <#elseif (displayedCard.offerType=="128")> 
161                    <#assign productUrl="business-cash"> 
162                    <#assign product="Business Cash"> 
163                    <#assign cardIndex = 1> 
164                <#elseif (displayedCard.offerType=="121")> 
165                    <#assign productUrl = "visa-business"> 
166                    <#assign product="Business"> 
167                    <#assign cardIndex = 3>                     
168                </#if> 
169            </#if> 
170            <#if product != ""> 
171                <#assign card_text = product + " Card"> 
172            </#if>  
173        </#if>  
174         
175        <div class="content-container content-container-main product-${productUrl} tier3-hero-${class.getData()}" title="${partnerName!''} ${product!''} Credit Card"> 
176            <div class="jn-hero jn-hero-card"> 
177                <article class="jn-hero-container"> 
178                    <div class="jn-hero-container-data"> 
179                        <article> 
180                            <div> 
181                                <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
182                                <p>${card_text!''}</p> 
183                            </div> 
184                            <div> 
185                                <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
186                                <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
187                                <#if termsAndConditions.getData() == "yes"> 
188                                    <div class="intro"> 
189                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
190                                        <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
191                                    </div> 
192                                </#if> 
193                                <a href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer"  
194                                    class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
195                                    title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                                 
196                            </div> 
197                        </article> 
198                    </div> 
199                </article> 
200            </div> 
201        </div> 
202    <#else> 
203        <#list fiCardsData as fib> 
204            <#switch fib.offerType> 
205                <#case "144"> 
206                    <#assign cardIndex = 0 > 
207                    <#assign productUrl = "smart-business-rewards"> 
208                    <#assign product="Smart Business Rewards">                                          
209                    <#break> 
210                <#case "104"> 
211                    <#assign cardIndex = 0 > 
212                    <#assign productUrl="max-cash"> 
213                    <#assign product="Max Cash Preferred">                       
214                    <#break> 
215                <#case "128"> 
216                    <#assign cardIndex = 1 > 
217                    <#assign productUrl = "business-cashback"> 
218                    <#assign product="Business Cash">                     
219                    <#break> 
220                <#case "108"> 
221                    <#assign cardIndex = 2 > 
222                    <#assign productUrl = "consumer-platinum"> 
223                    <#assign product="Platinum">                       
224                    <#break> 
225                <#case "109"> 
226                    <#assign cardIndex = 2 > 
227                    <#assign productUrl = "consumer-platinum"> 
228                    <#assign product="Platinum">                                           
229                    <#break>                                         
230                <#case "143"> 
231                    <#assign cardIndex = 2 > 
232                    <#assign productUrl = "business-real-rewards"> 
233                    <#assign product="Business Real Rewards">                     
234                    <#break> 
235                <#case "101"> 
236                    <#assign cardIndex = 1 > 
237                    <#assign productUrl = "real-rewards"> 
238                    <#assign product="Real Rewards">                     
239                    <#break>   
240                <#case "103"> 
241                    <#assign cardIndex = 1 > 
242                    <#assign productUrl = "real-rewards"> 
243                    <#assign product="Real Rewards">                     
244                    <#break>                                          
245                <#case "121"> 
246                    <#assign cardIndex = 3 > 
247                    <#assign productUrl = "visa-business"> 
248                    <#assign product="Business">                      
249                    <#break> 
250                <#case "115"> 
251                    <#assign cardIndex = 3 > 
252                    <#assign productUrl = "secured"> 
253                    <#assign product="Secured">                     
254                    <#break>                     
255                <#default> 
256            </#switch>                          
257            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">  
258            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">                     
259            <#if url?matches(".*/${productUrl}.*")>  
260                <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "121")> 
261                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')> 
262                    <#if (scrapedData?size > 0)> 
263                            <#list scrapedData as sItem> 
264                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
265                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
266                                    <#break> 
267                                </#if> 
268                            </#list> 
269                            <script> 
270                                $(document).ready(function () { 
271                                    var aprText = "${apr}"; 
272                                    console.log(aprText); 
273                                    if (aprText) { 
274                                        try { 
275                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
276                                            var billing_cycle = matches[1]; 
277                                            var apr_min = apr_min = matches[2]; 
278                                            var apr_max = apr_max = matches[3]; 
279                                            console.log('billing_cycle', billing_cycle); 
280                                            console.log('apr_min', apr_min); 
281                                            console.log('apr_max', apr_max); 
282                                            if (billing_cycle) { 
283                                                $(".scraped-billing-cycle").html(billing_cycle); 
284
285                                            if (apr_min) { 
286                                                $(".scraped-apr-min").html(apr_min); 
287
288                                            if (apr_max) { 
289                                                $('.scraped-apr-max').html(apr_max); 
290
291 
292                                        } catch (e) { 
293                                            console.log(e); 
294
295
296                                }); 
297                            </script> 
298                    </#if>   
299                </#if>      
300                <#if product != ""> 
301                    <#assign card_text = product + " Card"> 
302                </#if>        
303                <div class="content-container content-container-main" title="${partnerName!''} ${product!''} Credit Card"> 
304                    <div class="jn-hero jn-hero-card"> 
305                        <article class="jn-hero-container"> 
306                            <div class="jn-hero-container-data"> 
307                                <article> 
308                                    <div> 
309                                        <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
310                                                class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
311                                                <p>${card_text!''}</p> 
312                                    </div> 
313                                    <div> 
314                                        <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
315                                        <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
316                                        <#if termsAndConditions.getData() == "yes"> 
317                                            <div class="intro"> 
318                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
319                                                <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
320                                            </div> 
321                                        </#if> 
322                                        <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
323                                            class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
324                                            title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a> 
325                                    </div>                         
326                                </article> 
327                            </div> 
328                        </article> 
329                    </div> 
330                </div> 
331 
332            </#if> 
333        </#list>    
334 
335    </#if> 
336</#if> 

Web Content Display

An error occurred while processing the template.
Error on line 31, column 1 in 10154#10192#153417688
clientProfileList?first is undefined.
It cannot be assigned to clientProfile
1<#assign url = request.attributes.CURRENT_URL > 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
5<#assign url404 = '/error/404.html'> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7 
8<#assign lc= qstringmap["ecdma-lc"]?first>   
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 
15 
16<#if qstringmap["ecid"]?has_content> 
17    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
18<#else> 
19    <#assign ecidExt=""> 
20</#if> 
21 
22<#assign campaignId = "" > 
23<#assign ecidExt=""> 
24<#if qstringmap["ecid"]?has_content> 
25    <#assign campaignId = qstringmap["ecid"]?first > 
26    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
27</#if> 
28 
29<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
30<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
31<#assign clientProfile = clientProfileList?first> 
32<#assign partnerName = clientProfile.getMarketingNameLong()> 
33<#assign pbu = clientProfile.getPbu()> 
34<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
35<#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
36 
37<#assign fiCardsData=utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu + '&'+subbu)> 
38<#assign temp = []> 
39<#assign consumerCards = []> 
40<#assign businessCards = []>  
41<#assign offerTypeList = []>       
42<#assign index = 0> 
43<#assign consumerOfferTypes = ["101", "108", "109", "115", "104"]> 
44<#assign businessOfferTypes = ["128", "123", "121", "143", "144"]> 
45<#list fiCardsData as fib>  
46    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))> 
47        <#assign offerTypeList = offerTypeList + [fib.offerType]>  
48        <#if (consumerOfferTypes?seq_contains(fib.offerType))> 
49            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
50        <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
51            <#assign businessCards = businessCards + fiCardsData[index..index]> 
52        </#if>                            
53        <#assign temp = temp + fiCardsData[index..index]>  
54    </#if>   
55    <#assign index = index + 1>               
56</#list>  
57 
58<#assign fiCardsData = temp> 
59<#if (fiCardsData?size > 0)>    
60    <#if url?contains("index")>                    
61        <#assign offerId = ""> 
62        <#assign sourceCode = ""> 
63        <#assign cardArtImage = ""> 
64        <#assign productUrl = ""> 
65        <#assign cardIndex = 1> 
66        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
67            <#if (offerTypeList?seq_contains("104")) > 
68                <#list consumerCards as card> 
69                    <#if (card.offerType=="104")> 
70                        <#assign offerId = card.offerId> 
71                        <#assign sourceCode = card.sourceCode> 
72                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
73                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
74                        <#assign productUrl="max-cash"> 
75                        <#assign product="Max Cash Preferred"> 
76                        <#assign cardIndex = 0> 
77                    </#if> 
78                </#list> 
79            <#else> 
80                <#assign displayedCard = consumerCards[0]> 
81                <#assign offerId = displayedCard.offerId> 
82                <#assign sourceCode = displayedCard.sourceCode> 
83                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
84                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
85                <#if (displayedCard.offerType=="101" || displayedCard.offerType=="103")> 
86                    <#assign productUrl="real-rewards"> 
87                    <#assign product="Real Rewards"> 
88                    <#assign cardIndex = 1> 
89                <#elseif (displayedCard.offerType=="108" || displayedCard.offerType=="109" )> 
90                    <#assign productUrl = "consumer-platinum"> 
91                    <#assign product="Platinum"> 
92                    <#assign cardIndex = 2> 
93                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
94                        <#if (scrapedData?size > 0)> 
95                            <#list scrapedData as sItem> 
96                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
97                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
98                                    <#break> 
99                                </#if> 
100                            </#list> 
101                            <script> 
102                                $(document).ready(function () { 
103                                    var aprText = "${apr}"; 
104                                    if (aprText) { 
105                                        try { 
106                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
107                                            var billing_cycle = matches[1]; 
108                                            var apr_min = apr_min = matches[2]; 
109                                            var apr_max = apr_max = matches[3]; 
110                                            if (billing_cycle) { 
111                                                $(".scraped-billing-cycle").html(billing_cycle); 
112
113                                            if (apr_min) { 
114                                                $(".scraped-apr-min").html(apr_min); 
115
116                                            if (apr_max) { 
117                                                $('.scraped-apr-max').html(apr_max); 
118
119 
120                                        } catch (e) { 
121                                            console.log(e); 
122
123
124                                }); 
125                            </script> 
126                        </#if>                       
127                <#elseif (displayedCard.offerType=="115")> 
128                    <#assign productUrl = "secured"> 
129                    <#assign product="Secured"> 
130                    <#assign cardIndex = 3> 
131                </#if> 
132            </#if> 
133            <#if product != ""> 
134                <#assign card_text = product + " Card"> 
135            </#if>  
136        </#if> 
137        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
138            <#if (offerTypeList?seq_contains("144")) > 
139                <#list businessCards as card> 
140                    <#if (card.offerType=="144")> 
141                        <#assign offerId = card.offerId> 
142                        <#assign sourceCode = card.sourceCode> 
143                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
144                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
145                        <#assign productUrl="smart-business-rewards"> 
146                        <#assign product="Smart Business Rewards"> 
147                        <#assign cardIndex = 0> 
148                    </#if> 
149                </#list> 
150            <#else> 
151                <#assign displayedCard = businessCards[0]> 
152                <#assign offerId = displayedCard.offerId> 
153                <#assign sourceCode = displayedCard.sourceCode> 
154                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
155                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
156                <#if (displayedCard.offerType=="143")> 
157                    <#assign productUrl="business-real-rewards"> 
158                    <#assign product="Business Real Rewards"> 
159                    <#assign cardIndex = 2> 
160                <#elseif (displayedCard.offerType=="128")> 
161                    <#assign productUrl="business-cash"> 
162                    <#assign product="Business Cash"> 
163                    <#assign cardIndex = 1> 
164                <#elseif (displayedCard.offerType=="121")> 
165                    <#assign productUrl = "visa-business"> 
166                    <#assign product="Business"> 
167                    <#assign cardIndex = 3>                     
168                </#if> 
169            </#if> 
170            <#if product != ""> 
171                <#assign card_text = product + " Card"> 
172            </#if>  
173        </#if>  
174         
175        <div class="content-container content-container-main product-${productUrl} tier3-hero-${class.getData()}" title="${partnerName!''} ${product!''} Credit Card"> 
176            <div class="jn-hero jn-hero-card"> 
177                <article class="jn-hero-container"> 
178                    <div class="jn-hero-container-data"> 
179                        <article> 
180                            <div> 
181                                <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
182                                <p>${card_text!''}</p> 
183                            </div> 
184                            <div> 
185                                <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
186                                <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
187                                <#if termsAndConditions.getData() == "yes"> 
188                                    <div class="intro"> 
189                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
190                                        <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
191                                    </div> 
192                                </#if> 
193                                <a href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer"  
194                                    class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
195                                    title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                                 
196                            </div> 
197                        </article> 
198                    </div> 
199                </article> 
200            </div> 
201        </div> 
202    <#else> 
203        <#list fiCardsData as fib> 
204            <#switch fib.offerType> 
205                <#case "144"> 
206                    <#assign cardIndex = 0 > 
207                    <#assign productUrl = "smart-business-rewards"> 
208                    <#assign product="Smart Business Rewards">                                          
209                    <#break> 
210                <#case "104"> 
211                    <#assign cardIndex = 0 > 
212                    <#assign productUrl="max-cash"> 
213                    <#assign product="Max Cash Preferred">                       
214                    <#break> 
215                <#case "128"> 
216                    <#assign cardIndex = 1 > 
217                    <#assign productUrl = "business-cashback"> 
218                    <#assign product="Business Cash">                     
219                    <#break> 
220                <#case "108"> 
221                    <#assign cardIndex = 2 > 
222                    <#assign productUrl = "consumer-platinum"> 
223                    <#assign product="Platinum">                       
224                    <#break> 
225                <#case "109"> 
226                    <#assign cardIndex = 2 > 
227                    <#assign productUrl = "consumer-platinum"> 
228                    <#assign product="Platinum">                                           
229                    <#break>                                         
230                <#case "143"> 
231                    <#assign cardIndex = 2 > 
232                    <#assign productUrl = "business-real-rewards"> 
233                    <#assign product="Business Real Rewards">                     
234                    <#break> 
235                <#case "101"> 
236                    <#assign cardIndex = 1 > 
237                    <#assign productUrl = "real-rewards"> 
238                    <#assign product="Real Rewards">                     
239                    <#break>   
240                <#case "103"> 
241                    <#assign cardIndex = 1 > 
242                    <#assign productUrl = "real-rewards"> 
243                    <#assign product="Real Rewards">                     
244                    <#break>                                          
245                <#case "121"> 
246                    <#assign cardIndex = 3 > 
247                    <#assign productUrl = "visa-business"> 
248                    <#assign product="Business">                      
249                    <#break> 
250                <#case "115"> 
251                    <#assign cardIndex = 3 > 
252                    <#assign productUrl = "secured"> 
253                    <#assign product="Secured">                     
254                    <#break>                     
255                <#default> 
256            </#switch>                          
257            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">  
258            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">                     
259            <#if url?matches(".*/${productUrl}.*")>  
260                <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "121")> 
261                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')> 
262                    <#if (scrapedData?size > 0)> 
263                            <#list scrapedData as sItem> 
264                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
265                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
266                                    <#break> 
267                                </#if> 
268                            </#list> 
269                            <script> 
270                                $(document).ready(function () { 
271                                    var aprText = "${apr}"; 
272                                    console.log(aprText); 
273                                    if (aprText) { 
274                                        try { 
275                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
276                                            var billing_cycle = matches[1]; 
277                                            var apr_min = apr_min = matches[2]; 
278                                            var apr_max = apr_max = matches[3]; 
279                                            console.log('billing_cycle', billing_cycle); 
280                                            console.log('apr_min', apr_min); 
281                                            console.log('apr_max', apr_max); 
282                                            if (billing_cycle) { 
283                                                $(".scraped-billing-cycle").html(billing_cycle); 
284
285                                            if (apr_min) { 
286                                                $(".scraped-apr-min").html(apr_min); 
287
288                                            if (apr_max) { 
289                                                $('.scraped-apr-max').html(apr_max); 
290
291 
292                                        } catch (e) { 
293                                            console.log(e); 
294
295
296                                }); 
297                            </script> 
298                    </#if>   
299                </#if>      
300                <#if product != ""> 
301                    <#assign card_text = product + " Card"> 
302                </#if>        
303                <div class="content-container content-container-main" title="${partnerName!''} ${product!''} Credit Card"> 
304                    <div class="jn-hero jn-hero-card"> 
305                        <article class="jn-hero-container"> 
306                            <div class="jn-hero-container-data"> 
307                                <article> 
308                                    <div> 
309                                        <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
310                                                class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
311                                                <p>${card_text!''}</p> 
312                                    </div> 
313                                    <div> 
314                                        <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
315                                        <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
316                                        <#if termsAndConditions.getData() == "yes"> 
317                                            <div class="intro"> 
318                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
319                                                <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
320                                            </div> 
321                                        </#if> 
322                                        <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
323                                            class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
324                                            title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a> 
325                                    </div>                         
326                                </article> 
327                            </div> 
328                        </article> 
329                    </div> 
330                </div> 
331 
332            </#if> 
333        </#list>    
334 
335    </#if> 
336</#if> 

Web Content Display

An error occurred while processing the template.
Error on line 29, column 1 in 10154#10192#153417676
clientProfileList?first is undefined.
It cannot be assigned to clientProfile
1<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService") > 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign url = request.attributes.CURRENT_URL > 
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
5<#assign environment = url?replace('/index.*','','r')> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7 
8<script> 
9console.log('${url}'); 
10</script> 
11 
12<#assign lc= qstringmap["ecdma-lc"]?first>   
13<#assign prefix = "00000" > 
14<#assign lcWithPrefix = prefix + lc > 
15<#assign withPrefixLength = lcWithPrefix?length > 
16<#assign startHere = withPrefixLength - 5> 
17<#assign lc = lcWithPrefix?substring(startHere)> 
18 
19 
20<#if qstringmap["ecid"]?has_content> 
21    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
22<#else> 
23    <#assign ecidExt=""> 
24</#if> 
25 
26 
27<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
28<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
29<#assign clientProfile = clientProfileList?first> 
30<#assign partnerName = clientProfile.getMarketingNameLong()> 
31<#assign pbu = clientProfile.getPbu()> 
32<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
33<script> 
34 console.log('pbu:', "${pbu}", 'subbu:', '${subbu}'); 
35</script> 
36<#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
37 
38<#if qstringmap["ecid"]?has_content> 
39    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
40    <#assign campaignId = qstringmap["ecid"]?first > 
41<#else> 
42    <#assign ecidExt=""> 
43    <#assign campaignId = "" > 
44</#if> 
45 
46<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>  
47<#-- filter duplicated cards--> 
48<#assign consumerCards = []> 
49<#assign businessCards = []>  
50<#assign offerTypeList = []>  
51<#assign consumerOfferTypes =['104', '101', '108', '109', '115']> 
52<#assign businessOfferTypes =['144', '128', '143', '121', '123']>      
53<#assign index = 0> 
54<#list fiCardsData as fib> 
55    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
56        <#assign offerTypeList = offerTypeList + [fib.offerType]>     
57        <#if consumerOfferTypes?seq_contains(fib.offerType)> 
58            <#assign consumerCards = consumerCards + 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<#if ((consumerCards?size > 0) || (businessCards?size > 0))> 
67    <div class="content-container content-container-main jn-consumer-content"> 
68        <#if ((consumerCards?size > 0) && (businessCards?size > 0))> 
69            <nav class="jn-primary-nav two-tabs"> 
70                <ul> 
71                    <li title="${partnerName!''} - Personal products"> 
72                        <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a> 
73                    </li> 
74                    <li title="${partnerName!''} - Business products"> 
75                        <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a> 
76                    </li> 
77                </ul> 
78            </nav> 
79        <#else> 
80            <#if (consumerCards?size > 0)> 
81                <nav class="jn-primary-nav" title="${partnerName!''} - Personal products"> 
82                    <ul> 
83                        <li> 
84                            <p class="tab-nav" id="consumerTab"><span>Personal</span></p> 
85                        </li> 
86                    </ul> 
87                </nav> 
88            </#if> 
89            <#if (businessCards?size > 0)> 
90                <nav class="jn-primary-nav" title="${partnerName!''} - Business products"> 
91                    <ul> 
92                        <li> 
93                            <p class="tab-nav" id="businessTab"><span>Business</span></p> 
94                        </li> 
95                    </ul> 
96                </nav> 
97            </#if> 
98        </#if> 
99        <#if (consumerCards?size > 0)> 
100            <div class="tab-more-wrapper">   
101                <div class="jn-consumer-content-wrapper jn-tab-content active transition-start" data-id="consumerTab" title="${partnerName!''} - Personal products"> 
102                     
103                    <#list consumerCards as fib>    
104                            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" > 
105                            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg" > 
106                            <#switch fib.offerType> 
107                                <#case "101"> 
108                                    <#assign productName = "real-rewards"> 
109                                    <#assign product="Real Rewards"> 
110                                    <#assign cardIndex = 1> 
111                                    <#break> 
112                                <#case "108"> 
113                                    <#assign productName = "consumer-platinum"> 
114                                    <#assign product="Platinum"> 
115                                    <#assign cardIndex = 2> 
116                                    <#break> 
117                                <#case "109"> 
118                                    <#assign productName = "consumer-platinum"> 
119                                    <#assign product="Platinum"> 
120                                    <#assign cardIndex = 2> 
121                                    <#break>                                            
122                                <#case "115"> 
123                                    <#assign productName = "secured"> 
124                                    <#assign product="Secured"> 
125                                    <#assign cardIndex = 3> 
126                                    <#break> 
127                                <#case "104"> 
128                                    <#assign productName = "max-cash"> 
129                                    <#assign product="Max Cash"> 
130                                    <#assign cardIndex = 0> 
131                                    <#break> 
132                                <#default> 
133                            </#switch> 
134                            <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
135                            <#assign titleText = titleText?replace('<[^>]+>','','r')> 
136                            <#assign APR=""> 
137                            <#assign AMF=""> 
138                            <#assign BAL=""> 
139                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
140                            <#if (scrapedData?size > 0)> 
141                                <#list scrapedData as sItem> 
142                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
143                                        <#assign APR = sItem.scrapedValue> 
144                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
145                                        <#assign AMF = sItem.scrapedValue> 
146                                    <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) > 
147                                        <#assign BAL = sItem.scrapedValue> 
148                                    </#if> 
149                                    <#if (APR?has_content && AMF?has_content && BAL?has_content)> 
150                                        <#break> 
151                                    </#if> 
152                                </#list> 
153                            </#if>                                          
154                            <div class="jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
155                                <img src="${cardArtImage!''}" alt="${titleText}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
156                                <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
157                                <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
158                                <ul class="actions"> 
159                                    <li> 
160                                        <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
161                                            class="applyNowLink" data-button-name="apply-now-link" data-product-name="${productName!''}" 
162                                            title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
163                                    </li> 
164                                    <li><a href="${environment}/${productName}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
165                                    </li> 
166                                </ul> 
167                                <div class="jn-additional"> 
168                                        <ul class="${fib.offerType}"> 
169                                                <#if (fib.offerType == "104")> 
170                                                <li class="${fib.offerType}"> 
171                                                        <p> 
172                                                            <strong>APR<sup>*</sup> for Purchases: </strong> 
173                                                        ${APR!''} <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer#termsAndCond-details" target="_blank" class="t_c_link">Terms & Conditions</a></p> 
174                                                    </li> 
175                                                    <li class="${fib.offerType}"> 
176                                                            <p> 
177                                                                <strong>Intro APR<sup>*</sup> for Balance Transfers: </strong> 
178                                                            ${BAL!''} <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer#termsAndCond-details" target="_blank" class="t_c_link">Terms & Conditions</a></p> 
179                                                        </li> 
180                                                <#elseif (fib.offerType == "115")> 
181                                            <li class="${fib.offerType}"> 
182                                                <p> 
183                                                    <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
184                                                ${APR!''} <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer#termsAndCond-details" target="_blank" class="t_c_link">Terms & Conditions</a></p> 
185                                            </li> 
186                                            <#else> 
187                                            <li class="${fib.offerType}"> 
188                                                    <p> 
189                                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
190                                                    ${APR!''} <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer#termsAndCond-details" target="_blank" class="t_c_link">Terms & Conditions</a></p> 
191                                                </li> 
192                                            </#if> 
193     
194     
195     
196                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
197                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
198                                                    <li>${marketingInfo.getData()}</li> 
199                                                </#list> 
200                                            </#if> 
201                                            <li> 
202                                                <p>Annual Fee: ${AMF!''} <a  href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}"  target="_blank" class="t_c_link">Terms & Conditions</a></p> 
203                                            </li> 
204                                        </ul> 
205                                </div> 
206                            </div> 
207                    </#list> 
208                </div> 
209            </div> 
210        </#if> 
211        <#if (businessCards?size > 0)>   
212        <div class="tab-more-wrapper">      
213            <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products"> 
214                 
215                <#list businessCards as fib> 
216                        <#assign cardArtImage = cdnCardArtUrl + "/"+fib.filename+".png"> 
217                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
218                        <#switch fib.offerType> 
219                            <#case "144"> 
220                                <#assign productName = "smart-business-rewards"> 
221                                <#assign product="Smart Business Rewards"> 
222                                <#assign cardIndex = 4> 
223                                <#break> 
224                            <#case "128"> 
225                                <#assign productName = "business-cashback"> 
226                                <#assign product="Business Cash"> 
227                                <#assign cardIndex = 5> 
228                                <#break> 
229                            <#case "143"> 
230                                <#assign productName = "business-real-rewards"> 
231                                <#assign product="Business Real Rewards"> 
232                                <#assign cardIndex = 6> 
233                                <#break> 
234                            <#case "121"> 
235                                <#assign productName = "visa-business"> 
236                                <#assign product="Business Card"> 
237                                <#assign cardIndex = 7> 
238                                <#break> 
239                            <#default> 
240                        </#switch> 
241                         
242                        <#assign APR=""> 
243                        <#assign AMF=""> 
244                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
245                            <#if (scrapedData?size > 0)> 
246                                <#list scrapedData as sItem> 
247                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
248                                        <#assign APR = sItem.scrapedValue> 
249                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
250                                        <#assign AMF = sItem.scrapedValue> 
251                                    </#if> 
252                                    <#if (APR?has_content && AMF?has_content)> 
253                                        <#break> 
254                                    </#if> 
255                                </#list> 
256                            </#if>   
257 
258                        <div class="jn-consumer-item" title="${partnerName!''} ${product!''} Credit Card"> 
259                            <img src="${cardArtImage!''}" alt="${partnerName!''}" 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                                    <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
265                                        class="applyNowLink" data-button-name="apply-now-link" data-product-name="${productName!''}" 
266                                        title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
267                                </li> 
268                                <li><a href="${environment}/${productName}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a></li> 
269                            </ul> 
270                            <div class="jn-additional"> 
271                                    <ul> 
272                                            <#if (fib.offerType == "144")> 
273                                        <li> 
274                                            <p> 
275                                                <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
276                                                ${APR!''} 
277                                                <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank" class="t_c_link">Terms & Conditions</a> 
278                                            </p> 
279                                        </li> 
280                                        <#else> 
281                                        <li> 
282                                                <p> 
283                                                    <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
284                                                    ${APR!''} 
285                                                    <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank" class="t_c_link">Terms & Conditions</a> 
286                                                </p> 
287                                            </li> 
288                                        </#if> 
289                                        <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
290                                            <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
291                                                <li>${marketingInfo.getData()}</li> 
292                                            </#list> 
293                                        </#if> 
294                                        <li><p>Annual Fee: ${AMF!''} <a 
295                                            href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank" class="t_c_link">Terms & Conditions</a></p> 
296                                        </li> 
297                                    </ul> 
298                            </div> 
299                        </div> 
300                         
301                </#list> 
302            </div> 
303            </div> 
304        </#if>  
305        <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> 
306        <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> 
307    </div> 
308 
309    <script> 
310        document.addEventListener('DOMContentLoaded', function() { 
311            var tabs=$('.tab-nav'); 
312            var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
313            var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
314            var screenWidthMobile = 768; 
315            var screenWidth = window.innerWidth; 
316            if (tabs.length == 1) { 
317                $(tabs).parent().css('margin', '0'); 
318                if ($(consumerSelector).length > 0) { 
319                    hideHeroAndDisclaimer('business'); 
320                    showHeroAndDisclaimer('consumer'); 
321                    changeCardLayout(consumerSelector); 
322                    renumberFootnote("consumer"); 
323                    createMetaTag("consumer"); 
324                }  
325                if ($(businessSelector).length > 0) { 
326                    $(businessSelector).addClass('active'); 
327                    hideHeroAndDisclaimer('consumer'); 
328                    showHeroAndDisclaimer('business'); 
329                    changeCardLayout(businessSelector); 
330                    renumberFootnote("business"); 
331                    createMetaTag("business"); 
332                }  
333                if(screenWidth > screenWidthMobile) { 
334                    if ($("#consumerTab").length > 0) { 
335                        if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
336                            $('.more-link').show(); 
337                        } else { 
338                            $('.more-link').hide(); 
339                            $('.less-link').hide(); 
340
341                    } else if ($("#businessTab").length > 0) { 
342                        if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
343                            $('.more-link').show(); 
344                        } else { 
345                            $('.more-link').hide(); 
346                            $('.less-link').hide(); 
347
348
349                }  
350            }  
351            if (tabs.length == 2) { 
352                renumberFootnote("consumer"); 
353                renumberFootnote("business"); 
354                createMetaTag("consumer"); 
355                if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
356                    changeCardLayout(consumerSelector); 
357
358                if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
359                    changeCardLayout(businessSelector); 
360
361                if(screenWidth > screenWidthMobile) { 
362                    if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
363                        $('.more-link').show(); 
364                    } else { 
365                        $('.more-link').hide(); 
366                        $('.less-link').hide(); 
367
368                    $(tabs).click(function(){ 
369                        if ($(this).attr('id') === "consumerTab") { 
370                            if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
371                                slideDiv = $('.jn-tab-content.active'); 
372                                $(slideDiv).removeClass('transition-left'); 
373                                $('.less-link').hide(); 
374                                $('.more-link').show(); 
375                            } else { 
376                                $('.less-link').hide(); 
377                                $('.more-link').hide(); 
378
379
380                        if ($(this).attr('id') === "businessTab") { 
381                            if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
382                                slideDiv = $('.jn-tab-content.active'); 
383                                $(slideDiv).removeClass('transition-left'); 
384                                $('.less-link').hide(); 
385                                $('.more-link').show(); 
386                            } else { 
387                                $('.less-link').hide(); 
388                                $('.more-link').hide(); 
389
390
391                    }); 
392
393                var tabsNav = document.querySelectorAll('.tab-nav'); 
394                togglePrimaryNav(tabsNav); 
395
396            $('.more-link, .less-link').click(function(e){ 
397                e.preventDefault(); 
398            }); 
399            $('.more-link').click(function(){ 
400                slideDiv = $('.jn-tab-content.active'); 
401                $(slideDiv).addClass('transition-left'); 
402                $('.less-link').show(); 
403                $(this).hide(); 
404            }); 
405            $('.less-link').click(function(){ 
406                slideDiv = $('.jn-tab-content.active'); 
407                $(slideDiv).removeClass('transition-left'); 
408                $(this).hide(); 
409                $('.more-link').show(); 
410            }); 
411        }); 
412        // Primary Nav function 
413         
414        function togglePrimaryNav(elem) { 
415            for (var i = 0; i < elem.length; i++) { 
416                elem[i].addEventListener("click", function(e) { 
417 
418                    var current = this, 
419                        allSections = document.querySelectorAll('[data-id]'), 
420                        section = document.querySelector("[data-id='"+ current.id +"']"); 
421 
422                    for (var a = 0; a < allSections.length; a++) { 
423                        allSections[a].classList.remove('active'); 
424
425                    for (var c = 0; c < elem.length; c++) { 
426                        if (current != elem[c]) { 
427                            elem[c].classList.remove('active'); 
428                        } else { 
429                            current.classList.add('active'); 
430                            section.classList.add('active'); 
431                            hideHeroAndDisclaimer('consumer'); 
432                            hideHeroAndDisclaimer('business'); 
433                            if(current.getAttribute('id') === "consumerTab"){ 
434                                showHeroAndDisclaimer('consumer'); 
435                            } else if(current.getAttribute('id') === "businessTab"){ 
436                                showHeroAndDisclaimer('business'); 
437
438
439
440                    e.preventDefault(); 
441                }); 
442
443
444 
445        function renumberFootnote(type) { 
446            var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
447            var disclaimerSelector = '.tier3-disclaimer-landing-' + type; 
448            var heroSelector = '.tier3-hero-landing-' + type; 
449            var numOfFootnote = $(disclaimerSelector + ' sup').length; 
450            var showList = []; 
451            var hideList=[]; 
452            for (var i = 1; i <= numOfFootnote; i++) { 
453            var cssClass="tag-" + i; 
454            if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
455                showList.push(i);      
456            } else { 
457                hideList.push(i); 
458
459            }  
460            for (var i = 1; i < showList.length + 1; i++) { 
461                if(showList[i-1] != i) { 
462                    var className="tag-" + showList[i-1]; 
463                    $(heroSelector).find("." +  className).html(i); 
464                    $(discriptionSelector).find("." +  className).html(i); 
465                    $(disclaimerSelector).find("." +  className).html(i); 
466
467
468            for (var i = 0; i <hideList.length; i++) { 
469                var cname="tag-" + hideList[i]; 
470                $(disclaimerSelector).find("." + cname).parent().hide(); 
471            }    
472
473 
474        function changeCardLayout(cssSelector) { 
475            var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
476            console.log('numofcards', numOfCards); 
477            if(numOfCards == 1) { 
478                $(cssSelector).addClass('one-card'); 
479            } else if (numOfCards == 2) { 
480                $(cssSelector).addClass('two-card'); 
481            }   
482
483        function hideHeroAndDisclaimer(type) { 
484            try { 
485                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('show'); 
486                document.querySelector('.tier3-hero-landing-'+ type).classList.add('hide'); 
487            } catch (e) { 
488                console.log(e); 
489
490 
491            try { 
492                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('show'); 
493                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('hide');  
494            } catch (e) { 
495                console.log(e); 
496
497 
498
499        function showHeroAndDisclaimer(type) { 
500            try { 
501                document.querySelector('.tier3-hero-landing-'+ type).classList.add('show'); 
502                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('hide'); 
503            } catch (e) { 
504                console.log(e); 
505
506             
507            try { 
508                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('show'); 
509                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('hide');  
510            } catch (e) { 
511                console.log(e); 
512
513 
514
515        function createMetaTag(type) { 
516            var partnerName = "${partnerName!0}"; 
517            var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
518            var metaDesc =""; 
519            if (type == "consumer") {             
520                if(product_name ==  "consumer-platinum") { 
521                    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."; 
522                } else if(product_name ==  "real-rewards") { 
523                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
524                } else if(product_name ==  "secured") { 
525                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
526                } else if(product_name ==  "max-cash") { 
527                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select."; 
528
529 
530            } else if (type == "business") { 
531                if(product_name ==  "business-cashback") {               
532                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
533                } else if(product_name ==  "business-real-rewards") { 
534                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
535                } else if(product_name ==  "business-visa") { 
536                    metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
537                } else if(product_name ==  "smart-business-rewards") { 
538                    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."; 
539
540
541            var m = document.createElement('meta');  
542            m.name = 'description';  
543            m.content = metaDesc;  
544            document.head.appendChild(m); 
545
546         
547    </script>                 
548</#if> 

Web Content Display

An error occurred while processing the template.
Error on line 14, column 1 in 10154#10192#153417682
clientProfileList?first is undefined.
It cannot be assigned to clientProfile
1<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService") > 
2<#assign url = request.attributes.CURRENT_URL > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4 
5<#assign lc= qstringmap["ecdma-lc"]?first>   
6<#assign prefix = "00000" > 
7<#assign lcWithPrefix = prefix + lc > 
8<#assign withPrefixLength = lcWithPrefix?length > 
9<#assign startHere = withPrefixLength - 5> 
10<#assign lc = lcWithPrefix?substring(startHere)> 
11 
12<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
13<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
14<#assign clientProfile = clientProfileList?first> 
15<#assign partnerName = clientProfile.getMarketingNameLong()> 
16 
17    <div class="content-container" title="${partnerName!''} - Disclaimer"> 
18         <div class="jn-disclaimer tier3-disclaimer-${class.getData()}"> 
19            ${content.getData()} 
20        </div> 
21    </div> 

Web Content Display

An error occurred while processing the template.
Error on line 14, column 1 in 10154#10192#153417682
clientProfileList?first is undefined.
It cannot be assigned to clientProfile
1<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService") > 
2<#assign url = request.attributes.CURRENT_URL > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4 
5<#assign lc= qstringmap["ecdma-lc"]?first>   
6<#assign prefix = "00000" > 
7<#assign lcWithPrefix = prefix + lc > 
8<#assign withPrefixLength = lcWithPrefix?length > 
9<#assign startHere = withPrefixLength - 5> 
10<#assign lc = lcWithPrefix?substring(startHere)> 
11 
12<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
13<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
14<#assign clientProfile = clientProfileList?first> 
15<#assign partnerName = clientProfile.getMarketingNameLong()> 
16 
17    <div class="content-container" title="${partnerName!''} - Disclaimer"> 
18         <div class="jn-disclaimer tier3-disclaimer-${class.getData()}"> 
19            ${content.getData()} 
20        </div> 
21    </div> 

Web Content Display

Cardmember Agreements

Privacy and Security