Hiển thị bài viết tin tức

Hiển thị bài viết tin tức

Có lỗi xảy ra trong quá trình xử lý biểu mẫu.
Expression bankercode is undefined on line 42, column 6 in 10154#10192#154680751.
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!''}" alt="${partnerName!''}">  
129                            </a> 
130                        <#else> 
131                            <a title="${partnerName!''}"> 
132                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"> 
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 = "The purchasing power of Zero | "+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> 

Hiển thị bài viết tin tức

Có lỗi xảy ra trong quá trình xử lý biểu mẫu.
Expression bCode is undefined on line 58, column 6 in 10154#10192#155404894.
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                        <#if (sdata?size > 0)>   
211                            <#if (productURL=="consumer-platinum2103" && !ameriprise)> 
212                                <#assign apr = "">                         
213                                <#list sdata as d> 
214                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))> 
215                                        <#assign apr = d.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
216                                        <script> 
217                                            //console.log("scraped data exists"); 
218                                            //console.log("APR", '${apr}') 
219                                        </script> 
220                                        <#break> 
221                                    </#if> 
222                                </#list> 
223                                <script> 
224                                        $(document).ready(function () { 
225                                            var aprText = "${apr}"; 
226                                            if (aprText) { 
227                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
228                                                var billing_cycle = ""; 
229                                                var apr_min = ""; 
230                                                var apr_max = ""; 
231                                                if (aprText.indexOf("Platinum:") != -1) { 
232                                                    billing_cycle = matches[1]; 
233                                                    apr_min = matches[2]; 
234                                                    apr_max = matches[3]; 
235
236                                                if (billing_cycle) { 
237                                                    $(".scraped-billing-cycle").html(billing_cycle); 
238
239                                                if (apr_min) { 
240                                                    $(".scraped-apr-min").html(apr_min); 
241
242                                                if (apr_max) { 
243                                                    $('.scraped-apr-max').html(apr_max); 
244
245
246                                        }); 
247                                </script> 
248                                 
249                            </#if>                                 
250                        <#else>     
251                            <script> 
252                                console.log("scraped data missing"); 
253                            </script> 
254                        </#if>   
255                        <#if ameriprise> 
256                            <#assign card_art_alt =  partnerName + " " + productName + " " + " Card"> 
257                            <#assign rollover_text =  partnerName + " " + productName + " " + " Card"> 
258                        <#else> 
259                            <#assign card_art_alt = partnerName> 
260                            <#assign rollover_text =  partnerName + " " + productName + " " + " Credit Card"> 
261                            <#assign card_text = productName + " Card"> 
262                        </#if> 
263 
264                        <div class="hero-container ${pageClass} ${productClass!''}" title="${rollover_text!''}"> 
265                            <div class="hero-main"> 
266                                 
267                                <div class="hero-main-container"> 
268                                    <div class="hero-main-offer"> 
269                                        <div class="offer-header"> 
270                                            <div class="offer-text-top"> 
271                                                <div class="offer-title"> 
272                                                    ${primaryHeadlineText.getData()} 
273                                                </div> 
274                                                <div class="offer-subtitle"> 
275                                                    ${primaryHeadlineFeature.getData()} 
276                                                </div> 
277                                            </div> 
278                                            <div class="offer-text-bottom hide-mobile"> 
279                                                <div class="offer-detail-text text-color-default "> 
280                                                    ${primaryHeadlineFeatureTop.getData()} 
281                                                    ${primaryHeadlineFeatureBottom.getData()} 
282                                                    <#-- allow for all except these url --> 
283                                                    <#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"))> 
284                                                        <br> 
285                                                        <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"  class="text-color-default" target="_blank">See terms & conditions</a> 
286                                                    </#if> 
287                                                </div> 
288                                                <a tabindex="0" id="oadSecButton-top" data-button-name="cta-button-bottom" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button banner-cta-apply-button">${optionalCtaText.getData()}</a>                                                      
289                                                <#if ( 
290                                                    url?contains("smart-business-rewards") || 
291                                                    url?contains("business-real-rewards") || 
292                                                    url?contains("max-cash")  ||    
293                                                    url?contains("business-cash-preferred") ||                                                
294                                                    url?contains("consumer-edr2112") 
295
296
297                                                    <#-- Make link not show for max cash secured and show only on max cash--> 
298                                                    <#if !url?contains("max-cash-secured")> 
299                                                        <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
300                                                    </#if>                                                    
301                                                </#if>                                
302 
303                                            </div> 
304                                        </div> 
305                                        <div class="offer-detail"> 
306                                            <div class="offer-detail-cardArt cardArtImg"> 
307                                                  <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
308                                                    <p>${card_text!''}</p> 
309                                            </div> 
310                                            <div class="offer-detail-text text-color-default hide-desktop"> 
311                                                ${primaryHeadlineFeatureTop.getData()} 
312                                                ${primaryHeadlineFeatureBottom.getData()} 
313                                            </div> 
314                                            <#if (fiCardsData?size > 0)>  
315                                                 
316                                                <form class="form1 hide-desktop" action='${oadURL}?locationCode=${lc_used}&offerId=${newOfferId}&preparerType=customer&sourceCode=${newSourceCode}' method="post" id="BAAForm"> 
317                                                    <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
318                                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
319                                                    <input type="submit" data-button-name="cta-button-top" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button apply-button button-bg-color-custom" value="${ctaText.getData()}" disabled /> 
320                                                </form> 
321                                            <#else> 
322                                                <form class="form2 hide-desktop" action='${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=customer&sourceCode=${sourceCode}' method="post" id="BAAForm"> 
323                                                    <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
324                                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
325                                                    <input type="submit" data-button-name="cta-button-top" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button apply-button button-bg-color-custom" value="${ctaText.getData()}" disabled /> 
326                                                </form> 
327                                            </#if> 
328                                        </div> 
329                                    </div> 
330                                </div> 
331                            </div> 
332                            <div class="hero-primary-benefits"> 
333                                <#if secondaryFeatureText.getData() != ""> 
334                                    <#assign featureCounter = 0> 
335                                    <#list secondaryFeatureText.getSiblings() as item> 
336                                        <div class="primary-benefit"> 
337                                            <div class="primary-benefit-wrapper text-color-white"> 
338                                                ${item.getData()} 
339                                                <#if (fib.offerType=="108" || fib.offerType=="109") && (featureCounter == secondaryFeatureText.getSiblings()?size - 1)> 
340                                                <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
341                                                                                class="text-color-default" target="_blank">Terms & Conditions</a> 
342                                                </#if> 
343                                            </div> 
344                                        </div> 
345                                        <#assign featureCounter = featureCounter + 1> 
346                                    </#list> 
347                                </#if> 
348                            </div> 
349                        </div> 
350                        <div class="standard-content-container" title="${rollover_text!''}"> 
351                            <div class="product-details-container"> 
352                                <div class="detail-background"> 
353                                    <h2>${secondaryHeadlineText.getData()}</h2> 
354                                    <div class="secondary-benefits"> 
355                                        <div class="option"> 
356                                            ${additionalInfoGroupA.getData()} 
357                                            <#if pbu != "0892445">                                              
358                                                <div> 
359                                                    <#if (fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "115" || fib.offerType == "147" || fib.offerType == "101" || fib.offerType =="128") > 
360                                                    <#-- Dont show scrapped data--> 
361                                                    <#else> 
362                                                        <#if (fib.offerType == "104") > 
363                                                            <#list sdata as d> 
364                                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))>            
365                                                                    <h3 >APR<sup>*</sup> for Purchases:</h3> 
366                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"  class="text-color-default" target="_blank">Terms & Conditions</a> 
367                                                                            </p> 
368                                                                        <#break> 
369                                                                </#if> 
370                                                            </#list>                                                       
371                                                        <#else> 
372 
373                                                            <#if (fib.offerType == "115" || fib.offerType == "123" || fib.offerType == "144")> 
374                                                                <h3>APR for Purchases and Balance Transfers</h3>                                                        
375                                                            <#elseif (fib.offerType=="141")> 
376                                                                <h3>Annual Fee</h3><br/> 
377                                                            <#else> 
378                                                                <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3> 
379                                                            </#if> 
380                                                            <#list sdata as d> 
381                                                                <#if (fib.offerType=="128" || fib.offerType=="141")> 
382                                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
383                                                                        <#if (fiCardsData?size > 0)>  
384                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
385                                                                                    class="text-color-default" target="_blank">Terms & Conditions</a> 
386                                                                            </p> 
387                                                                                     
388                                                                        <#else> 
389                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
390                                                                                        class="text-color-default" target="_blank">Terms & Conditions</a> 
391                                                                            </p> 
392                                                                        </#if> 
393                                                                        <#break> 
394                                                                    </#if> 
395 
396                                                                <#else> 
397                                                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
398                                                                                 
399                                                                        <#if (fiCardsData?size > 0)>      
400                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
401                                                                            </p> 
402                                                                        <#else> 
403                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"  class="text-color-default" target="_blank">Terms & Conditions</a> 
404                                                                            </p> 
405                                                                        </#if> 
406                                                                        <#break> 
407                                                                    </#if> 
408                                                                </#if> 
409                                                            </#list> 
410 
411                                                        </#if> 
412                                                    </#if> 
413                                                </div>                                             
414                                            </#if> 
415                                        </div> 
416                                        <div class="option"> 
417                                            ${additionalInfoGroupB.getData()}  
418                                            <#if pbu != "0892445" && fib.offerType != "147"> 
419                                                <div> 
420                                                    <#if (fiCardsData?size > 0)>                                           
421                                                            <#if (fib.offerType=="128")> 
422                                                                <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3> 
423                                                            <#elseif fib.offerType=="104" || fib.offerType=="141"> 
424                                                                <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3> 
425 
426                                                            <#else> 
427                                                                <#if (fib.offerType=="144" || fib.offerType=="143" || fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "115")> 
428                                                                <h3>Annual Fee</h3> 
429                                                                <#else> 
430                                                                    <h3>Annual Fee<sup>*</sup></h3> 
431                                                                </#if> 
432                                                            </#if> 
433                                                            <#list sdata as d> 
434                                                                <#if (fib.offerType=="128" || fib.offerType=="141" || fib.offerType=="104")> 
435                                                                    <#if (d.scrapedLabel?contains("APR for Balance Transfers") && (d.scrapedValue?has_content))>  
436                                                                         
437                                                                        <#if (fiCardsData?size > 0)>   
438                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
439                                                                                class="text-color-default" target="_blank">Terms & Conditions</a> 
440                                                                            </p> 
441                                                                        <#else> 
442                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
443                                                                                class="text-color-default" target="_blank">Terms & Conditions</a> 
444                                                                            </p> 
445                                                                        </#if> 
446                                                                        <#break> 
447                                                                    </#if> 
448                                                                <#else> 
449                                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
450                                                                         
451                                                                        <#if (fiCardsData?size > 0)>  
452                                                                        <p> 
453                                                                            <#if (fib.offerType == "123")> 
454                                                                            Annual Fee: ${d.scrapedValue} 
455                                                                            <#else> 
456                                                                            ${d.scrapedValue}  
457                                                                            </#if> 
458                                                                            <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
459                                                                        </p> 
460                                                                        <#else> 
461                                                                        <p> 
462                                                                            <#if (fib.offerType == "123")> 
463                                                                            Annual Fee: ${d.scrapedValue} 
464                                                                            <#else> 
465                                                                            ${d.scrapedValue}  
466                                                                            </#if> 
467                                                                            <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" class="text-color-default" target="_blank">Terms & Conditions</a> 
468                                                                        </p> 
469                                                                        </#if> 
470                                                                        <#break> 
471                                                                    </#if> 
472                                                                </#if> 
473                                                            </#list>                                                       
474                                                    </#if> 
475                                                </div> 
476                                            </#if> 
477                                        </div> 
478                                        <#if (additionalInfoGroupC?has_content)> 
479                                        <div class="option">   
480 
481                                            ${additionalInfoGroupC.getData()}  
482                                            <#list sdata as d> 
483                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
484                                                    <#if (fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "101" || fib.offerType == "103" || fib.offerType=="147")> 
485                                                        <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3>  
486                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
487                                                            </p> 
488                                                        <#break /> 
489                                                    </#if> 
490                                                    <#if (fib.offerType=="147" || fib.offerType=="115")> 
491                                                        <h3>APR for Purchases and Balance Transfers:</h3>  
492                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
493                                                            </p> 
494                                                        <#break /> 
495                                                    </#if>  
496                                                </#if>  
497                                            </#list> 
498                                            <#if (fib.offerType=="104" || fib.offerType=="128" || fib.offerType=="147")> 
499                                                <h3>Annual Fee<sup>*</sup></h3> 
500                                                <#list sdata as d>                                                    
501                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
502                                                         
503                                                        <#if (fiCardsData?size > 0)>  
504                                                        <p> 
505                                                            <#if (fib.offerType == "123")> 
506                                                            Annual Fee: ${d.scrapedValue} 
507                                                            <#else> 
508                                                            ${d.scrapedValue}  
509                                                            </#if> 
510                                                            <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
511                                                        </p> 
512                                                        <#else> 
513                                                        <p> 
514                                                            <#if (fib.offerType == "123")> 
515                                                            Annual Fee: ${d.scrapedValue} 
516                                                            <#else> 
517                                                            ${d.scrapedValue}  
518                                                            </#if> 
519                                                            <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" class="text-color-default" target="_blank">Terms & Conditions</a> 
520                                                        </p> 
521                                                        </#if> 
522                                                        <#break> 
523                                                    </#if> 
524                                                 
525                                                </#list> 
526                                            </#if>                         
527                                        </div>   
528                                    </#if>                                          
529                                </div> 
530                                </div> 
531                            </div> 
532                        </div> 
533                        <div class="banner-wrapper" title="${rollover_text!''}"> 
534                            <div class="banner ${override}"> 
535                                <div class="banner-cardArt cardArtImg"> 
536                                   <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
537                                </div> 
538                                <div class="banner-cta"> 
539                                    <div class="banner-cta-text text-color-white text-bold"> 
540                                        ${optionalCtaFeatureText.getData()}                                    
541                                    </div> 
542                                    <a tabindex="0" id="oadSecButton" data-button-name="cta-button-bottom" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button banner-cta-apply-button button-bg-color-custom text-color-white">${optionalCtaText.getData()}</a> 
543                                </div> 
544                            </div> 
545                        </div> 
546                    <#break /> 
547                    </#if> 
548                </#list>                         
549 
550                <script> 
551                        var reportingData = window.reportingData || {}; 
552                    document.addEventListener('DOMContentLoaded', function() { 
553                        //console.log('inside ready'); 
554                        var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
555                        var hostName = location.hostname; 
556                     
557                        function getDomainFromHostname(hostname) { 
558                            var parts = hostname.split('.'); 
559                            return parts.length === 3 ? parts[1] : parts[0]; 
560
561                        var domain = getDomainFromHostname(hostName); 
562                        var partnerName = "${partnerName!''}"; 
563 
564                        var ameriprise = '${ameriprise?string("yes", "no")}'; 
565                        var locationCode = "${rlc!lc}"; 
566                        var eidAmp = ""; 
567                        if (ameriprise == "yes") { 
568                            var bankercode_amp = '${bCode}'; 
569                            eidAmp = bankercode_amp.substring(3); 
570                            locationCode =""; 
571                        }    
572                             
573                        var heroCardImgs = document.querySelectorAll('.cardArtImg img'); 
574                        for (var index = 0; index < heroCardImgs.length; index++) { 
575                            var heroCardImg = heroCardImgs[index]; 
576                            var heroCardSrc = heroCardImg.getAttribute("src"); 
577                            if(heroCardSrc != "") { 
578                                resizeImg(heroCardImg); 
579
580
581                        function resizeImg(img) { 
582                            img.addEventListener("load", function() { 
583                                var cardImgWidth = img.width; 
584                                var cardImgHeight = img.height; 
585                                //console.log('width', cardImgWidth); 
586                                //console.log('height', cardImgHeight); 
587                                if(cardImgWidth > cardImgHeight) { 
588                                    img.style.width = "285px"; 
589                                } else { 
590                                    img.style.width = "150px"; 
591
592                            }); 
593
594                         
595                         
596                        $('.jn-button').removeAttr('disabled'); 
597                        $('.jn-button').removeClass('jn-disabled'); 
598                        jQuery('#oadSecButton, #oadSecButton-top').on('click', function(e) { 
599                            jQuery('#BAAForm').submit(); 
600                        }); 
601                         
602                        jQuery('#BAAForm').on('submit', function(e){ 
603                            e.preventDefault(); 
604                            //console.log('in custom submit'); 
605                            var xmlData; 
606                            if(ameriprise == "yes") { 
607                                xmlData = '<?xml version="1.0"?>'+ 
608                                    "<prefillData>"+  
609                                    "<versionNumber>1.0</versionNumber>"+  
610                                    "<applicationData>"+  
611                                    "<referral>" +  
612                                    "<employeeId>" + eidAmp + "</employeeId>" + 
613                                    "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
614                                    "<divisionNumber></divisionNumber>"+ 
615                                    "</referral>" +  
616                                    "<bankerInformation>"+  
617                                    "<locationCode>" + locationCode + "</locationCode>"+ 
618                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
619                                    "<employeeID>${boeid!0}</employeeID>"+ 
620                                    "<name>" + 
621                                    "<first>${bFName!'0'}</first>" + 
622                                    "<last>${bLName!'0'}</last>" + 
623                                    "</name>"+ 
624                                    "<phone>"+ 
625                                    "<areaCode>"+areaCode+"</areaCode>"+  
626                                    "<exchange>"+exchangeCode+"</exchange>"+ 
627                                    "<number>"+num+"</number>"+  
628                                    "</phone>"+  
629                                    "</bankerInformation>"+  
630                                    "</applicationData>"+  
631                                    "</prefillData>" 
632                            } else { 
633                                xmlData = '<?xml version="1.0"?>'+ 
634                                    "<prefillData>"+  
635                                    "<versionNumber>1.0</versionNumber>"+  
636                                    "<applicationData>"+  
637                                    "<bankerInformation>"+  
638                                    "<locationCode>" + locationCode + "</locationCode>"+ 
639                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
640                                    "<employeeID>${boeid!0}</employeeID>"+ 
641                                    "<name>" + 
642                                    "<first>${bFName!'0'}</first>" + 
643                                    "<last>${bLName!'0'}</last>" + 
644                                    "</name>"+ 
645                                    "<phone>"+ 
646                                    "<areaCode>"+areaCode+"</areaCode>"+  
647                                    "<exchange>"+exchangeCode+"</exchange>"+ 
648                                    "<number>"+num+"</number>"+  
649                                    "</phone>"+  
650                                    "</bankerInformation>"+  
651                                    "</applicationData>"+  
652                                    "</prefillData>" 
653                            }                                 
654                            jQuery('#appDataBAA').val(xmlData); 
655                            var buttonName = jQuery('.jn-button').data('button-name'); 
656                            /* SiteCatalyst  onClick tracking */ 
657                            reportingData.apply_button = buttonName; 
658                            AUI().ready(function() { 
659                                if (window.publisherFW) { 
660                                    window.publisherFW.publishEvent("onClick", reportingData); 
661
662                            }); 
663 
664                            this.submit(); 
665                        }); 
666                        var regex = /\d+/g; 
667                        var bdNumber = "${bPhone!''}"; 
668                        var phoneNum = bdNumber.match(regex); 
669                        var areaCode = ""; 
670                        var exchangeCode = ""; 
671                        var num = ""; 
672                        if(phoneNum != null) { 
673                            phoneNum = phoneNum.join(""); 
674                            areaCode = phoneNum.substring(0,3); 
675                            exchangeCode = phoneNum.substring(3,6); 
676                            num = phoneNum.substring(6,10); 
677
678                        var product = ""; 
679                        switch(page) { 
680                            case "consumer-platinum2103": 
681                                product="Platinum Card" 
682                                break; 
683                            case "consumer-edr2112": 
684                                product="Everyday Rewards+" 
685                                break; 
686                            case "secured": 
687                                product="Secured Card" 
688                                break; 
689                            case "business-cash-preferred": 
690                                product="Business Cash Preferred" 
691                                break; 
692                            case "business-real-rewards": 
693                                product="Business Real Rewards Card" 
694                                break; 
695                            case "business-rewards-plus": 
696                                product="Business Rewards PLUS Card" 
697                                break; 
698                            case "premier-visa-signature": 
699                                product="Premier Visa Signature Card" 
700                                break; 
701                            case "business-platinum2103": 
702                                product="Business" 
703                                break; 
704                            case "visa-signature": 
705                                product="Visa Signature Card" 
706                                break;                                     
707                            default:   
708                                product = "All Cards";                           
709                        }                                  
710                             
711                        /* update SiteCatalyst data object */ 
712                        reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
713                        reportingData.location_code = '${rlc!0}'; 
714                        reportingData.product = product; 
715                        reportingData.site_section = 'credit cards'; 
716                        reportingData.platform = 'microsite'; 
717                        reportingData.partner_name = "${partnerName}"; 
718                        reportingData.Banker_id = '${boeid}'; 
719                        reportingData.Banker_code = '${bCode}'; 
720                        reportingData.visitor_type = 'prospect'; 
721                        reportingData.text_to_apply_source = '${text_to_apply_source}'; 
722                        reportingData.page_type = 'product';  
723                        reportingData.campaign_id = '${campaignId}';  
724 
725                             
726                        }); 
727                </script> 
728                                     
729            <#else> 
730                <script> 
731                    console.log("FI Cards Data empty"); 
732                    //location.href = '${url404}'; 
733                </script> 
734            </#if>                   
735        <#else> 
736            <script> 
737                console.log("Fi opt-out"); 
738                //location.href = '${url404}'; 
739            </script> 
740        </#if>        
741    <#else> 
742        <script> 
743            console.log("client profile empty"); 
744            //location.href = '${url404}'; 
745        </script> 
746    </#if>   
747 
748</#if> 
749<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
750<#if (clientdata?size > 0)> 
751    <#assign backgroundColor = clientdata[0].backgroundHexColor>               
752</#if> 
753<script> 
754    // Makes the Header subtitle work if there is two lines of text  
755    var consumerHeader = document.getElementsByClassName("consumer-card")[0]; 
756    if(consumerHeader){ 
757        var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0]; 
758        var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle"); 
759        consumerOfferHeader = consumerOfferHeader[0].getElementsByTagName("p")[0]; 
760        if(consumerOfferHeader.innerText.length >= 31 && consumerOfferHeader.innerText.length < 48){ 
761            //not two lines but the header on tablet gose outside of allocated space. 
762            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 60%, ${backgroundColor!'#173989'} 60%)"; 
763        } else if (consumerOfferHeader.innerText.length >= 48){ 
764            //two lines 
765            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 55%, ${backgroundColor!'#173989'} 55%)"; 
766
767
768 
769    var buisnessHeader = document.getElementsByClassName("business-card")[0];   
770    if(buisnessHeader) { 
771        var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0]; 
772        var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0]; 
773 
774        if(buisnessOfferHeader.innerText.length >= 31 && buisnessOfferHeader.innerText.length < 48){ 
775            //not two lines but the header on tablet gose outside of allocated space. 
776            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 40%, ${backgroundColor!'#173989'} 40%)"; 
777        } else if (buisnessOfferHeader.innerText.length >= 48){ 
778            //two lines 
779            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)"; 
780
781
782     
783</script> 

Hiển thị bài viết tin tức

Có lỗi xảy ra trong quá trình xử lý biểu mẫu.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10154#10192#153411723.
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<#assign prefix = "00000" > 
22<#assign lcWithPrefix = prefix + lc > 
23<#assign withPrefixLength = lcWithPrefix?length > 
24<#assign startHere = withPrefixLength - 5> 
25<#assign lc = lcWithPrefix?substring(startHere)> 
26<#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
27<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
28 
29<#assign clientProfile = clientProfileList?first>  
30<#assign partnerName=clientProfile.getMarketingNameLong()> 
31 
32 
33<div class="content-container" title="${partnerName} - Disclaimer"> 
34    <div class="jn-disclaimer tier3-disclaimer-${class.getData()}"> 
35        ${content.getData()} 
36    </div> 
37</div> 

Hiển thị bài viết tin tức

Có lỗi xảy ra trong quá trình xử lý biểu mẫu.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10154#10192#153411729.
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 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 
28   <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
29   <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
30   <#if clientProfileList?first?has_content> 
31      <#assign clientProfile = clientProfileList?first> 
32      <#assign pbu = clientProfile.getPbu()> 
33      <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
34      <#assign partnerName=clientProfile.getMarketingNameLong()> 
35      <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
36      <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
37      <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
38      <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")> 
39          <#assign partnerUrl = 'https://' + partnerUrl> 
40      </#if> 
41  </#if> 
42<div id="footerIdAdPlatinum"> 
43    ${footerContent.getData()} 
44</div> 
45<#if ameriprise> 
46  <script> 
47          document.querySelector('#footerIdAdPlatinum .copyright').classList.add('ecdma-footer-client-name-copyright'); 
48          document.querySelector('#footerIdAdPlatinum .fdic').innerHTML = '<p><a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?loc=18598" target="_blank">Privacy and Security</a></p>'; 
49  </script> 
50 
51<#else> 
52    <script>                 
53            document.querySelector('#footerIdAdPlatinum .copyright').classList.add('ecdma-footer-client-name-copyright'); 
54            document.querySelector('#footerIdAdPlatinum .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>"; 
55            var newNode = document.createElement("div");  
56            newNode.classList.add("member-agreement"); 
57            newNode.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>'; 
58            var fdicNode = document.querySelector('#footerIdAdPlatinum .fdic'); 
59            var parent = fdicNode.parentNode; 
60            parent.insertBefore(newNode, fdicNode); 
61    </script> 
62    <#if partnerUrl?has_content> 
63        <script> 
64            document.querySelector('#footerIdAdPlatinum .copyright .homelink').innerHTML="<a class='text-color-white' href='${partnerUrl!''}' title='${partnerName!''}' target='_blank'>Home</a>"; 
65        </script> 
66    </#if> 
67  </#if> 
68</#if>