Отображение сетевого контента

Отображение сетевого контента

Во время обработки запрошенного шаблона произошла ошибка...
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                        <div 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                            <div class="dropdown-select"> 
193                                <span class="selected-option"></span>  
194                                <div class="jn-arrow arrow arrow-right"></div> 
195                            </div> 
196                        </div> 
197                        <div class="jn-hamburger hamburger"> 
198                            <div class="first-line transform transformed1"></div> 
199                            <div></div> 
200                            <div class="transform transformed2"></div> 
201                            <div></div> 
202                        </div> 
203                        <ul> 
204                            <#list fiCardsData as fib> 
205                                <#if ameriprise> 
206                                    <#if (fib.offerType=="101")> 
207                                        <#assign productURL="premier-visa-signature"> 
208                                        <#assign productName="Ameriprise Premier Visa Signature"> 
209                                    <#elseif (fib.offerType=="103")>      
210                                        <#assign productURL = "visa-signature"> 
211                                        <#assign productName = "Ameriprise Visa Signature">                              
212                                    </#if> 
213                                <#else> 
214                                    <#if (fib.offerType=="108" || fib.offerType=="109")> 
215                                        <#assign productURL="consumer-platinum2103"> 
216                                        <#assign productName="Platinum Card"> 
217                                    <#elseif fib.offerType=="147"> 
218                                        <#assign productURL = "max-cash-secured"> 
219                                        <#assign productName = "Max Cash Secured Card" > 
220                                    <#elseif (fib.offerType=="104")> 
221                                        <#assign productURL = "max-cash"> 
222                                        <#assign productName = "Max Cash Preferred Card"> 
223                                    <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
224                                        <#assign productURL = "consumer-edr2112"> 
225                                        <#assign productName = "Everyday Rewards+"> 
226                                    <#elseif fib.offerType == "115"> 
227                                        <#assign productURL = "secured"> 
228                                        <#assign productName = "Secured Card" > 
229                                    <#elseif fib.offerType == "141"> 
230                                        <#assign productURL = "college-real-rewards"> 
231                                        <#assign productName = "College Real Rewards" >  
232                                    <#elseif fib.offerType == "144"> 
233                                        <#assign productURL = "smart-business-rewards"> 
234                                        <#assign productName = "Smart Business Rewards Card" >                                             
235                                    <#elseif fib.offerType == "128"> 
236                                        <#assign productURL = "business-cash-preferred"> 
237                                        <#assign productName = "Business Cash Preferred" > 
238                                    <#elseif fib.offerType == "143"> 
239                                        <#assign productURL = "business-real-rewards"> 
240                                        <#assign productName = "Business Real Rewards Card" > 
241                                    <#elseif fib.offerType == "121"> 
242                                        <#assign productURL = "business-platinum2103"> 
243                                        <#assign productName = "Business Card" > 
244                                    </#if> 
245                                </#if> 
246                                <#if url?matches(".*/${productURL}.*")> 
247                                    <#if (fib.offerType=="104" && url?contains("max-cash-secured"))>  
248                                        <#-- prevent from max cash overiding max cash secured. --> 
249                                        <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li> 
250                                    <#else> 
251                                        <li class="selected" data-value="${productName}"><a href="javascript:void(0)">${productName}</a></li>  
252                                    </#if> 
253                                <#else> 
254                                    <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li> 
255                                </#if> 
256                            </#list> 
257                        </ul> 
258                    </div> 
259                </header> 
260            </div>  
261            <script> 
262                var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
263                var partnerName = "${partnerName!0}"; 
264                var metaDesc = ""; 
265                switch (page) { 
266                    case "consumer-platinum2103": 
267                        document.title = "Our best intro APR for 2 years | "+partnerName+" Platinum Card"; 
268                        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."; 
269                        break; 
270                    case "max-cash-secured": 
271                        document.title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card"; 
272                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
273                        break; 
274                    case "max-cash": 
275                        document.title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card"; 
276                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select"; 
277                        break; 
278                    case "real-rewards": 
279                        document.title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+"; 
280                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
281                        break; 
282                    case "secured": 
283                        document.title = "Strengthen your finances | "+partnerName+" Secured Card"; 
284                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
285                        break; 
286                    case "college-real-rewards": 
287                        document.title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards"; 
288                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
289                        break; 
290                    case "smart-business-rewards": 
291                        document.title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card"; 
292                        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."; 
293                        break; 
294                    case "business-cashback": 
295                        document.title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred"; 
296                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
297                        break; 
298                    case "business-real-rewards": 
299                        document.title = "Earn up to 3X points with no caps | "+partnerName+" Business Real Rewards Card"; 
300                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ; 
301                        break; 
302                    case "business-platinum2103": 
303                        document.title = "Pay down your other credit card balances faster | "+partnerName+" Business Card"; 
304                        metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
305                        break; 
306                    case "premier-visa-signature": 
307                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Premier Visa Signature® Card"; 
308                        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."; 
309                        break; 
310                    case "visa-signature": 
311                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Visa Signature® Card"; 
312                        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."; 
313                        break;                                                                                                 
314
315                if (metaDesc.length > 0) { 
316                    var m = document.createElement('meta');  
317                    m.name = 'description';  
318                    m.content = metaDesc;  
319                    document.head.appendChild(m); 
320
321 
322                document.addEventListener('DOMContentLoaded', function() { 
323                    var pageSelected = $('.selected').attr('data-value'); 
324                    $('.jn-hamburger, .dropdown-select').click(function () { 
325                        $('.styled-select').toggleClass('show-select'); 
326                    }); 
327                    $('.selected-option').text(pageSelected); 
328                }); 
329            </script> 
330         
331        <#else> 
332            <script> 
333                console.log("FI Cards Data empty"); 
334                //location.href = '${url404}'; 
335            </script> 
336        </#if>   
337    <#else> 
338        <script> 
339            console.log("FI opt out"); 
340            //location.href = '${url404}'; 
341        </script> 
342    </#if>  
343<#else> 
344    <script> 
345        console.log("location code empty"); 
346        //location.href = '${url404}'; 
347    </script> 
348</#if> 

Отображение сетевого контента

Во время обработки запрошенного шаблона произошла ошибка...
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"> 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"> for ${partnerName!''} ${productName!''} Card </span> 
307                                                    </button> 
308                                                </form> 
309                                            </#if> 
310                                        </div> 
311                                        <div class="offer-header"> 
312                                            <div class="offer-text-top"> 
313                                                <div class="offer-title"> 
314                                                    ${primaryHeadlineText.getData()} 
315                                                </div> 
316                                                <div class="offer-subtitle"> 
317                                                    ${primaryHeadlineFeature.getData()} 
318                                                </div> 
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"> 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                                        <div class="option"> 
369                                            ${additionalInfoGroupA.getData()} 
370                                            <#if pbu != "0892445">                                              
371                                                <div> 
372                                                    <#if (fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "115" || fib.offerType == "147" || fib.offerType == "101" || fib.offerType =="128") > 
373                                                    <#-- Dont show scrapped data--> 
374                                                    <#else> 
375                                                        <#if (fib.offerType == "104") > 
376                                                            <#list sdata as d> 
377                                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))>            
378                                                                    <h3 >APR<sup>*</sup> for Purchases:</h3> 
379                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank"> 
380                                                                                <span class="screen-reader-only"> ${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
381                                                                            </a> 
382                                                                            </p> 
383                                                                        <#break> 
384                                                                </#if> 
385                                                            </#list>                                                       
386                                                        <#else> 
387 
388                                                            <#if (fib.offerType == "115" || fib.offerType == "123" || fib.offerType == "144")> 
389                                                                <h3>APR for Purchases and Balance Transfers</h3>                                                        
390                                                            <#elseif (fib.offerType=="141")> 
391                                                                <h3>Annual Fee</h3><br/> 
392                                                            <#else> 
393                                                                <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3> 
394                                                            </#if> 
395                                                            <#list sdata as d> 
396                                                                <#if (fib.offerType=="128" || fib.offerType=="141")> 
397                                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
398                                                                        <#if (fiCardsData?size > 0)>  
399                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
400                                                                                    class="text-color-default" target="_blank"> 
401                                                                                    <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
402                                                                                </a> 
403                                                                            </p> 
404                                                                                     
405                                                                        <#else> 
406                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
407                                                                                        class="text-color-default" target="_blank"><span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions</a> 
408                                                                            </p> 
409                                                                        </#if> 
410                                                                        <#break> 
411                                                                    </#if> 
412 
413                                                                <#else> 
414                                                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
415                                                                                 
416                                                                        <#if (fiCardsData?size > 0)>      
417                                                                            <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> 
418                                                                            </p> 
419                                                                        <#else> 
420                                                                            <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> 
421                                                                            </p> 
422                                                                        </#if> 
423                                                                        <#break> 
424                                                                    </#if> 
425                                                                </#if> 
426                                                            </#list> 
427 
428                                                        </#if> 
429                                                    </#if> 
430                                                </div>                                             
431                                            </#if> 
432                                        </div> 
433                                        <div class="option"> 
434                                            ${additionalInfoGroupB.getData()}  
435                                            <#if pbu != "0892445" && fib.offerType != "147"> 
436                                                <div> 
437                                                    <#if (fiCardsData?size > 0)>                                           
438                                                            <#if (fib.offerType=="128")> 
439                                                                <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3> 
440                                                            <#elseif fib.offerType=="104" || fib.offerType=="141"> 
441                                                                <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3> 
442 
443                                                            <#else> 
444                                                                <#if (fib.offerType=="144" || fib.offerType=="143" || fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "115")> 
445                                                                <h3>Annual Fee</h3> 
446                                                                <#else> 
447                                                                    <h3>Annual Fee<sup>*</sup></h3> 
448                                                                </#if> 
449                                                            </#if> 
450                                                            <#list sdata as d> 
451                                                                <#if (fib.offerType=="128" || fib.offerType=="141" || fib.offerType=="104")> 
452                                                                    <#if (d.scrapedLabel?contains("APR for Balance Transfers") && (d.scrapedValue?has_content))>  
453                                                                         
454                                                                        <#if (fiCardsData?size > 0)>   
455                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
456                                                                                class="text-color-default" target="_blank"> 
457                                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
458                                                                            </a> 
459                                                                            </p> 
460                                                                        <#else> 
461                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
462                                                                                class="text-color-default" target="_blank"> 
463                                                                                    <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
464                                                                                </a> 
465                                                                            </p> 
466                                                                        </#if> 
467                                                                        <#break> 
468                                                                    </#if> 
469                                                                <#else> 
470                                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
471                                                                         
472                                                                        <#if (fiCardsData?size > 0)>  
473                                                                        <p> 
474                                                                            <#if (fib.offerType == "123")> 
475                                                                            Annual Fee: ${d.scrapedValue} 
476                                                                            <#else> 
477                                                                            ${d.scrapedValue}  
478                                                                            </#if> 
479                                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank"> 
480                                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
481                                                                            </a> 
482                                                                        </p> 
483                                                                        <#else> 
484                                                                        <p> 
485                                                                            <#if (fib.offerType == "123")> 
486                                                                            Annual Fee: ${d.scrapedValue} 
487                                                                            <#else> 
488                                                                            ${d.scrapedValue}  
489                                                                            </#if> 
490                                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" class="text-color-default" target="_blank"> 
491                                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
492                                                                            </a> 
493                                                                        </p> 
494                                                                        </#if> 
495                                                                        <#break> 
496                                                                    </#if> 
497                                                                </#if> 
498                                                            </#list>                                                       
499                                                    </#if> 
500                                                </div> 
501                                            </#if> 
502                                        </div> 
503                                        <#if (additionalInfoGroupC?has_content)> 
504                                        <div class="option">   
505 
506                                            ${additionalInfoGroupC.getData()}  
507                                            <#list sdata as d> 
508                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
509                                                    <#if (fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "101" || fib.offerType == "103" || fib.offerType=="147")> 
510                                                        <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3>  
511                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank"> 
512                                                            <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
513                                                        </a> 
514                                                            </p> 
515                                                        <#break /> 
516                                                    </#if> 
517                                                    <#if (fib.offerType=="147" || fib.offerType=="115")> 
518                                                        <h3>APR for Purchases and Balance Transfers:</h3>  
519                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank"> 
520                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
521                                                            </a> 
522                                                            </p> 
523                                                        <#break /> 
524                                                    </#if>  
525                                                </#if>  
526                                            </#list> 
527                                            <#if (fib.offerType=="104" || fib.offerType=="128" || fib.offerType=="147")> 
528                                                <h3>Annual Fee<sup>*</sup></h3> 
529                                                <#list sdata as d>                                                    
530                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
531                                                         
532                                                        <#if (fiCardsData?size > 0)>  
533                                                        <p> 
534                                                            <#if (fib.offerType == "123")> 
535                                                            Annual Fee: ${d.scrapedValue} 
536                                                            <#else> 
537                                                            ${d.scrapedValue}  
538                                                            </#if> 
539                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank"> 
540                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
541                                                            </a> 
542                                                        </p> 
543                                                        <#else> 
544                                                        <p> 
545                                                            <#if (fib.offerType == "123")> 
546                                                            Annual Fee: ${d.scrapedValue} 
547                                                            <#else> 
548                                                            ${d.scrapedValue}  
549                                                            </#if> 
550                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" class="text-color-default" target="_blank"> 
551                                                                <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions 
552                                                            </a> 
553                                                        </p> 
554                                                        </#if> 
555                                                        <#break> 
556                                                    </#if> 
557                                                 
558                                                </#list> 
559                                            </#if>                         
560                                        </div>   
561                                    </#if>                                          
562                                </div> 
563                                </div> 
564                            </div> 
565                        </div> 
566                        <div class="banner-wrapper" title="${rollover_text!''}"> 
567                            <div class="banner ${override}"> 
568                                <div class="banner-cardArt cardArtImg"> 
569                                   <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
570                                </div> 
571                                <div class="banner-cta"> 
572                                    <div class="banner-cta-text text-color-white text-bold"> 
573                                        ${optionalCtaFeatureText.getData()}                                    
574                                    </div> 
575                                    <a  
576                                        tabindex="0"  
577                                        id="oadSecButton"  
578                                        data-button-name="cta-button-bottom"  
579                                        class="jn-button banner-cta-apply-button button-bg-color-custom text-color-white" 
580
581                                        ${optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card</span></a> 
582                                </div> 
583                            </div> 
584                        </div> 
585                    <#break /> 
586                    </#if> 
587                </#list>                         
588 
589                <script> 
590                        var reportingData = window.reportingData || {}; 
591                    document.addEventListener('DOMContentLoaded', function() { 
592                        //console.log('inside ready'); 
593                        var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
594                        var hostName = location.hostname; 
595                     
596                        function getDomainFromHostname(hostname) { 
597                            var parts = hostname.split('.'); 
598                            return parts.length === 3 ? parts[1] : parts[0]; 
599
600                        var domain = getDomainFromHostname(hostName); 
601                        var partnerName = "${partnerName!''}"; 
602 
603                        var ameriprise = '${ameriprise?string("yes", "no")}'; 
604                        var locationCode = "${rlc!lc}"; 
605                        var eidAmp = ""; 
606                        if (ameriprise == "yes") { 
607                            var bankercode_amp = '${bCode}'; 
608                            eidAmp = bankercode_amp.substring(3); 
609                            locationCode =""; 
610                        }    
611                             
612                        var heroCardImgs = document.querySelectorAll('.cardArtImg img'); 
613                        for (var index = 0; index < heroCardImgs.length; index++) { 
614                            var heroCardImg = heroCardImgs[index]; 
615                            var heroCardSrc = heroCardImg.getAttribute("src"); 
616                            if(heroCardSrc != "") { 
617                                resizeImg(heroCardImg); 
618
619
620                        function resizeImg(img) { 
621                            img.addEventListener("load", function() { 
622                                var cardImgWidth = img.width; 
623                                var cardImgHeight = img.height; 
624                                //console.log('width', cardImgWidth); 
625                                //console.log('height', cardImgHeight); 
626                                if(cardImgWidth > cardImgHeight) { 
627                                    img.style.width = "285px"; 
628                                } else { 
629                                    img.style.width = "150px"; 
630
631                            }); 
632
633                         
634                         
635                        $('.jn-button').removeAttr('disabled'); 
636                        $('.jn-button').removeClass('jn-disabled'); 
637                        jQuery('#oadSecButton, #oadSecButton-top').on('click', function(e) { 
638                            jQuery('#BAAForm').submit(); 
639                        }); 
640                         
641                        jQuery('#BAAForm').on('submit', function(e){ 
642                            e.preventDefault(); 
643                            //console.log('in custom submit'); 
644                            var xmlData; 
645                            if(ameriprise == "yes") { 
646                                xmlData = '<?xml version="1.0"?>'+ 
647                                    "<prefillData>"+  
648                                    "<versionNumber>1.0</versionNumber>"+  
649                                    "<applicationData>"+  
650                                    "<referral>" +  
651                                    "<employeeId>" + eidAmp + "</employeeId>" + 
652                                    "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
653                                    "<divisionNumber></divisionNumber>"+ 
654                                    "</referral>" +  
655                                    "<bankerInformation>"+  
656                                    "<locationCode>" + locationCode + "</locationCode>"+ 
657                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
658                                    "<employeeID>${boeid!0}</employeeID>"+ 
659                                    "<name>" + 
660                                    "<first>${bFName!'0'}</first>" + 
661                                    "<last>${bLName!'0'}</last>" + 
662                                    "</name>"+ 
663                                    "<phone>"+ 
664                                    "<areaCode>"+areaCode+"</areaCode>"+  
665                                    "<exchange>"+exchangeCode+"</exchange>"+ 
666                                    "<number>"+num+"</number>"+  
667                                    "</phone>"+  
668                                    "</bankerInformation>"+  
669                                    "</applicationData>"+  
670                                    "</prefillData>" 
671                            } else { 
672                                xmlData = '<?xml version="1.0"?>'+ 
673                                    "<prefillData>"+  
674                                    "<versionNumber>1.0</versionNumber>"+  
675                                    "<applicationData>"+  
676                                    "<bankerInformation>"+  
677                                    "<locationCode>" + locationCode + "</locationCode>"+ 
678                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
679                                    "<employeeID>${boeid!0}</employeeID>"+ 
680                                    "<name>" + 
681                                    "<first>${bFName!'0'}</first>" + 
682                                    "<last>${bLName!'0'}</last>" + 
683                                    "</name>"+ 
684                                    "<phone>"+ 
685                                    "<areaCode>"+areaCode+"</areaCode>"+  
686                                    "<exchange>"+exchangeCode+"</exchange>"+ 
687                                    "<number>"+num+"</number>"+  
688                                    "</phone>"+  
689                                    "</bankerInformation>"+  
690                                    "</applicationData>"+  
691                                    "</prefillData>" 
692                            }                                 
693                            jQuery('#appDataBAA').val(xmlData); 
694                            var buttonName = jQuery('.jn-button').data('button-name'); 
695                            /* SiteCatalyst  onClick tracking */ 
696                            reportingData.apply_button = buttonName; 
697                            AUI().ready(function() { 
698                                if (window.publisherFW) { 
699                                    window.publisherFW.publishEvent("onClick", reportingData); 
700
701                            }); 
702 
703                            this.submit(); 
704                        }); 
705                        var regex = /\d+/g; 
706                        var bdNumber = "${bPhone!''}"; 
707                        var phoneNum = bdNumber.match(regex); 
708                        var areaCode = ""; 
709                        var exchangeCode = ""; 
710                        var num = ""; 
711                        if(phoneNum != null) { 
712                            phoneNum = phoneNum.join(""); 
713                            areaCode = phoneNum.substring(0,3); 
714                            exchangeCode = phoneNum.substring(3,6); 
715                            num = phoneNum.substring(6,10); 
716
717                        var product = ""; 
718                        switch(page) { 
719                            case "consumer-platinum2103": 
720                                product="Platinum Card" 
721                                break; 
722                            case "consumer-edr2112": 
723                                product="Everyday Rewards+" 
724                                break; 
725                            case "secured": 
726                                product="Secured Card" 
727                                break; 
728                            case "business-cash-preferred": 
729                                product="Business Cash Preferred" 
730                                break; 
731                            case "business-real-rewards": 
732                                product="Business Real Rewards Card" 
733                                break; 
734                            case "business-rewards-plus": 
735                                product="Business Rewards PLUS Card" 
736                                break; 
737                            case "premier-visa-signature": 
738                                product="Premier Visa Signature Card" 
739                                break; 
740                            case "business-platinum2103": 
741                                product="Business" 
742                                break; 
743                            case "visa-signature": 
744                                product="Visa Signature Card" 
745                                break;                                     
746                            default:   
747                                product = "All Cards";                           
748                        }                                  
749                             
750                        /* update SiteCatalyst data object */ 
751                        reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
752                        reportingData.location_code = '${rlc!0}'; 
753                        reportingData.product = product; 
754                        reportingData.site_section = 'credit cards'; 
755                        reportingData.platform = 'microsite'; 
756                        reportingData.partner_name = "${partnerName}"; 
757                        reportingData.Banker_id = '${boeid}'; 
758                        reportingData.Banker_code = '${bCode}'; 
759                        reportingData.visitor_type = 'prospect'; 
760                        reportingData.text_to_apply_source = '${text_to_apply_source}'; 
761                        reportingData.page_type = 'product';  
762                        reportingData.campaign_id = '${campaignId}';  
763 
764                             
765                        }); 
766                </script> 
767                                     
768            <#else> 
769                <script> 
770                    console.log("FI Cards Data empty"); 
771                    //location.href = '${url404}'; 
772                </script> 
773            </#if>                   
774        <#else> 
775            <script> 
776                console.log("Fi opt-out"); 
777                //location.href = '${url404}'; 
778            </script> 
779        </#if>        
780    <#else> 
781        <script> 
782            console.log("client profile empty"); 
783            //location.href = '${url404}'; 
784        </script> 
785    </#if>   
786 
787</#if> 
788<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
789<#if (clientdata?size > 0)> 
790    <#assign backgroundColor = clientdata[0].backgroundHexColor>               
791</#if> 
792<script> 
793    // Makes the Header subtitle work if there is two lines of text  
794    var consumerHeader = document.getElementsByClassName("consumer-card")[0]; 
795    if(consumerHeader){ 
796        var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0]; 
797        var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle"); 
798        consumerOfferHeader = consumerOfferHeader[0].getElementsByTagName("p")[0]; 
799        if(consumerOfferHeader.innerText.length >= 31 && consumerOfferHeader.innerText.length < 48){ 
800            //not two lines but the header on tablet gose outside of allocated space. 
801            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 60%, ${backgroundColor!'#173989'} 60%)"; 
802        } else if (consumerOfferHeader.innerText.length >= 48){ 
803            //two lines 
804            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 55%, ${backgroundColor!'#173989'} 55%)"; 
805
806
807 
808    var buisnessHeader = document.getElementsByClassName("business-card")[0];   
809    if(buisnessHeader) { 
810        var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0]; 
811        var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0]; 
812 
813        if(buisnessOfferHeader.innerText.length >= 31 && buisnessOfferHeader.innerText.length < 48){ 
814            //not two lines but the header on tablet gose outside of allocated space. 
815            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 40%, ${backgroundColor!'#173989'} 40%)"; 
816        } else if (buisnessOfferHeader.innerText.length >= 48){ 
817            //two lines 
818            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)"; 
819
820
821     
822</script> 

Отображение сетевого контента

Во время обработки запрошенного шаблона произошла ошибка...
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10153#10191#6590077.
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('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
7<#list bData as b>      
8    <#assign lc = b.locationcode > 
9    <#assign rLC = b.reallocationcode > 
10    <#assign mappedLC = b.mappedLocationCode > 
11</#list>  
12<#if mappedLC?has_content && !(url?contains("11t1m"))> 
13    <#assign lc = mappedLC > 
14</#if> 
15<#if lc?has_content> 
16    <#assign prefix = "00000" > 
17    <#assign lcWithPrefix = prefix + lc > 
18    <#assign withPrefixLength = lcWithPrefix?length > 
19    <#assign startHere = withPrefixLength - 5> 
20    <#assign lc = lcWithPrefix?substring(startHere)> 
21    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
22    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
23 
24    <#assign clientProfile = clientProfileList?first>  
25    <#assign partnerName=clientProfile.getMarketingNameLong()> 
26</#if> 
27 
28<div class="content-container" title="${partnerName!''} - Disclaimer"> 
29    <div class="jn-disclaimer tier3-disclaimer-${class.getData()}"> 
30        ${content.getData()} 
31    </div> 
32</div> 

Отображение сетевого контента

Во время обработки запрошенного шаблона произошла ошибка...
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>