Artikkel

Artikkel

En feil oppsto under behandling av visningsmalen.
Expression bankercode is undefined on line 42, column 6 in 10153#10191#6590055.
1<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService") > 
2<#assign url404 = '/error/404.html' > 
3<#assign oadURL = propsUtil.get('elan.oad.url') > 
4<#assign url = request.attributes.CURRENT_URL > 
5<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
6 
7<#if qstringmap["ecid"]?has_content> 
8    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
9<#else> 
10    <#assign ecidExt=""> 
11</#if> 
12 
13<#if qstringmap["bankercode"]?has_content> 
14    <#assign bankercode= qstringmap["bankercode"]?first> 
15 
16    <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bankercode)> 
17    <#if fiData?first?has_content> 
18        <#assign fi = fiData?first> 
19        <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
20            <#assign subbu_special = fi.offerId> 
21        </#if> 
22    </#if>  
23 
24    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bankercode)> 
25    <#list bData as b>         
26      <#assign rLC = b.reallocationcode > 
27      <#assign lc = b.locationcode > 
28      <#assign mappedLC = b.mappedLocationCode > 
29    </#list>     
30<#else> 
31    <script> 
32        console.log("MainProductBcode missing"); 
33        //location.href = '${url404}'; 
34    </script> 
35</#if> 
36 
37<#if url?contains('11t1')> 
38    <#assign tier = '11t1'> 
39<#elseif url?contains('11t2')> 
40    <#assign tier = '11t2'> 
41</#if> 
42<#if bankercode?starts_with("amp") && (url?contains("11t1m"))> 
43    <#assign ameriprise = true> 
44<#else> 
45    <#assign ameriprise = false> 
46</#if> 
47<#if ameriprise> 
48    <#assign tier = '11t1m'> 
49</#if> 
50<#assign environment = url?replace('/${tier}.*','','r')> 
51 
52 
53<#if mappedLC?has_content && !ameriprise> 
54    <#assign lc = mappedLC > 
55</#if> 
56 
57<#if lc?has_content> 
58    <#assign prefix = "00000" > 
59    <#assign lcWithPrefix = prefix + lc > 
60    <#assign withPrefixLength = lcWithPrefix?length > 
61    <#assign startHere = withPrefixLength - 5> 
62    <#assign lc = lcWithPrefix?substring(startHere)> 
63    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
64    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
65 
66    <#assign clientProfile = clientProfileList?first> 
67    <#assign partnerName = clientProfile.getMarketingNameLong()> 
68    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
69    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
70    <#-- <#assign cdnLogoUrl = "https://828cf7dcac86961192f7-10b53e8cad49907c7863edad15b39700.ssl.cf2.rackcdn.com"> --> 
71    <#assign pbu = clientProfile.getPbu()> 
72    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
73    <script> 
74        console.log('pbu', '${pbu!''}'); 
75        console.log('subbu', '${subbu!''}'); 
76        console.log('url', '${url!''}'); 
77        console.log('environ', '${environment!''}'); 
78        console.log('tier', '${tier!''}'); 
79console.log('logo from client profile:', "${clientProfile.getLogoBFormat1()!''}","logo after change:", "${logoFileName!''}"); 
80    </script>       
81    <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
82    <#if (optoutData?size == 0)> 
83        <#if (subbu_special?has_content)> 
84            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
85            <script> 
86                console.log('new subbu', '${subbu_special!''}'); 
87            </script>  
88        <#else> 
89            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
90        </#if> 
91        <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
92        <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
93        <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
94        <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>             
95            <#assign partnerUrl = 'https://' + partnerUrl> 
96        </#if> 
97        <#if (fiCardsData?size > 0)> 
98            <#assign temp = []> 
99            <#assign offerTypeList = []>        
100            <#assign index = 0> 
101            <#list fiCardsData as fib> 
102                <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>  
103                    <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
104                    <#assign temp = temp + fiCardsData[index..index]>  
105                </#if>  
106                <#assign index = index + 1> 
107            </#list>  
108            <#assign fiCardsData = temp> 
109            <#if !(fiCardsData?size > 0)>  
110                <script> 
111                    console.log("empty card/offerType List"); 
112                    //location.href = '${url404}'; 
113                </script> 
114            </#if> 
115            <#if ameriprise> 
116                <#assign lc_used = mappedLC>  
117            <#else> 
118                <#assign lc_used = lc>  
119            </#if>             
120            <div class="content-container content-container-main" title="${partnerName!''}"> 
121                <header class="jn-header"> 
122                    <div class="back-overview hide-desktop">  
123                        <a  href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a> 
124                    </div>   
125                    <div class="header-main-logo" title="${partnerName!''}"> 
126                        <#if partnerUrl?has_content> 
127                            <a href="${partnerUrl!''}" title="${partnerName!''}"> 
128                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" title="${partnerName!''} Logo" alt="${partnerName!''} Logo">  
129                            </a> 
130                        <#else> 
131                            <a title="${partnerName!''}"> 
132                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo"> 
133                            </a> 
134                        </#if> 
135                    </div> 
136                     
137                    <div class="styled-select slate"> 
138                        <select> 
139                            <#list fiCardsData as fib> 
140                                <#if ameriprise> 
141                                    <#if (fib.offerType=="101")> 
142                                        <#assign productURL="premier-visa-signature"> 
143                                        <#assign productName="Ameriprise Premier Visa Signature"> 
144                                    <#elseif (fib.offerType=="103")>      
145                                        <#assign productURL = "visa-signature"> 
146                                        <#assign productName = "Ameriprise Visa Signature">                              
147                                    </#if> 
148                                <#else> 
149                                    <#if (fib.offerType=="108" || fib.offerType=="109")> 
150                                        <#assign productURL="consumer-platinum2103"> 
151                                        <#assign productName="Platinum Card"> 
152                                    <#elseif fib.offerType=="147"> 
153                                        <#assign productURL = "max-cash-secured"> 
154                                        <#assign productName = "Max Cash Secured Card" > 
155                                    <#elseif (fib.offerType=="104")> 
156                                        <#assign productURL = "max-cash"> 
157                                        <#assign productName = "Max Cash Preferred Card">                                    
158                                    <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
159                                        <#assign productURL = "consumer-edr2112"> 
160                                        <#assign productName = "Everyday Rewards+"> 
161                                    <#elseif fib.offerType == "115"> 
162                                        <#assign productURL = "secured"> 
163                                        <#assign productName = "Secured Card" > 
164                                    <#elseif fib.offerType == "141"> 
165                                        <#assign productURL = "college-real-rewards"> 
166                                        <#assign productName = "College Real Rewards" >        
167                                    <#elseif fib.offerType == "144"> 
168                                        <#assign productURL = "smart-business-rewards"> 
169                                        <#assign productName = "Smart Business Rewards Card" >                                             
170                                    <#elseif fib.offerType == "128"> 
171                                        <#assign productURL = "business-cash-preferred"> 
172                                        <#assign productName = "Business Cash Preferred" > 
173                                    <#elseif fib.offerType == "143"> 
174                                        <#assign productURL = "business-real-rewards"> 
175                                        <#assign productName = "Business Real Rewards Card" > 
176                                    <#elseif fib.offerType == "121"> 
177                                        <#assign productURL = "business-platinum2103"> 
178                                        <#assign productName = "Business Card" > 
179                                    </#if> 
180                                </#if> 
181                                <#if url?matches(".*/${productURL}.*")> 
182                                    <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" selected="selected">${productName}</option>                                             
183                                <#else> 
184                                    <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">${productName}</option> 
185                                </#if> 
186                            </#list> 
187                        </select> 
188                        <nav class="styled-select__dropdown"> 
189                            <div class="back-overview hide-mobile">  
190                                <a  href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a> 
191                            </div>   
192                            <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false" > 
193                                <span class="selected-option"></span>  
194                                <div class="jn-arrow arrow arrow-right"></div> 
195                            </a> 
196                            <button href="javascript:void(0)" class="jn-hamburger hamburger" aria-expanded="false" aria-label="open navigation menu"> 
197                                <div class="first-line transform transformed1"></div> 
198                                <div></div> 
199                                <div class="transform transformed2"></div> 
200                                <div></div> 
201                            </button> 
202                            <ul> 
203                                <#list fiCardsData as fib> 
204                                    <#if ameriprise> 
205                                        <#if (fib.offerType=="101")> 
206                                            <#assign productURL="premier-visa-signature"> 
207                                            <#assign productName="Ameriprise Premier Visa Signature"> 
208                                        <#elseif (fib.offerType=="103")>      
209                                            <#assign productURL = "visa-signature"> 
210                                            <#assign productName = "Ameriprise Visa Signature">                              
211                                        </#if> 
212                                    <#else> 
213                                        <#if (fib.offerType=="108" || fib.offerType=="109")> 
214                                            <#assign productURL="consumer-platinum2103"> 
215                                            <#assign productName="Platinum Card"> 
216                                        <#elseif fib.offerType=="147"> 
217                                            <#assign productURL = "max-cash-secured"> 
218                                            <#assign productName = "Max Cash Secured Card" > 
219                                        <#elseif (fib.offerType=="104")> 
220                                            <#assign productURL = "max-cash"> 
221                                            <#assign productName = "Max Cash Preferred Card"> 
222                                        <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
223                                            <#assign productURL = "consumer-edr2112"> 
224                                            <#assign productName = "Everyday Rewards+"> 
225                                        <#elseif fib.offerType == "115"> 
226                                            <#assign productURL = "secured"> 
227                                            <#assign productName = "Secured Card" > 
228                                        <#elseif fib.offerType == "141"> 
229                                            <#assign productURL = "college-real-rewards"> 
230                                            <#assign productName = "College Real Rewards" >  
231                                        <#elseif fib.offerType == "144"> 
232                                            <#assign productURL = "smart-business-rewards"> 
233                                            <#assign productName = "Smart Business Rewards Card" >                                             
234                                        <#elseif fib.offerType == "128"> 
235                                            <#assign productURL = "business-cash-preferred"> 
236                                            <#assign productName = "Business Cash Preferred" > 
237                                        <#elseif fib.offerType == "143"> 
238                                            <#assign productURL = "business-real-rewards"> 
239                                            <#assign productName = "Business Real Rewards Card" > 
240                                        <#elseif fib.offerType == "121"> 
241                                            <#assign productURL = "business-platinum2103"> 
242                                            <#assign productName = "Business Card" > 
243                                        </#if> 
244                                    </#if> 
245                                    <#if url?matches(".*/${productURL}.*")> 
246                                        <#if (fib.offerType=="104" && url?contains("max-cash-secured"))>  
247                                            <#-- prevent from max cash overiding max cash secured. --> 
248                                            <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li> 
249                                        <#else> 
250                                            <li class="selected" data-value="${productName}"><a href="javascript:void(0)">${productName}</a></li>  
251                                        </#if> 
252                                    <#else> 
253                                        <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li> 
254                                    </#if> 
255                                </#list> 
256                            </ul> 
257                        </nav> 
258                                              
259                    </div> 
260                </header> 
261            </div>  
262            <script> 
263                var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
264                var partnerName = "${partnerName!0}"; 
265                var metaDesc = ""; 
266                switch (page) { 
267                    case "consumer-platinum2103": 
268                        document.title = "The purchasing power of Zero | "+partnerName+" Platinum Card"; 
269                        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."; 
270                        break; 
271                    case "max-cash-secured": 
272                        document.title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card"; 
273                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
274                        break; 
275                    case "max-cash": 
276                        document.title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card"; 
277                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select"; 
278                        break; 
279                    case "real-rewards": 
280                        document.title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+"; 
281                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
282                        break; 
283                    case "secured": 
284                        document.title = "Strengthen your finances | "+partnerName+" Secured Card"; 
285                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
286                        break; 
287                    case "college-real-rewards": 
288                        document.title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards"; 
289                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
290                        break; 
291                    case "smart-business-rewards": 
292                        document.title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card"; 
293                        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."; 
294                        break; 
295                    case "business-cashback": 
296                        document.title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred"; 
297                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
298                        break; 
299                    case "business-real-rewards": 
300                        document.title = "Earn up to 3X points with no caps | "+partnerName+" Business Real Rewards Card"; 
301                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ; 
302                        break; 
303                    case "business-platinum2103": 
304                        document.title = "Pay down your other credit card balances faster | "+partnerName+" Business Card"; 
305                        metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
306                        break; 
307                    case "premier-visa-signature": 
308                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Premier Visa Signature® Card"; 
309                        metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $375 cash value when deposited into an eligible account after spending $3,000 in eligible net purchases within the first 90 days of account opening."; 
310                        break; 
311                    case "visa-signature": 
312                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Visa Signature® Card"; 
313                        metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $250 cash value when deposited into an eligible Ameriprise account after spending $2,000 in eligible net purchases within the first 90 days of account opening."; 
314                        break;                                                                                                 
315
316                if (metaDesc.length > 0) { 
317                    var m = document.createElement('meta');  
318                    m.name = 'description';  
319                    m.content = metaDesc;  
320                    document.head.appendChild(m); 
321
322                function toggleFlyOutMenu() { 
323                    $('.styled-select').toggleClass('show-select'); 
324                    var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded'); 
325                    if(ariaExpanded !== null) { 
326                        var isAriaExpanded; 
327                        if(ariaExpanded === "true") { 
328                            isAriaExpanded = true; 
329                            $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'open navigation menu'); 
330                        } else {  
331                            isAriaExpanded = false  
332                            $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'close navigation menu'); 
333 
334
335                        $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded); 
336                        $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded); 
337                         
338
339
340                document.addEventListener('DOMContentLoaded', function() { 
341                    var pageSelected = $('.selected').attr('data-value'); 
342                    $('.jn-hamburger, .dropdown-select').click(function () { 
343                        toggleFlyOutMenu(); 
344                    }); 
345                    $('.styled-select__dropdown').keydown(function(event) { 
346                        var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first(); 
347                        var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last(); 
348 
349                        if(event.keyCode === 9 ) { 
350                            // if they tab outside of the nav close the navigation 
351                            //shift + tab pressed 
352                            if(event.shiftKey && firstNavigationLink.is(document.activeElement)) { 
353                                toggleFlyOutMenu(); 
354                            } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) { 
355                                toggleFlyOutMenu(); 
356                            }                             
357
358                    }); 
359                    $('.selected-option').text(pageSelected); 
360                }); 
361            </script> 
362         
363        <#else> 
364            <script> 
365                console.log("FI Cards Data empty"); 
366                //location.href = '${url404}'; 
367            </script> 
368        </#if>   
369    <#else> 
370        <script> 
371            console.log("FI opt out"); 
372            //location.href = '${url404}'; 
373        </script> 
374    </#if>  
375<#else> 
376    <script> 
377        console.log("location code empty"); 
378        //location.href = '${url404}'; 
379    </script> 
380</#if> 

Artikkel

En feil oppsto under behandling av visningsmalen.
Expression bCode is undefined on line 58, column 6 in 10153#10191#6991552.
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 url404 = '/error/404.html' > 
5<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
6<#assign environment = url?replace('/12t1.*','','r')> 
7<#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
8 
9<#if oadURL?contains("uat-")> 
10    <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
11<#else> 
12    <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
13</#if> 
14<#--  check bankercode validity  --> 
15 
16<#if qstringmap["bankercode"]?has_content> 
17    <#assign bCode= qstringmap["bankercode"]?first> 
18 
19    <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bCode)> 
20    <#if fiData?first?has_content> 
21        <#assign fi = fiData?first> 
22        <#if (fi.projectId == "12" || fi.projectId == "13" || fi.projectId == "14")> 
23            <#assign subbu_special = fi.offerId> 
24        </#if> 
25    </#if>       
26    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
27    <#list bData as b> 
28      <#assign lc = b.locationcode > 
29      <#assign bName = b.branch > 
30      <#assign bPhone = b.businessphone > 
31      <#assign boeid = b.oeid > 
32      <#assign fName = b.firstname?trim> 
33      <#assign lName = b.lastname?trim> 
34      <#assign rlc = b.reallocationcode > 
35      <#assign mappedLC = b.mappedLocationCode > 
36    </#list> 
37<#else> 
38    <script> 
39        console.log("MainProductBcode missing"); 
40        //location.href = '${url404}'; 
41    </script> 
42</#if> 
43 
44<#assign text_to_apply_source = "vanity url" > 
45<#if qstringmap["sms"]?has_content> 
46    <#assign sms = 1 > 
47    <#assign text_to_apply_source = "sms" > 
48</#if> 
49<#if qstringmap["qrCode"]?has_content> 
50    <#assign text_to_apply_source = "qr code" > 
51</#if> 
52<#assign campaignId = "" > 
53<#assign ecidExt=""> 
54<#if qstringmap["ecid"]?has_content> 
55    <#assign campaignId = qstringmap["ecid"]?first > 
56    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
57</#if> 
58<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
59    <#assign ameriprise = true> 
60<#else> 
61    <#assign ameriprise = false> 
62</#if> 
63 
64<#if mappedLC?has_content && !ameriprise> 
65    <#assign lc = mappedLC > 
66</#if> 
67 
68 
69 
70<#if lc?has_content> 
71 
72    <#assign firstNameLength = fName?length > 
73    <#assign lastNameLength = lName?length > 
74    <#if firstNameLength + lastNameLength &gt; 19 > 
75        <#if lastNameLength &gt; 18 > 
76            <#assign bLName = lName?substring(0,18)> 
77        <#else> 
78            <#assign bLName = lName> 
79        </#if> 
80        <#assign maxFirstName = 19 - bLName?length > 
81        <#if firstNameLength &gt; maxFirstName > 
82            <#assign bFName = fName?substring(0,maxFirstName)> 
83        <#else> 
84            <#assign bFName = fName> 
85        </#if> 
86    <#else> 
87        <#assign bFName = fName > 
88        <#assign bLName = lName > 
89    </#if> 
90       
91 
92    <#assign prefix = "00000" > 
93    <#assign lcWithPrefix = prefix + lc > 
94    <#assign withPrefixLength = lcWithPrefix?length > 
95    <#assign startHere = withPrefixLength - 5> 
96    <#assign lc = lcWithPrefix?substring(startHere)> 
97 
98    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
99    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>     
100 
101    <#if clientProfileList?first?has_content> 
102        <#assign clientProfile = clientProfileList?first> 
103        <#assign partnerName = clientProfile.getMarketingNameLong()> 
104        <#assign pbu = clientProfile.getPbu()> 
105        <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
106        <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
107        <#if (optoutData?size == 0)>                 
108            <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
109            <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
110            <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
111            <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>             
112                <#assign partnerUrl = 'https://' + partnerUrl> 
113            </#if> 
114            <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
115            <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
116             
117            <#if pbu == "0864054"> 
118                <#assign override = "berkshire"> 
119            <#else> 
120                <#assign override = " "> 
121            </#if> 
122             
123            <#--  this one should be delete for prod  --> 
124                 
125            <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
126            <#assign pageClass = secondaryBackgroundImage.cardType.getData()> 
127             
128            <#if (subbu_special?has_content)> 
129                <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
130            <#else> 
131                <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
132            </#if> 
133 
134 
135            <#assign temp = []> 
136            <#assign offerTypeList = []>      
137            <#assign index = 0> 
138            <#list fiCardsData as fib> 
139                <#if !(offerTypeList?seq_contains(fib.offerType))>  
140                    <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
141                    <#assign temp = temp + fiCardsData[index..index]>  
142                </#if>  
143                <#assign index = index + 1>                
144            </#list>  
145            <#assign fiCardsData = temp> 
146            <#if (fiCardsData?size > 0)>   
147                <#if (subbu_special?has_content)> 
148                    <#assign lc_used = fiCardsData?first.WebLocationCode>   
149                <#else> 
150                    <#if ameriprise> 
151                        <#assign lc_used = mappedLC>  
152                    <#else> 
153                        <#assign lc_used = lc>  
154                    </#if> 
155                </#if> 
156 
157                <#list fiCardsData as fib> 
158                    <#if ameriprise> 
159                        <#if (fib.offerType=="101")> 
160                            <#assign productURL="premier-visa-signature"> 
161                            <#assign productName="Premier Visa Signature"> 
162                            <#assign productClass="ameriprise-premier-visa-signature"> 
163                        <#elseif (fib.offerType=="103")>      
164                            <#assign productURL = "visa-signature"> 
165                            <#assign productName = "Visa Signature">   
166                            <#assign productClass="ameriprise-visa-signature">                            
167                        </#if> 
168                    <#else>                     
169                        <#if (fib.offerType=="108") || (fib.offerType=="109")> 
170                            <#assign productURL="consumer-platinum2103"> 
171                            <#assign productName="Platinum"> 
172                        <#elseif (fib.offerType=="104")>    
173                            <#assign productURL = "max-cash"> 
174                            <#assign productName="Max Cash Preferred">                              
175                        <#elseif (fib.offerType=="101") || (fib.offerType=="103")> 
176                            <#assign productURL = "consumer-edr2112"> 
177                            <#assign productName="Everyday Rewards+"> 
178                        <#elseif fib.offerType == "115"> 
179                            <#assign productURL = "secured"> 
180                            <#assign productName="Secured"> 
181                        <#elseif fib.offerType == "141"> 
182                            <#assign productURL = "college-real-rewards"> 
183                            <#assign productName="College Real Rewards">    
184                        <#elseif fib.offerType == "144"> 
185                            <#assign productURL = "smart-business-rewards"> 
186                            <#assign productName="Smart Business Rewards">       
187                        <#elseif fib.offerType == "147"> 
188                            <#assign productURL = "max-cash-secured"> 
189                            <#assign productName="Max Cash Secured">                             
190                        <#elseif fib.offerType == "128"> 
191                            <#assign productURL = "business-cash-preferred"> 
192                            <#assign productName="Business Cash Preferred"> 
193                        <#elseif fib.offerType == "143"> 
194                            <#assign productURL = "business-real-rewards"> 
195                            <#assign productName="Business Real Rewards"> 
196                        <#elseif fib.offerType == "121"> 
197                            <#assign productURL = "business-platinum2103"> 
198                            <#assign productName="Business"> 
199                        </#if>  
200                    </#if>                    
201                    <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> 
202                    <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">   
203                    <#assign newSourceCode = fib.sourceCode>  
204                    <#assign newOfferId = fib.offerId>  
205                    
206                    <#if productURL == "max-cash" && url?contains("max-cash-secured")>  
207                        <#-- prevents from the max cash header being set on the max-cash-secured page --> 
208                    <#elseif url?matches(".*/${productURL}.*")> 
209                        <#assign sdata = utilServ.makeCall('crcDDCGetSchumerBox', newOfferId + '&' + newSourceCode)> 
210                        <script> 
211                            //console.log('offerId: ${newOfferId!""}, sourceCode: ${newSourceCode!""}'); 
212                        </script> 
213                        <#if (sdata?size > 0)>   
214                            <#if ((productURL=="consumer-platinum2103" || productURL=="business-platinum2103")&& !ameriprise)> 
215                                <#assign apr = "">                         
216                                <#list sdata as d> 
217                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))> 
218                                        <#assign apr = d.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
219                                        <#break> 
220                                    </#if> 
221                                </#list> 
222                                        <script> 
223                                            //console.log("scraped data exists"); 
224                                            console.log("APR", '${apr}'); 
225                                        </script> 
226                                <script> 
227                                        $(document).ready(function () { 
228                                            var aprText = "${apr}"; 
229                                            if (aprText) { 
230                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
231                                                var billing_cycle = ""; 
232                                                var apr_min = ""; 
233                                                var apr_max = ""; 
234                                                if (aprText.indexOf("Platinum:") != -1 || aprText.indexOf("Business:") != -1) { 
235                                                    billing_cycle = matches[1]; 
236                                                    apr_min = matches[2]; 
237                                                    apr_max = matches[3]; 
238
239                                                console.log('billing_cycle', billing_cycle, 'apr_min', apr_min, 'apr_max', apr_max); 
240                                                if (billing_cycle) { 
241                                                    $(".scraped-billing-cycle").html(billing_cycle); 
242
243                                                if (apr_min) { 
244                                                    $(".scraped-apr-min").html(apr_min); 
245
246                                                if (apr_max) { 
247                                                    $('.scraped-apr-max').html(apr_max); 
248
249
250                                        }); 
251                                </script> 
252                                 
253                            </#if>                                 
254                        <#else>     
255                            <script> 
256                                console.log("scraped data missing"); 
257                            </script> 
258                        </#if>   
259                        <#if ameriprise> 
260                            <#assign card_art_alt =  partnerName + " " + productName + " " + " Card"> 
261                            <#assign rollover_text =  partnerName + " " + productName + " " + " Card"> 
262                        <#else> 
263                            <#assign card_art_alt = partnerName + " " + productName + " " + " Card"> 
264                            <#assign rollover_text =  partnerName + " " + productName + " " + " Credit Card"> 
265                            <#assign card_text = productName + " Card"> 
266                        </#if> 
267 
268                        <div class="hero-container ${pageClass} ${productClass!''}" title="${rollover_text!''}"> 
269                            <div class="hero-main"> 
270                                 
271                                <div class="hero-main-container"> 
272                                    <div class="hero-main-offer"> 
273                                        <div class="offer-detail"> 
274                                            <div class="offer-detail-cardArt cardArtImg"> 
275                                                  <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
276                                                    <p>${card_text!''}</p> 
277                                            </div> 
278                                            <div class="offer-detail-text text-color-default hide-desktop"> 
279                                                ${primaryHeadlineFeatureTop.getData()} 
280                                                ${primaryHeadlineFeatureBottom.getData()} 
281                                            </div> 
282                                            <#if (fiCardsData?size > 0)>  
283                                                 
284                                                <form class="form1 hide-desktop" action='${oadURL}?locationCode=${lc_used}&amp;offerId=${newOfferId}&amp;preparerType=customer&amp;sourceCode=${newSourceCode}' method="post" id="BAAForm"> 
285                                                    <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
286                                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
287                                                    <button  
288                                                        type="submit"  
289                                                        data-button-name="cta-button-top"   
290                                                        class="jn-button apply-button button-bg-color-custom"  
291                                                        disabled  
292
293                                                        ${ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${productName!''} Card </span> 
294                                                    </button> 
295                                                </form> 
296                                            <#else> 
297                                                <form class="form2 hide-desktop" action='${oadURL}?locationCode=${lc_used}&amp;offerId=${offerId}&amp;preparerType=customer&amp;sourceCode=${sourceCode}' method="post" id="BAAForm"> 
298                                                    <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
299                                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
300                                                    <button  
301                                                        type="submit"  
302                                                        data-button-name="cta-button-top"  
303                                                        class="jn-button apply-button button-bg-color-custom"   
304                                                        disabled  
305
306                                                        ${ctaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${productName!''} Card </span> 
307                                                    </button> 
308                                                </form> 
309                                            </#if> 
310                                        </div> 
311                                        <div class="offer-header"> 
312                                            <div class="offer-text-top" style="padding-top:0;"> 
313                                                <div class="offer-title"> 
314                                                    ${primaryHeadlineText.getData()} 
315                                                </div> 
316                                                <h1 class="offer-subtitle"> 
317                                                    ${primaryHeadlineFeature.getData()} 
318                                                </h1> 
319                                            </div> 
320                                            <div class="offer-text-bottom hide-mobile"> 
321                                                <div class="offer-detail-text text-color-default "> 
322                                                    ${primaryHeadlineFeatureTop.getData()} 
323                                                    ${primaryHeadlineFeatureBottom.getData()} 
324                                                    <#-- allow for all except these url --> 
325                                                    <#if (!url?contains("business-real-rewards") && !url?contains("max-cash") && !url?contains("consumer-edr2112") && !url?contains("college-real-rewards") && !url?contains("business-cash-preferred") && !url?contains("/secured"))> 
326                                                        <br> 
327                                                        <a class="whiteLink" href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank"> 
328                                                            <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>See terms & conditions</a> 
329                                                    </#if> 
330                                                </div> 
331                                                <a tabindex="0" id="oadSecButton-top" data-button-name="cta-button-bottom" class="jn-button banner-cta-apply-button">${optionalCtaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${productName!''} Card </span></a>                                                                                   
332 
333                                            </div> 
334                                        </div> 
335                                         
336                                    </div> 
337                                </div> 
338                            </div> 
339                            <div class="hero-primary-benefits"> 
340                                <#if secondaryFeatureText.getData() != ""> 
341                                    <#assign featureCounter = 0> 
342                                    <#list secondaryFeatureText.getSiblings() as item> 
343                                        <div class="primary-benefit"> 
344                                            <div class="primary-benefit-wrapper text-color-white"> 
345                                                ${item.getData()} 
346                                                <#if (fib.offerType=="108" || fib.offerType=="109") && (featureCounter == secondaryFeatureText.getSiblings()?size - 1)> 
347                                                <a  
348                                                    href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
349                                                    class="text-color-default"  
350                                                    target="_blank" 
351
352                                                    <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span> 
353                                                    Terms & Conditions 
354                                                </a> 
355                                                </#if> 
356                                            </div> 
357                                        </div> 
358                                        <#assign featureCounter = featureCounter + 1> 
359                                    </#list> 
360                                </#if> 
361                            </div> 
362                        </div> 
363                        <div class="standard-content-container" title="${rollover_text!''}"> 
364                            <div class="product-details-container"> 
365                                <div class="detail-background"> 
366                                    <h2>${secondaryHeadlineText.getData()}</h2> 
367                                    <div class="secondary-benefits"> 
368                                        <!-- option 1 --> 
369                                        <div class="option"> 
370                                            ${additionalInfoGroupA.getData()} 
371                                            <#if pbu != "0892445">                                              
372                                                <div> 
373                                                    <#if (fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "115" || fib.offerType == "147" ) > 
374                                                    <#-- Dont show scrapped data--> 
375                                                    <#else> 
376                                                        <#if (fib.offerType == "104" || fib.offerType == "121" || fib.offerType == "143" ) > 
377                                                            <#list sdata as d> 
378                                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))>      
379                                                                    <#if (fib.offerType == "121" || fib.offerType == "143") > 
380                                                                        <h3 >Intro APR<sup>*</sup> for Purchases:</h3> 
381                                                                    <#else> 
382                                                                        <h3 >APR for Purchases:</h3> 
383                                                                    </#if> 
384                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank"> 
385                                                                                <span class="screen-reader-only"> ${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
386                                                                            </a> 
387                                                                            </p> 
388                                                                        <#break> 
389                                                                </#if> 
390                                                            </#list>                                                       
391                                                        <#else> 
392 
393                                                            <#if (fib.offerType == "115" || fib.offerType == "123" || fib.offerType == "144")> 
394                                                                <#if fib.offerType == "144"> 
395                                                                    <h3>APR for Purchases and Balance Transfers:</h3>                                                        
396                                                                <#else> 
397                                                                    <h3>APR for Purchases and Balance Transfers</h3>                                                        
398                                                                </#if> 
399                                                            <#elseif (fib.offerType=="141" || fib.offerType =="128")> 
400                                                                <h3>Annual Fee</h3><br/> 
401                                                                <#elseif ( fib.offerType == "101" || fib.offerType == "103")> 
402                                                                <h3>Annual Fee<sup>*</sup></h3><br/> 
403                                                            <#else> 
404                                                                <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3> 
405                                                            </#if> 
406                                                            <#list sdata as d> 
407                                                                <#if (fib.offerType=="128" || fib.offerType=="141" || fib.offerType == "101" || fib.offerType == "103")> 
408                                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
409                                                                        <#if (fiCardsData?size > 0)>  
410                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
411                                                                                    class="text-color-default" target="_blank"> 
412                                                                                    <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
413                                                                                </a> 
414                                                                            </p> 
415                                                                                     
416                                                                        <#else> 
417                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
418                                                                                        class="text-color-default" target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions</a> 
419                                                                            </p> 
420                                                                        </#if> 
421                                                                        <#break> 
422                                                                    </#if> 
423 
424                                                                <#else> 
425                                                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
426                                                                                 
427                                                                        <#if (fiCardsData?size > 0)>      
428                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions</a> 
429                                                                            </p> 
430                                                                        <#else> 
431                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions</a> 
432                                                                            </p> 
433                                                                        </#if> 
434                                                                        <#break> 
435                                                                    </#if> 
436                                                                </#if> 
437                                                            </#list> 
438 
439                                                        </#if> 
440                                                    </#if> 
441                                                </div>                                             
442                                            </#if> 
443                                        </div> 
444                                        <!-- option 2 --> 
445                                        <div class="option"> 
446                                            ${additionalInfoGroupB.getData()}  
447                                            <#if pbu != "0892445" && fib.offerType != "147"> 
448                                                <div>                                                                                                                                               
449                                                    <#if (fib.offerType=="141" || fib.offerType=="143" || fib.offerType=="104" || fib.offerType == "101" || fib.offerType == "103" || fib.offerType == "128" || fib.offerType == "121")> 
450                                                        <!-- dont show annual fee --> 
451                                                    <#else> 
452                                                        <#if (fib.offerType=="144" || fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "115")> 
453                                                        <h3>Annual Fee</h3> 
454                                                        <#else> 
455                                                            <h3>Annual Fee<sup>*</sup></h3> 
456                                                        </#if> 
457                                                    </#if> 
458 
459                                                    <#assign APR1 = ""> 
460                                                    <#assign AMF1 = ""> 
461                                                    <#assign BAL1 = "">   
462                                                                                                                           
463                                                    <#list sdata as d>                                                   
464                                                        <#if ((d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (d.scrapedValue?has_content)) > 
465                                                            <#assign APR1 = d.scrapedValue> 
466                                                        <#elseif ((d.scrapedLabel?contains("Annual Membership Fee")) && (d.scrapedValue?has_content)) > 
467                                                            <#assign AMF1 = d.scrapedValue> 
468                                                        <#elseif ((d.scrapedLabel?contains("APR for Balance Transfers")) && (d.scrapedValue?has_content)) > 
469                                                            <#assign BAL1 = d.scrapedValue> 
470                                                        </#if>                                                   
471                                                    </#list> 
472                                                    <#list sdata as d> 
473                                                        <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))>                                              
474                                                            <#if (fiCardsData?size > 0)>  
475                                                            <p> 
476                                                                <#if (fib.offerType == "123")> 
477                                                                Annual Fee: ${d.scrapedValue} 
478                                                                <#else> 
479                                                                ${d.scrapedValue}  
480                                                                </#if> 
481                                                                <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank"> 
482                                                                    <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
483                                                                </a> 
484                                                            </p> 
485                                                             
486                                                            <#else> 
487                                                            <p> 
488                                                                <#if (fib.offerType == "123")> 
489                                                                Annual Fee: ${d.scrapedValue} 
490                                                                <#else> 
491                                                                ${d.scrapedValue}  
492                                                                </#if> 
493                                                                <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" class="text-color-default" target="_blank"> 
494                                                                    <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
495                                                                </a> 
496                                                            </p> 
497                                                            </#if> 
498                                                            <#break>                                                           
499                                                        </#if>                                                              
500                                                    </#list>    
501                                                     
502                                                    <#if (fib.offerType=="141" || fib.offerType=="104" || fib.offerType == "101" || fib.offerType == "103" || fib.offerType == "121" || fib.offerType=="143")> 
503                                                        <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3> 
504                                                        <p>${BAL1!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}"  target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} </span>Terms & Conditions</a> 
505                                                        </p> 
506                                                    </#if>        
507                                                    <#if (fib.offerType == "128")> 
508                                                        <h3>Intro APR<sup>*</sup> for Purchases:</h3>  
509                                                        <p>${APR1!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} </span>Terms & Conditions</a> 
510                                                        </p> 
511                                                    </#if>                                                                                    
512                                                </div> 
513                                            </#if> 
514                                        </div> 
515                                        <!-- option 3 --> 
516                                        <#if (additionalInfoGroupC?has_content)> 
517                                        <div class="option">   
518 
519                                            ${additionalInfoGroupC.getData()}  
520                                            <#assign APR2 = ""> 
521                                            <#assign AMF2 = ""> 
522                                            <#assign BAL2 = ""> 
523                                            <#list sdata as d>                                           
524                                                <#if ((d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (d.scrapedValue?has_content)) > 
525                                                    <#assign APR2 = d.scrapedValue> 
526                                                <#elseif ((d.scrapedLabel?contains("Annual Membership Fee")) && (d.scrapedValue?has_content)) > 
527                                                    <#assign AMF2 = d.scrapedValue> 
528                                                <#elseif ((d.scrapedLabel?contains("APR for Balance Transfers")) && (d.scrapedValue?has_content)) > 
529                                                    <#assign BAL2 = d.scrapedValue> 
530                                                </#if> 
531 
532                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
533                                                    <#if (fib.offerType=="147")> 
534                                                        <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3>  
535                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank"> 
536                                                            <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
537                                                        </a> 
538                                                            </p> 
539                                                        <#break /> 
540                                                    </#if> 
541                                                    <#if (fib.offerType=="147" || fib.offerType=="115")> 
542                                                        <h3>APR for Purchases and Balance Transfers:</h3>  
543                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank"> 
544                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
545                                                            </a> 
546                                                            </p> 
547                                                        <#break /> 
548                                                    </#if>                                                 
549                                                </#if>                                           
550                                            </#list> 
551                                            <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType=="141" || fib.offerType == "101" || fib.offerType == "103")> 
552                                                <h3>Intro APR<sup>*</sup> for Purchases:</h3>  
553                                                <p>${APR2!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} </span>Terms & Conditions</a> 
554                                                </p> 
555                                            </#if> 
556                                            <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType=="128")> 
557                                                <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3> 
558                                                <p>${BAL2!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}"  target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} </span>Terms & Conditions</a> 
559                                                </p> 
560                                            </#if> 
561                                   
562                                            <!-- annual fee --> 
563                                            <#if (fib.offerType=="104"  || fib.offerType=="147" || fib.offerType=="121" || fib.offerType=="143")>     
564                                                <#if fib.offerType=="121"> 
565                                                    <h3>Annual Fee</h3> 
566                                                <#elseif fib.offerType=="143"> 
567                                                    <h3>Annual Fee:</h3> 
568                                                <#else>                                   
569                                                    <h3>Annual Fee<sup>*</sup></h3>        
570                                                </#if>                                        
571                                                <#list sdata as d>                                                    
572                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
573                                                         
574                                                        <#if (fiCardsData?size > 0)>  
575                                                        <p> 
576                                                            <#if (fib.offerType == "123")> 
577                                                            Annual Fee: ${d.scrapedValue} 
578                                                            <#else> 
579                                                            ${d.scrapedValue}  
580                                                            </#if> 
581                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank"> 
582                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
583                                                            </a> 
584                                                        </p> 
585                                                        <#else> 
586                                                        <p> 
587                                                            <#if (fib.offerType == "123")> 
588                                                            Annual Fee: ${d.scrapedValue} 
589                                                            <#else> 
590                                                            ${d.scrapedValue}  
591                                                            </#if> 
592                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" class="text-color-default" target="_blank"> 
593                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
594                                                            </a> 
595                                                        </p> 
596                                                        </#if> 
597                                                        <#break> 
598                                                    </#if> 
599                                                 
600                                                </#list> 
601                                            </#if>                         
602                                        </div>   
603                                    </#if>                                          
604                                </div> 
605                                </div> 
606                            </div> 
607                        </div> 
608                        <div class="banner-wrapper" title="${rollover_text!''}"> 
609                            <div class="banner ${override}"> 
610                                <div class="banner-cardArt cardArtImg"> 
611                                   <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
612                                </div> 
613                                <div class="banner-cta"> 
614                                    <div class="banner-cta-text text-color-white text-bold"> 
615                                        ${optionalCtaFeatureText.getData()}                                    
616                                    </div> 
617                                    <a  
618                                        tabindex="0"  
619                                        id="oadSecButton"  
620                                        data-button-name="cta-button-bottom"  
621                                        class="jn-button banner-cta-apply-button button-bg-color-custom text-color-white" 
622
623                                        ${optionalCtaText.getData()}<span class="screen-reader-only">&nbsp;for ${partnerName!''} ${productName!''} Card</span></a> 
624                                </div> 
625                            </div> 
626                        </div> 
627                    <#break /> 
628                    </#if> 
629                </#list>                         
630 
631                <script> 
632                        var reportingData = window.reportingData || {}; 
633                    document.addEventListener('DOMContentLoaded', function() { 
634                        //console.log('inside ready'); 
635                        var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
636                        var hostName = location.hostname; 
637                     
638                        function getDomainFromHostname(hostname) { 
639                            var parts = hostname.split('.'); 
640                            return parts.length === 3 ? parts[1] : parts[0]; 
641
642                        var domain = getDomainFromHostname(hostName); 
643                        var partnerName = "${partnerName!''}"; 
644 
645                        var ameriprise = '${ameriprise?string("yes", "no")}'; 
646                        var locationCode = "${rlc!lc}"; 
647                        var eidAmp = ""; 
648                        if (ameriprise == "yes") { 
649                            var bankercode_amp = '${bCode}'; 
650                            eidAmp = bankercode_amp.substring(3); 
651                            locationCode =""; 
652                        }    
653                             
654                        var heroCardImgs = document.querySelectorAll('.cardArtImg img'); 
655                        for (var index = 0; index < heroCardImgs.length; index++) { 
656                            var heroCardImg = heroCardImgs[index]; 
657                            var heroCardSrc = heroCardImg.getAttribute("src"); 
658                            if(heroCardSrc != "") { 
659                                resizeImg(heroCardImg); 
660
661
662                        function resizeImg(img) { 
663                            img.addEventListener("load", function() { 
664                                var cardImgWidth = img.width; 
665                                var cardImgHeight = img.height; 
666                                //console.log('width', cardImgWidth); 
667                                //console.log('height', cardImgHeight); 
668                                if(cardImgWidth > cardImgHeight) { 
669                                    img.style.width = "285px"; 
670                                } else { 
671                                    img.style.width = "150px"; 
672
673                            }); 
674
675                         
676                         
677                        $('.jn-button').removeAttr('disabled'); 
678                        $('.jn-button').removeClass('jn-disabled'); 
679                        jQuery('#oadSecButton, #oadSecButton-top').on('click', function(e) { 
680                            jQuery('#BAAForm').submit(); 
681                        }); 
682                         
683                        jQuery('#BAAForm').on('submit', function(e){ 
684                            e.preventDefault(); 
685                            //console.log('in custom submit'); 
686                            var xmlData; 
687                            if(ameriprise == "yes") { 
688                                xmlData = '<?xml version="1.0"?>'+ 
689                                    "<prefillData>"+  
690                                    "<versionNumber>1.0</versionNumber>"+  
691                                    "<applicationData>"+  
692                                    "<referral>" +  
693                                    "<employeeId>" + eidAmp + "</employeeId>" + 
694                                    "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
695                                    "<divisionNumber></divisionNumber>"+ 
696                                    "</referral>" +  
697                                    "<bankerInformation>"+  
698                                    "<locationCode>" + locationCode + "</locationCode>"+ 
699                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
700                                    "<employeeID>${boeid!0}</employeeID>"+ 
701                                    "<name>" + 
702                                    "<first>${bFName!'0'}</first>" + 
703                                    "<last>${bLName!'0'}</last>" + 
704                                    "</name>"+ 
705                                    "<phone>"+ 
706                                    "<areaCode>"+areaCode+"</areaCode>"+  
707                                    "<exchange>"+exchangeCode+"</exchange>"+ 
708                                    "<number>"+num+"</number>"+  
709                                    "</phone>"+  
710                                    "</bankerInformation>"+  
711                                    "</applicationData>"+  
712                                    "</prefillData>" 
713                            } else { 
714                                xmlData = '<?xml version="1.0"?>'+ 
715                                    "<prefillData>"+  
716                                    "<versionNumber>1.0</versionNumber>"+  
717                                    "<applicationData>"+  
718                                    "<bankerInformation>"+  
719                                    "<locationCode>" + locationCode + "</locationCode>"+ 
720                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
721                                    "<employeeID>${boeid!0}</employeeID>"+ 
722                                    "<name>" + 
723                                    "<first>${bFName!'0'}</first>" + 
724                                    "<last>${bLName!'0'}</last>" + 
725                                    "</name>"+ 
726                                    "<phone>"+ 
727                                    "<areaCode>"+areaCode+"</areaCode>"+  
728                                    "<exchange>"+exchangeCode+"</exchange>"+ 
729                                    "<number>"+num+"</number>"+  
730                                    "</phone>"+  
731                                    "</bankerInformation>"+  
732                                    "</applicationData>"+  
733                                    "</prefillData>" 
734                            }                                 
735                            jQuery('#appDataBAA').val(xmlData); 
736                            var buttonName = jQuery('.jn-button').data('button-name'); 
737                            /* SiteCatalyst  onClick tracking */ 
738                            reportingData.apply_button = buttonName; 
739                            AUI().ready(function() { 
740                                if (window.publisherFW) { 
741                                    window.publisherFW.publishEvent("onClick", reportingData); 
742
743                            }); 
744 
745                            this.submit(); 
746                        }); 
747                        var regex = /\d+/g; 
748                        var bdNumber = "${bPhone!''}"; 
749                        var phoneNum = bdNumber.match(regex); 
750                        var areaCode = ""; 
751                        var exchangeCode = ""; 
752                        var num = ""; 
753                        if(phoneNum != null) { 
754                            phoneNum = phoneNum.join(""); 
755                            areaCode = phoneNum.substring(0,3); 
756                            exchangeCode = phoneNum.substring(3,6); 
757                            num = phoneNum.substring(6,10); 
758
759                        var product = ""; 
760                        switch(page) { 
761                            case "consumer-platinum2103": 
762                                product="Platinum Card" 
763                                break; 
764                            case "consumer-edr2112": 
765                                product="Everyday Rewards+" 
766                                break; 
767                            case "secured": 
768                                product="Secured Card" 
769                                break; 
770                            case "business-cash-preferred": 
771                                product="Business Cash Preferred" 
772                                break; 
773                            case "business-real-rewards": 
774                                product="Business Real Rewards Card" 
775                                break; 
776                            case "business-rewards-plus": 
777                                product="Business Rewards PLUS Card" 
778                                break; 
779                            case "premier-visa-signature": 
780                                product="Premier Visa Signature Card" 
781                                break; 
782                            case "business-platinum2103": 
783                                product="Business" 
784                                break; 
785                            case "visa-signature": 
786                                product="Visa Signature Card" 
787                                break;                                     
788                            default:   
789                                product = "All Cards";                           
790                        }                                  
791                             
792                        /* update SiteCatalyst data object */ 
793                        reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
794                        reportingData.location_code = '${rlc!0}'; 
795                        reportingData.product = product; 
796                        reportingData.site_section = 'credit cards'; 
797                        reportingData.platform = 'microsite'; 
798                        reportingData.partner_name = "${partnerName}"; 
799                        reportingData.Banker_id = '${boeid}'; 
800                        reportingData.Banker_code = '${bCode}'; 
801                        reportingData.visitor_type = 'prospect'; 
802                        reportingData.text_to_apply_source = '${text_to_apply_source}'; 
803                        reportingData.page_type = 'product';  
804                        reportingData.campaign_id = '${campaignId}';  
805 
806                             
807                        }); 
808                </script> 
809                                     
810            <#else> 
811                <script> 
812                    console.log("FI Cards Data empty"); 
813                    //location.href = '${url404}'; 
814                </script> 
815            </#if>                   
816        <#else> 
817            <script> 
818                console.log("Fi opt-out"); 
819                //location.href = '${url404}'; 
820            </script> 
821        </#if>        
822    <#else> 
823        <script> 
824            console.log("client profile empty"); 
825            //location.href = '${url404}'; 
826        </script> 
827    </#if>   
828 
829</#if> 
830<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
831<#if (clientdata?size > 0)> 
832    <#assign backgroundColor = clientdata[0].backgroundHexColor>               
833</#if> 
834<script> 
835    // Makes the Header subtitle work if there is two lines of text  
836    var consumerHeader = document.getElementsByClassName("consumer-card")[0]; 
837    if(consumerHeader){ 
838        var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0]; 
839        var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle"); 
840        consumerOfferHeader = consumerOfferHeader[0].getElementsByTagName("p")[0]; 
841        if(consumerOfferHeader.innerText.length >= 31 && consumerOfferHeader.innerText.length < 48){ 
842            //not two lines but the header on tablet gose outside of allocated space. 
843            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 60%, ${backgroundColor!'#173989'} 60%)"; 
844        } else if (consumerOfferHeader.innerText.length >= 48){ 
845            //two lines 
846            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 55%, ${backgroundColor!'#173989'} 55%)"; 
847
848
849 
850    var buisnessHeader = document.getElementsByClassName("business-card")[0];   
851    if(buisnessHeader) { 
852        var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0]; 
853        var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0]; 
854 
855        if(buisnessOfferHeader.innerText.length >= 31 && buisnessOfferHeader.innerText.length < 48){ 
856            //not two lines but the header on tablet gose outside of allocated space. 
857            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 40%, ${backgroundColor!'#173989'} 40%)"; 
858        } else if (buisnessOfferHeader.innerText.length >= 48){ 
859            //two lines 
860            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)"; 
861
862
863     
864</script> 

Artikkel

En feil oppsto under behandling av visningsmalen.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10153#10191#5843831.
1<#assign url = request.attributes.CURRENT_URL > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
4 
5<#assign bCode= qstringmap["bankercode"]?first> 
6<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
7<#list bData as b>      
8    <#assign lc = b.locationcode > 
9    <#assign rLC = b.reallocationcode > 
10    <#assign mappedLC = b.mappedLocationCode > 
11</#list>  
12<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
13    <#assign ameriprise = true> 
14<#else> 
15    <#assign ameriprise = false> 
16</#if> 
17<#if mappedLC?has_content && !ameriprise> 
18    <#assign lc = mappedLC > 
19</#if> 
20 
21<#if lc?has_content> 
22    <#assign prefix = "00000" > 
23    <#assign lcWithPrefix = prefix + lc > 
24    <#assign withPrefixLength = lcWithPrefix?length > 
25    <#assign startHere = withPrefixLength - 5> 
26    <#assign lc = lcWithPrefix?substring(startHere)> 
27    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
28    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
29 
30    <#assign clientProfile = clientProfileList?first>  
31    <#assign partnerName=clientProfile.getMarketingNameLong()> 
32 
33    <#assign pbu = clientProfile.getPbu()> 
34    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
35    <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>  
36    <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)> 
37 
38    <#if (cardProvider?size > 0)> 
39        <#-- This will be V for visa or M for mastercard. --> 
40        <#assign cardProviderAbbreviated = cardProvider[0].cardType> 
41    <#else> 
42        <script> 
43            console.log("No card provider(Visa/Master Card) found for disclaimer"); 
44        </script> 
45    </#if> 
46 
47    <div class="content-container" title="${partnerName} - Disclaimer"> 
48        <div class="jn-disclaimer tier3-disclaimer-${class.getData()}"> 
49            <#if (disclaimersVisa?has_content && cardProviderAbbreviated?contains("V"))> 
50                ${disclaimersVisa.getData()} 
51            </#if> 
52            <#if (disclaimersMasterCard?has_content && cardProviderAbbreviated?contains("M")) > 
53                ${disclaimersMasterCard.getData()} 
54            </#if> 
55        </div> 
56    </div> 
57<#else> 
58    <script> 
59        console.log("No lc for disclaimer"); 
60    </script> 
61</#if> 

Artikkel

En feil oppsto under behandling av visningsmalen.
Expression url404 is undefined on line 16, column 30 in 10153#10191#5433717.
1<#assign url = request.attributes.CURRENT_URL > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
4 
5 
6<#if  qstringmap["bankercode"]?has_content> 
7    <#assign bCode= qstringmap["bankercode"]?first> 
8    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
9    <#list bData as b> 
10      <#assign lc = b.reallocationcode > 
11    </#list> 
12     
13<#else> 
14    <script> 
15        console.log("MainProductBcode missing"); 
16        //location.href = '${url404}'; 
17    </script> 
18</#if> 
19 
20<#assign prefix = "00000" > 
21<#assign lcWithPrefix = prefix + lc > 
22<#assign withPrefixLength = lcWithPrefix?length > 
23<#assign startHere = withPrefixLength - 5> 
24<#assign lc = lcWithPrefix?substring(startHere)> 
25<#if lc?has_content> 
26   <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
27   <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
28   <#assign clientProfile = clientProfileList?first> 
29   <#assign pbu = clientProfile.getPbu()> 
30   <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
31   <#assign partnerName=clientProfile.getMarketingNameLong()> 
32   <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
33   <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
34   <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
35   <script>console.log('partnerUrl: ${partnerUrl}')</script> 
36   <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")> 
37        <#assign partnerUrl = 'https://' + partnerUrl> 
38        <script>console.log('Come to here by accident')</script> 
39    </#if> 
40</#if> 
41<footer class="footer bg-color-black text-color-white"> 
42    ${footerContent.getData()} 
43</footer> 
44 
45<script> 
46     
47    document.querySelector('.footer .copyright').classList.add('ecdma-footer-client-name-copyright'); 
48    document.querySelector('.footer .fdic').innerHTML = '<p><a class="text-color-white" href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?loc='+${lc!0}+'" target="_blank">Privacy and Security</a></p>'; 
49    document.querySelector('.footer .member-agreement').innerHTML='<p><a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!0}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a></p>'; 
50</script> 
51<#if partnerUrl?has_content> 
52    <script> 
53        document.querySelector('.copyright .homelink').href="${partnerUrl!''}"; 
54        document.querySelector('.copyright .homelink').title="${partnerName!''}"; 
55        document.querySelector('.copyright .homelink').innerText="Home"; 
56    </script> 
57</#if>