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()> 
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="platinum"> 
79                                        <#assign productName="Platinum Card"> 
80                                    <#elseif fib.offerType=="101"> 
81                                        <#assign productURL = "real-rewards"> 
82                                        <#assign productName = "Real Rewards Card"> 
83                                    <#elseif fib.offerType == "115"> 
84                                        <#assign productURL = "secured"> 
85                                        <#assign productName = "Secured Card" > 
86                                    <#elseif fib.offerType == "128"> 
87                                        <#assign productURL = "business-cashback"> 
88                                        <#assign productName = "Business Cash Card" > 
89                                    <#elseif fib.offerType == "143"> 
90                                        <#assign productURL = "business-real-rewards"> 
91                                        <#assign productName = "Business Real Rewards Card" > 
92                                    <#elseif fib.offerType == "123"> 
93                                        <#assign productURL = "business-rewards-plus"> 
94                                        <#assign productName = "Business Rewards PLUS Card" > 
95                                    </#if> 
96                                    <#if url?matches(".*/${productURL}.*")> 
97                                        <#assign product = productURL> 
98                                        <option value="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}" selected="selected">${productName}</option> 
99                                    <#else> 
100                                        <option value="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}">${productName}</option> 
101                                    </#if> 
102                                </#list> 
103                            </select> 
104                        </div> 
105                    </div>  
106                </header> 
107                <script> 
108                    AUI().ready(function () { 
109                        jQuery('.styled-select select').change(function () { 
110                            location.href = this.value; 
111                        }); 
112                    }); 
113                </script>            
114            </#if> 
115        </div> 
116        <script> 
117                 document.addEventListener('DOMContentLoaded', function() { 
118                    console.log('inside ready'); 
119                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
120                    var hostName = location.hostname;                                 
121                    function getDomainFromHostname(hostname) { 
122                        var parts = hostname.split('.'); 
123                        return parts.length === 3 ? parts[1] : parts[0]; 
124
125                    var domain = getDomainFromHostname(hostName); 
126                    var partnerName = "${partnerName!''}"; 
127                    var product = "All Cards"; 
128                    switch(page) { 
129                        case "platinum": 
130                            product="Platinum Card" 
131                            break; 
132                        case "real-rewards": 
133                            product="Real Rewards Card" 
134                            break; 
135                        case "secured": 
136                            product="Secured Card" 
137                            break; 
138                        case "business-cashback": 
139                            product="Business Cash Card" 
140                            break; 
141                        case "business-real-rewards": 
142                            product="Business Real Rewards Card" 
143                            break; 
144                        case "business-rewards-plus": 
145                            product="Business Rewards PLUS Card" 
146                            break; 
147                        default:   
148                            product = "All Cards";                           
149
150                    var lc = "${lc!'0'}"; 
151                    var pageType = "product"; 
152                    if (page == "index") { 
153                        document.title = partnerName + " Credit Card Index Page"; 
154                    }  
155                     var utag_data = window.utag_data || {}; 
156                                                             
157                    /* update SiteCatalyst data object */ 
158                        utag_data.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
159                        utag_data.page_type = 'product';  
160                        utag_data.site_section = 'credit cards'; 
161                        utag_data.platform = 'microsite'; 
162                        utag_data.campaign_id = '${campaignId}'; 
163                        utag_data.location_code = lc; 
164                        utag_data.partner_name = partnerName; 
165                        utag_data.product = product; 
166                        utag_data.text_to_apply_source = '${text_to_apply_source}'; 
167                        utag_data.visitor_type = 'prospect';         
168                        utag_data.Banker_id = '0'; 
169                        utag_data.Banker_code = '0';        
170 
171 
172                    /* SiteCatalyst  pageView tracking */ 
173                        AUI().ready(function() { 
174                            if (window.publisherFW) { 
175                                //console.log("pageView"); 
176                                window.publisherFW.publishEvent("pageView", utag_data); 
177                            }  
178                        }); 
179 
180                    jQuery('.jn-button, .applyNowLink').on('click', function(e){ 
181                        var buttonName = $(this).data('button-name'); 
182                        var productName = $(this).data('product-name'); 
183                        /* SiteCatalyst  onClick tracking */ 
184                        utag_data.applyButton = buttonName; 
185                        utag_data.product = productName; 
186 
187                            if (window.publisherFW) { 
188                                //console.log('clicked', utag_data); 
189                                window.publisherFW.publishEvent("onClick", utag_data); 
190                            }   
191 
192                    }); 
193 
194                    jQuery('.applyNowLink').on('click', function(e){ 
195                        ga("send", { 
196                            hitType: "event", 
197                            eventAction: "ApplyNow", 
198                            eventCategory: "click", 
199                            eventLabel: "BottomButton" 
200                        }); 
201                    }); 
202             
203                }); 
204        </script>    
205    <#else> 
206        <script> 
207            console.log("Empty card list"); 
208            location.href = '${url404}'; 
209        </script> 
210    </#if>    
211<#else> 
212    <script> 
213        console.log("FI Cards Data empty", "pbu:", "${pbu}", ",subbu:","${subbu}"); 
214        location.href = '${url404}'; 
215    </script> 
216</#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<#list fiCardsData as fib>  
44    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))> 
45        <#assign offerTypeList = offerTypeList + [fib.offerType]>  
46        <#if (fib.offerType == "101" || fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "115")> 
47            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
48        <#elseif (fib.offerType == "128" || fib.offerType == "143" || fib.offerType == "123")> 
49            <#assign businessCards = businessCards + fiCardsData[index..index]> 
50        </#if>                            
51        <#assign temp = temp + fiCardsData[index..index]>  
52    </#if>   
53    <#assign index = index + 1>               
54</#list>  
55 
56<#assign fiCardsData = temp> 
57<#if (fiCardsData?size > 0)>    
58    <#if url?contains("index")>                    
59        <#assign offerId = ""> 
60        <#assign sourceCode = ""> 
61        <#assign cardArtImage = ""> 
62        <#assign productUrl = ""> 
63        <#assign cardIndex = 1> 
64        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
65            <#if (offerTypeList?seq_contains("108") || offerTypeList?seq_contains("109")) > 
66                <#list consumerCards as card> 
67                    <#if (card.offerType=="108" || card.offerType=="109")> 
68                        <#assign offerId = card.offerId> 
69                        <#assign sourceCode = card.sourceCode> 
70                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
71                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
72                        <#assign productUrl="platinum"> 
73                        <#assign product="Platinum"> 
74                        <#assign cardIndex = card.cardOrder?number - 1> 
75                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
76                        <#if (scrapedData?size > 0)> 
77                            <#list scrapedData as sItem> 
78                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
79                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
80                                    <#break> 
81                                </#if> 
82                            </#list> 
83                            <script> 
84                                $(document).ready(function () { 
85                                    var aprText = "${apr}"; 
86                                    if (aprText) { 
87                                        try { 
88                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
89                                            var billing_cycle = matches[1]; 
90                                            var apr_min = apr_min = matches[2]; 
91                                            var apr_max = apr_max = matches[3]; 
92                                            if (billing_cycle) { 
93                                                $(".scraped-billing-cycle").html(billing_cycle); 
94
95                                            if (apr_min) { 
96                                                $(".scraped-apr-min").html(apr_min); 
97
98                                            if (apr_max) { 
99                                                $('.scraped-apr-max').html(apr_max); 
100
101 
102                                        } catch (e) { 
103                                            console.log(e); 
104
105
106                                }); 
107                            </script> 
108                        </#if>   
109                    </#if> 
110                </#list> 
111            <#else> 
112                <#assign displayedCard = consumerCards[0]> 
113                <#assign offerId = displayedCard.offerId> 
114                <#assign sourceCode = displayedCard.sourceCode> 
115                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
116                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
117                <#assign cardIndex = displayedCard.cardOrder?number - 1> 
118                <#if (displayedCard.offerType=="101")> 
119                    <#assign productUrl="real-rewards"> 
120                    <#assign product="Real Rewards"> 
121                <#elseif (displayedCard.offerType=="115")> 
122                    <#assign productUrl = "secured"> 
123                    <#assign product="Secured"> 
124                </#if> 
125            </#if> 
126        </#if> 
127        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
128            <#if (offerTypeList?seq_contains("128")) > 
129                <#list businessCards as card> 
130                    <#if (card.offerType=="128")> 
131                        <#assign offerId = card.offerId> 
132                        <#assign sourceCode = card.sourceCode> 
133                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
134                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
135                        <#assign productUrl="business-cash"> 
136                        <#assign product="Business Cash"> 
137                        <#assign cardIndex = card.cardOrder?number - 4> 
138                    </#if> 
139                </#list> 
140            <#else> 
141                <#assign displayedCard = businessCards[0]> 
142                <#assign offerId = displayedCard.offerId> 
143                <#assign sourceCode = displayedCard.sourceCode> 
144                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
145                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
146                <#assign cardIndex = displayedCard.cardOrder?number - 4> 
147                <#if (displayedCard.offerType=="143")> 
148                    <#assign productUrl="business-real-rewards"> 
149                    <#assign product="Business Real Rewards"> 
150                <#elseif (displayedCard.offerType=="123")> 
151                    <#assign productUrl = "business-rewards-plus"> 
152                    <#assign product="Business Rewards PLUS"> 
153                </#if> 
154            </#if> 
155        </#if>  
156        <div class="content-container content-container-main product-${productUrl} tier3-hero-${class.getData()}" title="${partnerName!''} ${product!''} Credit Card"> 
157            <div class="jn-hero jn-hero-card"> 
158                <article class="jn-hero-container"> 
159                    <div class="jn-hero-container-data"> 
160                        <article> 
161                            <div> 
162                                <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
163                            </div> 
164                            <div> 
165                                <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
166                                <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
167                                <#if termsAndConditions.getData() == "yes"> 
168                                    <div class="intro"> 
169                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
170                                        <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
171                                    </div> 
172                                </#if> 
173                                <a href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer"  
174                                    class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
175                                    title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                                 
176                            </div> 
177                        </article> 
178                    </div> 
179                </article> 
180            </div> 
181        </div> 
182    <#else> 
183        <#list fiCardsData as fib> 
184            <#if (fib.offerType=="128" || fib.offerType=="143" || fib.offerType=="123" )>                 
185                <#assign cardIndex = fib.cardOrder?number - 4> 
186            <#else> 
187                <#assign cardIndex = fib.cardOrder?number - 1> 
188            </#if> 
189            <#if (fib.offerType=="108" || fib.offerType=="109")> 
190                <#assign productUrl="platinum"> 
191                <#assign product="Platinum"> 
192                <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')> 
193                <#if (scrapedData?size > 0)> 
194                        <#list scrapedData as sItem> 
195                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
196                                <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
197                                <#break> 
198                            </#if> 
199                        </#list> 
200                        <script> 
201                            $(document).ready(function () { 
202                                var aprText = "${apr}"; 
203                                if (aprText) { 
204                                    try { 
205                                        var matches= aprText.match(/\d+(\.\d+)?%?/g); 
206                                        var billing_cycle = matches[1]; 
207                                        var apr_min = apr_min = matches[2]; 
208                                        var apr_max = apr_max = matches[3]; 
209                                        if (billing_cycle) { 
210                                            $(".scraped-billing-cycle").html(billing_cycle); 
211
212                                        if (apr_min) { 
213                                            $(".scraped-apr-min").html(apr_min); 
214
215                                        if (apr_max) { 
216                                            $('.scraped-apr-max').html(apr_max); 
217
218 
219                                    } catch (e) { 
220                                        console.log(e); 
221
222
223                            }); 
224                        </script> 
225                </#if>                               
226            <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
227                <#assign productUrl = "real-rewards"> 
228                <#assign product="Real Rewards"> 
229            <#elseif fib.offerType == "115"> 
230                <#assign productUrl = "secured"> 
231                <#assign product="Secured"> 
232            <#elseif fib.offerType == "128"> 
233                <#assign productUrl = "business-cashback"> 
234                <#assign product="Business Cash"> 
235            <#elseif fib.offerType == "143"> 
236                <#assign productUrl = "business-real-rewards"> 
237                <#assign product="Business Real Rewards"> 
238            <#elseif fib.offerType == "123"> 
239                <#assign productUrl = "business-rewards-plus"> 
240                <#assign product="Business Rewards PLUS"> 
241            </#if>                 
242            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">  
243            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">                     
244            <#if url?matches(".*/${productUrl}.*")>  
245                <div class="content-container content-container-main" title="${partnerName!''} ${product!''} Credit Card"> 
246                    <div class="jn-hero jn-hero-card"> 
247                        <article class="jn-hero-container"> 
248                            <div class="jn-hero-container-data"> 
249                                <article> 
250                                    <div> 
251                                        <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
252                                                class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
253                                    </div> 
254                                    <div> 
255                                        <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
256                                        <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
257                                        <#if termsAndConditions.getData() == "yes"> 
258                                            <div class="intro"> 
259                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
260                                                <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
261                                            </div> 
262                                        </#if> 
263                                        <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
264                                            class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
265                                            title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a> 
266                                    </div>                         
267                                </article> 
268                            </div> 
269                        </article> 
270                    </div> 
271                </div> 
272 
273            </#if> 
274        </#list>    
275 
276    </#if> 
277 
278 
279</#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<#list fiCardsData as fib>  
44    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))> 
45        <#assign offerTypeList = offerTypeList + [fib.offerType]>  
46        <#if (fib.offerType == "101" || fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "115")> 
47            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
48        <#elseif (fib.offerType == "128" || fib.offerType == "143" || fib.offerType == "123")> 
49            <#assign businessCards = businessCards + fiCardsData[index..index]> 
50        </#if>                            
51        <#assign temp = temp + fiCardsData[index..index]>  
52    </#if>   
53    <#assign index = index + 1>               
54</#list>  
55 
56<#assign fiCardsData = temp> 
57<#if (fiCardsData?size > 0)>    
58    <#if url?contains("index")>                    
59        <#assign offerId = ""> 
60        <#assign sourceCode = ""> 
61        <#assign cardArtImage = ""> 
62        <#assign productUrl = ""> 
63        <#assign cardIndex = 1> 
64        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
65            <#if (offerTypeList?seq_contains("108") || offerTypeList?seq_contains("109")) > 
66                <#list consumerCards as card> 
67                    <#if (card.offerType=="108" || card.offerType=="109")> 
68                        <#assign offerId = card.offerId> 
69                        <#assign sourceCode = card.sourceCode> 
70                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
71                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
72                        <#assign productUrl="platinum"> 
73                        <#assign product="Platinum"> 
74                        <#assign cardIndex = card.cardOrder?number - 1> 
75                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
76                        <#if (scrapedData?size > 0)> 
77                            <#list scrapedData as sItem> 
78                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
79                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
80                                    <#break> 
81                                </#if> 
82                            </#list> 
83                            <script> 
84                                $(document).ready(function () { 
85                                    var aprText = "${apr}"; 
86                                    if (aprText) { 
87                                        try { 
88                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
89                                            var billing_cycle = matches[1]; 
90                                            var apr_min = apr_min = matches[2]; 
91                                            var apr_max = apr_max = matches[3]; 
92                                            if (billing_cycle) { 
93                                                $(".scraped-billing-cycle").html(billing_cycle); 
94
95                                            if (apr_min) { 
96                                                $(".scraped-apr-min").html(apr_min); 
97
98                                            if (apr_max) { 
99                                                $('.scraped-apr-max').html(apr_max); 
100
101 
102                                        } catch (e) { 
103                                            console.log(e); 
104
105
106                                }); 
107                            </script> 
108                        </#if>   
109                    </#if> 
110                </#list> 
111            <#else> 
112                <#assign displayedCard = consumerCards[0]> 
113                <#assign offerId = displayedCard.offerId> 
114                <#assign sourceCode = displayedCard.sourceCode> 
115                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
116                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
117                <#assign cardIndex = displayedCard.cardOrder?number - 1> 
118                <#if (displayedCard.offerType=="101")> 
119                    <#assign productUrl="real-rewards"> 
120                    <#assign product="Real Rewards"> 
121                <#elseif (displayedCard.offerType=="115")> 
122                    <#assign productUrl = "secured"> 
123                    <#assign product="Secured"> 
124                </#if> 
125            </#if> 
126        </#if> 
127        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
128            <#if (offerTypeList?seq_contains("128")) > 
129                <#list businessCards as card> 
130                    <#if (card.offerType=="128")> 
131                        <#assign offerId = card.offerId> 
132                        <#assign sourceCode = card.sourceCode> 
133                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
134                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
135                        <#assign productUrl="business-cash"> 
136                        <#assign product="Business Cash"> 
137                        <#assign cardIndex = card.cardOrder?number - 4> 
138                    </#if> 
139                </#list> 
140            <#else> 
141                <#assign displayedCard = businessCards[0]> 
142                <#assign offerId = displayedCard.offerId> 
143                <#assign sourceCode = displayedCard.sourceCode> 
144                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
145                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
146                <#assign cardIndex = displayedCard.cardOrder?number - 4> 
147                <#if (displayedCard.offerType=="143")> 
148                    <#assign productUrl="business-real-rewards"> 
149                    <#assign product="Business Real Rewards"> 
150                <#elseif (displayedCard.offerType=="123")> 
151                    <#assign productUrl = "business-rewards-plus"> 
152                    <#assign product="Business Rewards PLUS"> 
153                </#if> 
154            </#if> 
155        </#if>  
156        <div class="content-container content-container-main product-${productUrl} tier3-hero-${class.getData()}" title="${partnerName!''} ${product!''} Credit Card"> 
157            <div class="jn-hero jn-hero-card"> 
158                <article class="jn-hero-container"> 
159                    <div class="jn-hero-container-data"> 
160                        <article> 
161                            <div> 
162                                <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
163                            </div> 
164                            <div> 
165                                <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
166                                <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
167                                <#if termsAndConditions.getData() == "yes"> 
168                                    <div class="intro"> 
169                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
170                                        <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
171                                    </div> 
172                                </#if> 
173                                <a href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer"  
174                                    class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
175                                    title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                                 
176                            </div> 
177                        </article> 
178                    </div> 
179                </article> 
180            </div> 
181        </div> 
182    <#else> 
183        <#list fiCardsData as fib> 
184            <#if (fib.offerType=="128" || fib.offerType=="143" || fib.offerType=="123" )>                 
185                <#assign cardIndex = fib.cardOrder?number - 4> 
186            <#else> 
187                <#assign cardIndex = fib.cardOrder?number - 1> 
188            </#if> 
189            <#if (fib.offerType=="108" || fib.offerType=="109")> 
190                <#assign productUrl="platinum"> 
191                <#assign product="Platinum"> 
192                <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')> 
193                <#if (scrapedData?size > 0)> 
194                        <#list scrapedData as sItem> 
195                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
196                                <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
197                                <#break> 
198                            </#if> 
199                        </#list> 
200                        <script> 
201                            $(document).ready(function () { 
202                                var aprText = "${apr}"; 
203                                if (aprText) { 
204                                    try { 
205                                        var matches= aprText.match(/\d+(\.\d+)?%?/g); 
206                                        var billing_cycle = matches[1]; 
207                                        var apr_min = apr_min = matches[2]; 
208                                        var apr_max = apr_max = matches[3]; 
209                                        if (billing_cycle) { 
210                                            $(".scraped-billing-cycle").html(billing_cycle); 
211
212                                        if (apr_min) { 
213                                            $(".scraped-apr-min").html(apr_min); 
214
215                                        if (apr_max) { 
216                                            $('.scraped-apr-max').html(apr_max); 
217
218 
219                                    } catch (e) { 
220                                        console.log(e); 
221
222
223                            }); 
224                        </script> 
225                </#if>                               
226            <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
227                <#assign productUrl = "real-rewards"> 
228                <#assign product="Real Rewards"> 
229            <#elseif fib.offerType == "115"> 
230                <#assign productUrl = "secured"> 
231                <#assign product="Secured"> 
232            <#elseif fib.offerType == "128"> 
233                <#assign productUrl = "business-cashback"> 
234                <#assign product="Business Cash"> 
235            <#elseif fib.offerType == "143"> 
236                <#assign productUrl = "business-real-rewards"> 
237                <#assign product="Business Real Rewards"> 
238            <#elseif fib.offerType == "123"> 
239                <#assign productUrl = "business-rewards-plus"> 
240                <#assign product="Business Rewards PLUS"> 
241            </#if>                 
242            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">  
243            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">                     
244            <#if url?matches(".*/${productUrl}.*")>  
245                <div class="content-container content-container-main" title="${partnerName!''} ${product!''} Credit Card"> 
246                    <div class="jn-hero jn-hero-card"> 
247                        <article class="jn-hero-container"> 
248                            <div class="jn-hero-container-data"> 
249                                <article> 
250                                    <div> 
251                                        <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}" 
252                                                class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
253                                    </div> 
254                                    <div> 
255                                        <div>${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
256                                        <div class="feature-text">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
257                                        <#if termsAndConditions.getData() == "yes"> 
258                                            <div class="intro"> 
259                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong>${apr!''} 
260                                                <a href="${oadURL_TC}?step=display&offerId=${offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
261                                            </div> 
262                                        </#if> 
263                                        <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
264                                            class="jn-button" data-button-name="cta-button-top" data-product-name="${productUrl!''}" 
265                                            title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a> 
266                                    </div>                         
267                                </article> 
268                            </div> 
269                        </article> 
270                    </div> 
271                </div> 
272 
273            </#if> 
274        </#list>    
275 
276    </#if> 
277 
278 
279</#if> 

Web Content Display

An error occurred while processing the template.
Error on line 26, 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 
9<#assign lc= qstringmap["ecdma-lc"]?first>   
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 
17<#if qstringmap["ecid"]?has_content> 
18    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
19<#else> 
20    <#assign ecidExt=""> 
21</#if> 
22 
23 
24<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
25<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
26<#assign clientProfile = clientProfileList?first> 
27<#assign partnerName = clientProfile.getMarketingNameLong()> 
28<#assign pbu = clientProfile.getPbu()> 
29<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
30<#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
31 
32<#if qstringmap["ecid"]?has_content> 
33    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
34    <#assign campaignId = qstringmap["ecid"]?first > 
35<#else> 
36    <#assign ecidExt=""> 
37    <#assign campaignId = "" > 
38</#if> 
39 
40<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>  
41<#-- filter duplicated cards--> 
42<#assign consumerCards = []> 
43<#assign businessCards = []>  
44<#assign offerTypeList = []>      
45<#assign index = 0> 
46<#list fiCardsData as fib> 
47    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
48        <#assign offerTypeList = offerTypeList + [fib.offerType]> 
49        <#if (fib.offerType == "101" || fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "115")> 
50            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
51        <#elseif (fib.offerType == "128" || fib.offerType == "143" || fib.offerType == "123")> 
52            <#assign businessCards = businessCards + fiCardsData[index..index]> 
53        </#if>                     
54    </#if>  
55    <#assign index = index + 1>                
56</#list>  
57<#if ((consumerCards?size > 0) || (businessCards?size > 0))> 
58    <div class="content-container content-container-main jn-consumer-content"> 
59        <#if ((consumerCards?size > 0) && (businessCards?size > 0))> 
60            <nav class="jn-primary-nav two-tabs"> 
61                <ul> 
62                    <li title="${partnerName!''} - Personal products"> 
63                        <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a> 
64                    </li> 
65                    <li title="${partnerName!''} - Business products"> 
66                        <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a> 
67                    </li> 
68                </ul> 
69            </nav> 
70        <#else> 
71            <#if (consumerCards?size > 0)> 
72                <nav class="jn-primary-nav" title="${partnerName!''} - Personal products"> 
73                    <ul> 
74                        <li> 
75                            <p class="tab-nav" id="consumerTab"><span>Personal</span></p> 
76                        </li> 
77                    </ul> 
78                </nav> 
79            </#if> 
80            <#if (businessCards?size > 0)> 
81                <nav class="jn-primary-nav" title="${partnerName!''} - Business products"> 
82                    <ul> 
83                        <li> 
84                            <p class="tab-nav" id="businessTab"><span>Business</span></p> 
85                        </li> 
86                    </ul> 
87                </nav> 
88            </#if> 
89        </#if> 
90        <#if (consumerCards?size > 0)> 
91                <div class="jn-consumer-content-wrapper jn-tab-content active" data-id="consumerTab" title="${partnerName!''} - Personal products"> 
92                    <#list consumerCards as fib>                                  
93                            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" > 
94                            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg" > 
95                            <#assign cardIndex = fib.cardOrder?number - 1 > 
96                            <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
97                            <#assign titleText = titleText?replace('<[^>]+>','','r')> 
98                            <#switch fib.offerType> 
99                                <#case "101"> 
100                                    <#assign productName = "real-rewards"> 
101                                    <#assign product="Real Rewards"> 
102                                    <#break> 
103                                <#case "108"> 
104                                    <#assign productName = "platinum"> 
105                                    <#assign product="Platinum"> 
106                                    <#break> 
107                                <#case "109"> 
108                                    <#assign productName = "platinum"> 
109                                    <#assign product="Platinum"> 
110                                    <#break>                                            
111                                <#case "115"> 
112                                    <#assign productName = "secured"> 
113                                    <#assign product="Secured"> 
114                                    <#break> 
115                                <#default> 
116                            </#switch> 
117                            <#assign APR=""> 
118                            <#assign AMF=""> 
119                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
120                            <#if (scrapedData?size > 0)> 
121                                <#list scrapedData as sItem> 
122                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
123                                        <#assign APR = sItem.scrapedValue> 
124                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
125                                        <#assign AMF = sItem.scrapedValue> 
126                                    </#if> 
127                                    <#if (APR?has_content && AMF?has_content)> 
128                                        <#break> 
129                                    </#if> 
130                                </#list> 
131                            </#if>                                           
132                            <div class="jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
133                                <img src="${cardArtImage!''}" alt="${titleText}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
134                                <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
135                                <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
136                                <ul class="actions"> 
137                                    <li> 
138                                        <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
139                                            class="applyNowLink" data-button-name="apply-now-link" data-product-name="${productName!''}" 
140                                            title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
141                                    </li> 
142                                    <li><a href="${environment}/${productName}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
143                                    </li> 
144                                </ul> 
145                                <div class="jn-additional"> 
146                                    <ul class="${fib.offerType}"> 
147                                        <li class="${fib.offerType}"> 
148                                            <p> 
149                                            <#if fib.offerType=="115"> 
150                                                <strong>APR for Purchases and Balance Transfers: </strong> 
151                                            <#else> 
152                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
153                                            </#if> 
154                                            ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a></p> 
155                                        </li> 
156                                        <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
157                                            <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
158                                                <li>${marketingInfo.getData()}</li> 
159                                            </#list> 
160                                        </#if> 
161                                        <li> 
162                                            <p>Annual Fee: ${AMF!''} <a  href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}"  target="_blank">Terms & Conditions</a></p> 
163                                        </li> 
164                                    </ul> 
165                                </div> 
166                            </div> 
167                         
168                    </#list> 
169                </div> 
170        </#if> 
171        <#if (businessCards?size > 0)>     
172            <div class="jn-consumer-content-wrapper jn-tab-content" data-id="businessTab" title="${partnerName!''} - Business products"> 
173                <#list businessCards as fib> 
174                        <#assign cardArtImage = cdnCardArtUrl + "/"+fib.filename+".png"> 
175                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
176                        <#assign cardIndex = fib.cardOrder?number - 1 > 
177                        <#switch fib.offerType> 
178                            <#case "128"> 
179                                <#assign productName = "business-cashback"> 
180                                <#assign product="Business Cash"> 
181                                <#break> 
182                            <#case "143"> 
183                                <#assign productName = "business-real-rewards"> 
184                                <#assign product="Business Real Rewards"> 
185                                <#break> 
186                            <#case "123"> 
187                                <#assign productName = "business-rewards-plus"> 
188                                <#assign product="Business Rewards PLUS"> 
189                                <#break> 
190                            <#default> 
191                        </#switch> 
192                        <#assign APR=""> 
193                        <#assign AMF=""> 
194                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
195                            <#if (scrapedData?size > 0)> 
196                                <#list scrapedData as sItem> 
197                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
198                                        <#assign APR = sItem.scrapedValue> 
199                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
200                                        <#assign AMF = sItem.scrapedValue> 
201                                    </#if> 
202                                    <#if (APR?has_content && AMF?has_content)> 
203                                        <#break> 
204                                    </#if> 
205                                </#list> 
206                            </#if>                                        
207                        <div class="jn-consumer-item" title="${partnerName!''} ${product!''} Credit Card"> 
208                            <img src="${cardArtImage!''}" alt="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
209                            <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
210                            <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
211                            <ul class="actions"> 
212                                <li> 
213                                    <a href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer"  
214                                        class="applyNowLink" data-button-name="apply-now-link" data-product-name="${productName!''}" 
215                                        title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
216                                </li> 
217                                <li><a href="${environment}/${productName}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a></li> 
218                            </ul> 
219                            <div class="jn-additional"> 
220                                <ul> 
221                                    <li> 
222                                        <p> 
223                                            <#if (fib.offerType=="123" )> 
224                                                <strong>APR for Purchases and Balance Transfers: </strong> 
225                                            <#else> 
226                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
227                                            </#if> 
228                                            ${APR!''} 
229                                            <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
230                                        </p> 
231                                    </li> 
232                                    <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
233                                        <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
234                                            <li>${marketingInfo.getData()}</li> 
235                                        </#list> 
236                                    </#if> 
237                                    <li><p>Annual Fee: ${AMF!''} <a 
238                                        href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a></p> 
239                                    </li> 
240                                </ul> 
241                            </div> 
242                        </div> 
243                </#list> 
244            </div> 
245        </#if>  
246    </div> 
247 
248    <script> 
249        document.addEventListener('DOMContentLoaded', function() { 
250            var tabs=$('.tab-nav'); 
251            var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
252            var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
253            if (tabs.length == 1) { 
254                if ($(consumerSelector).length > 0) { 
255                    hideHeroAndDisclaimer('business'); 
256                    showHeroAndDisclaimer('consumer'); 
257                    changeCardLayout(consumerSelector); 
258                    renumberFootnote("consumer"); 
259                    createMetaTag("consumer"); 
260                }  
261                if ($(businessSelector).length > 0) { 
262                    $(businessSelector).addClass('active'); 
263                    hideHeroAndDisclaimer('consumer'); 
264                    showHeroAndDisclaimer('business'); 
265                    changeCardLayout(businessSelector); 
266                    renumberFootnote("business"); 
267                    createMetaTag("business"); 
268                }  
269            }  
270            if (tabs.length == 2) { 
271                renumberFootnote("consumer"); 
272                renumberFootnote("business"); 
273                createMetaTag("consumer"); 
274                if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
275                    changeCardLayout(consumerSelector); 
276
277                if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
278                    changeCardLayout(businessSelector); 
279
280                var tabsNav = document.querySelectorAll('.tab-nav'); 
281                togglePrimaryNav(tabsNav); 
282
283 
284        }); 
285        // Primary Nav function 
286         
287        function togglePrimaryNav(elem) { 
288            for (var i = 0; i < elem.length; i++) { 
289                elem[i].addEventListener("click", function(e) { 
290 
291                    var current = this, 
292                        allSections = document.querySelectorAll('[data-id]'), 
293                        section = document.querySelector("[data-id='"+ current.id +"']"); 
294 
295                    for (var a = 0; a < allSections.length; a++) { 
296                        allSections[a].classList.remove('active'); 
297
298                    for (var c = 0; c < elem.length; c++) { 
299                        if (current != elem[c]) { 
300                            elem[c].classList.remove('active'); 
301                        } else { 
302                            current.classList.add('active'); 
303                            section.classList.add('active'); 
304                            hideHeroAndDisclaimer('consumer'); 
305                            hideHeroAndDisclaimer('business'); 
306                            if(current.getAttribute('id') === "consumerTab"){ 
307                                showHeroAndDisclaimer('consumer'); 
308                            } else if(current.getAttribute('id') === "businessTab"){ 
309                                showHeroAndDisclaimer('business'); 
310
311
312
313                    e.preventDefault(); 
314                }); 
315
316
317 
318        function renumberFootnote(type) { 
319            var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
320            var disclaimerSelector = '.tier3-disclaimer-landing-' + type; 
321            var heroSelector = '.tier3-hero-landing-' + type; 
322            var numOfFootnote = $(disclaimerSelector + ' sup').length; 
323            var showList = []; 
324            var hideList=[]; 
325            for (var i = 1; i <= numOfFootnote; i++) { 
326            var cssClass="tag-" + i; 
327            if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
328                showList.push(i);      
329            } else { 
330                hideList.push(i); 
331
332            }  
333            for (var i = 1; i < showList.length + 1; i++) { 
334                if(showList[i-1] != i) { 
335                    var className="tag-" + showList[i-1]; 
336                    $(heroSelector).find("." +  className).html(i); 
337                    $(discriptionSelector).find("." +  className).html(i); 
338                    $(disclaimerSelector).find("." +  className).html(i); 
339
340
341            for (var i = 0; i <hideList.length; i++) { 
342                var cname="tag-" + hideList[i]; 
343                $(disclaimerSelector).find("." + cname).parent().hide(); 
344            }    
345
346 
347        function changeCardLayout(cssSelector) { 
348            var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
349            if(numOfCards == 1) { 
350                $(cssSelector).addClass('one-card'); 
351            } else if (numOfCards == 2) { 
352                $(cssSelector).addClass('two-card'); 
353            }   
354
355        function hideHeroAndDisclaimer(type) { 
356            try { 
357                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('show'); 
358                document.querySelector('.tier3-hero-landing-'+ type).classList.add('hide'); 
359            } catch (e) { 
360                console.log(e); 
361
362 
363            try { 
364                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('show'); 
365                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('hide');  
366            } catch (e) { 
367                console.log(e); 
368
369 
370
371        function showHeroAndDisclaimer(type) { 
372            try { 
373                document.querySelector('.tier3-hero-landing-'+ type).classList.add('show'); 
374                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('hide'); 
375            } catch (e) { 
376                console.log(e); 
377
378             
379            try { 
380                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('show'); 
381                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('hide');  
382            } catch (e) { 
383                console.log(e); 
384
385 
386
387        function createMetaTag(type) { 
388            var partnerName = "${partnerName!0}"; 
389            var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
390            var metaDesc =""; 
391            if (type == "consumer") {             
392                if(product_name ==  "platinum") { 
393                    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."; 
394                } else if(product_name ==  "real-rewards") { 
395                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
396                } else if(product_name ==  "secured") { 
397                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
398
399 
400            } else if (type == "business") { 
401                if(product_name ==  "business-cashback") {               
402                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
403                } else if(product_name ==  "business-real-rewards") { 
404                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business."; 
405                } else if(product_name ==  "business-rewards-plus") { 
406                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
407
408
409            var m = document.createElement('meta');  
410            m.name = 'description';  
411            m.content = metaDesc;  
412            document.head.appendChild(m); 
413
414         
415    </script>                   
416</#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