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 44, column 6 in 10154#10192#153411711.
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('12t1')> 
38    <#assign tier = '12t1'> 
39<#elseif url?contains('11t1')> 
40    <#assign tier = '11t1'> 
41<#elseif url?contains('11t2')> 
42    <#assign tier = '11t2'> 
43</#if> 
44<#if bankercode?starts_with("amp") && (url?contains("11t1m"))> 
45    <#assign ameriprise = true> 
46<#else> 
47    <#assign ameriprise = false> 
48</#if> 
49<#if ameriprise> 
50    <#assign tier = '11t1m'> 
51</#if> 
52<#assign environment = url?replace('/${tier}.*','','r')> 
53 
54 
55<#if mappedLC?has_content && !ameriprise> 
56    <#assign lc = mappedLC > 
57</#if> 
58 
59<#if lc?has_content> 
60    <#assign prefix = "00000" > 
61    <#assign lcWithPrefix = prefix + lc > 
62    <#assign withPrefixLength = lcWithPrefix?length > 
63    <#assign startHere = withPrefixLength - 5> 
64    <#assign lc = lcWithPrefix?substring(startHere)> 
65    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
66    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
67 
68    <#assign clientProfile = clientProfileList?first> 
69    <#assign partnerName = clientProfile.getMarketingNameLong()> 
70    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
71    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
72      
73    <#assign pbu = clientProfile.getPbu()> 
74    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
75    <script> 
76        console.log('pbu', '${pbu!''}'); 
77        console.log('subbu', '${subbu!''}'); 
78        console.log('url', '${url!''}'); 
79        console.log('environ', '${environment!''}'); 
80        console.log('tier', '${tier!''}'); 
81    </script>       
82    <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
83    <#if (optoutData?size == 0)> 
84        <#if (subbu_special?has_content)> 
85            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
86            <script> 
87                console.log('new subbu', '${subbu_special!''}'); 
88            </script>  
89        <#else> 
90            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
91        </#if> 
92        <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
93        <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
94        <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
95        <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>             
96            <#assign partnerUrl = 'https://' + partnerUrl> 
97        </#if> 
98        <#if (fiCardsData?size > 0)> 
99            <#assign temp = []> 
100            <#assign offerTypeList = []>        
101            <#assign index = 0> 
102            <#list fiCardsData as fib> 
103                <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>  
104                    <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
105                    <#assign temp = temp + fiCardsData[index..index]>  
106                </#if>  
107                <#assign index = index + 1> 
108            </#list>  
109            <#assign fiCardsData = temp> 
110            <#if !(fiCardsData?size > 0)>  
111                <script> 
112                    console.log("empty card/offerType List"); 
113                    //location.href = '${url404}'; 
114                </script> 
115            </#if> 
116            <#if ameriprise> 
117                <#assign lc_used = mappedLC>  
118            <#else> 
119                <#assign lc_used = lc>  
120            </#if>             
121            <div class="content-container content-container-main" title="${partnerName!''}"> 
122                <header class="jn-header"> 
123                    <div class="back-overview hide-desktop">  
124                        <a  href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a> 
125                    </div>   
126                    <div class="header-main-logo" title="${partnerName!''}"> 
127                        <#if partnerUrl?has_content> 
128                            <a href="${partnerUrl!''}" title="${partnerName!''}"> 
129                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}">  
130                            </a> 
131                        <#else> 
132                            <a title="${partnerName!''}"> 
133                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"> 
134                            </a> 
135                        </#if> 
136                    </div> 
137                     
138                    <div class="styled-select slate"> 
139                        <select> 
140                            <#list fiCardsData as fib> 
141                                <#if ameriprise> 
142                                    <#if (fib.offerType=="101")> 
143                                        <#assign productURL="premier-visa-signature"> 
144                                        <#assign productName="Ameriprise Premier Visa Signature"> 
145                                    <#elseif (fib.offerType=="103")>      
146                                        <#assign productURL = "visa-signature"> 
147                                        <#assign productName = "Ameriprise Visa Signature">                              
148                                    </#if> 
149                                <#else> 
150                                    <#if (fib.offerType=="108" || fib.offerType=="109")> 
151                                        <#assign productURL="consumer-platinum2103"> 
152                                        <#assign productName="Platinum Card"> 
153                                    <#elseif (fib.offerType=="104")> 
154                                        <#assign productURL = "max-cash"> 
155                                        <#assign productName = "Max Cash Preferred Card"> 
156                                    <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
157                                        <#assign productURL = "real-rewards"> 
158                                        <#assign productName = "Real Rewards Card"> 
159                                    <#elseif fib.offerType == "115"> 
160                                        <#assign productURL = "secured"> 
161                                        <#assign productName = "Secured Card" > 
162                                    <#elseif fib.offerType == "144"> 
163                                        <#assign productURL = "smart-business-rewards"> 
164                                        <#assign productName = "Smart Business Rewards Card" >                                             
165                                    <#elseif fib.offerType == "128"> 
166                                        <#assign productURL = "business-cashback"> 
167                                        <#assign productName = "Business Cash Card" > 
168                                    <#elseif fib.offerType == "143"> 
169                                        <#assign productURL = "business-real-rewards"> 
170                                        <#assign productName = "Business Real Rewards Card" > 
171                                    <#elseif fib.offerType == "121"> 
172                                        <#assign productURL = "business-platinum2103"> 
173                                        <#assign productName = "Business Card" > 
174                                    </#if> 
175                                </#if> 
176                                <#if url?matches(".*/${productURL}.*")> 
177                                    <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" selected="selected">${productName}</option>                                             
178                                <#else> 
179                                    <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">${productName}</option> 
180                                </#if> 
181                            </#list> 
182                        </select> 
183                        <div class="styled-select__dropdown"> 
184                            <div class="back-overview hide-mobile">  
185                                <a  href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a> 
186                            </div>   
187                            <div class="dropdown-select"> 
188                                <span class="selected-option"></span>  
189                                <div class="jn-arrow arrow arrow-right"></div> 
190                            </div> 
191                        </div> 
192                        <div class="jn-hamburger hamburger"> 
193                            <div class="first-line transform transformed1"></div> 
194                            <div></div> 
195                            <div class="transform transformed2"></div> 
196                            <div></div> 
197                        </div> 
198                        <ul> 
199                            <#list fiCardsData as fib> 
200                                <#if ameriprise> 
201                                    <#if (fib.offerType=="101")> 
202                                        <#assign productURL="premier-visa-signature"> 
203                                        <#assign productName="Ameriprise Premier Visa Signature"> 
204                                    <#elseif (fib.offerType=="103")>      
205                                        <#assign productURL = "visa-signature"> 
206                                        <#assign productName = "Ameriprise Visa Signature">                              
207                                    </#if> 
208                                <#else> 
209                                    <#if (fib.offerType=="108" || fib.offerType=="109")> 
210                                        <#assign productURL="consumer-platinum2103"> 
211                                        <#assign productName="Platinum Card"> 
212                                    <#elseif (fib.offerType=="104")> 
213                                        <#assign productURL = "max-cash"> 
214                                        <#assign productName = "Max Cash Preferred Card"> 
215                                    <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
216                                        <#assign productURL = "real-rewards"> 
217                                        <#assign productName = "Real Rewards Card"> 
218                                    <#elseif fib.offerType == "115"> 
219                                        <#assign productURL = "secured"> 
220                                        <#assign productName = "Secured Card" > 
221                                    <#elseif fib.offerType == "144"> 
222                                        <#assign productURL = "smart-business-rewards"> 
223                                        <#assign productName = "Smart Business Rewards Card" >                                             
224                                    <#elseif fib.offerType == "128"> 
225                                        <#assign productURL = "business-cashback"> 
226                                        <#assign productName = "Business Cash Card" > 
227                                    <#elseif fib.offerType == "143"> 
228                                        <#assign productURL = "business-real-rewards"> 
229                                        <#assign productName = "Business Real Rewards Card" > 
230                                    <#elseif fib.offerType == "121"> 
231                                        <#assign productURL = "business-platinum2103"> 
232                                        <#assign productName = "Business Card" > 
233                                    </#if> 
234                                </#if> 
235                                <#if url?matches(".*/${productURL}.*")> 
236                                    <li class="selected" data-value="${productName}"><a href="javascript:void(0)">${productName}</a></li>  
237                                <#else> 
238                                    <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li> 
239                                </#if> 
240                            </#list> 
241                        </ul> 
242                    </div> 
243                </header> 
244            </div>  
245            <script> 
246                var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
247                var partnerName = "${partnerName!0}"; 
248                var metaDesc = ""; 
249                switch (page) { 
250                    case "consumer-platinum2103": 
251                        document.title = "The purchasing power of Zero | "+partnerName+" Platinum Card"; 
252                        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."; 
253                        break; 
254                    case "max-cash": 
255                        document.title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card"; 
256                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select"; 
257                        break; 
258                    case "real-rewards": 
259                        document.title = "Sign up and earn bonus points | "+partnerName+" Real Rewards Card"; 
260                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
261                        break; 
262                    case "secured": 
263                        document.title = "Strengthen your finances | "+partnerName+" Secured Card"; 
264                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
265                        break; 
266                    case "smart-business-rewards": 
267                        document.title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card"; 
268                        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."; 
269                        break; 
270                    case "business-cashback": 
271                        document.title = "Flexible rewards for your business | "+partnerName+" Business Cash Card"; 
272                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
273                        break; 
274                    case "business-real-rewards": 
275                        document.title = "Earn up to 3X points with no caps | "+partnerName+" Business Real Rewards Card"; 
276                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ; 
277                        break; 
278                    case "business-platinum2103": 
279                        document.title = "Pay down your other credit card balances faster | "+partnerName+" Business Card"; 
280                        metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
281                        break; 
282                    case "premier-visa-signature": 
283                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Premier Visa Signature® Card"; 
284                        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."; 
285                        break; 
286                    case "visa-signature": 
287                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Visa Signature® Card"; 
288                        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."; 
289                        break;                                                                                                 
290
291                if (metaDesc.length > 0) { 
292                    var m = document.createElement('meta');  
293                    m.name = 'description';  
294                    m.content = metaDesc;  
295                    document.head.appendChild(m); 
296
297 
298                document.addEventListener('DOMContentLoaded', function() { 
299                    var pageSelected = $('.selected').attr('data-value'); 
300                    $('.jn-hamburger, .dropdown-select').click(function () { 
301                        $('.styled-select').toggleClass('show-select'); 
302                    }); 
303                    $('.selected-option').text(pageSelected); 
304                }); 
305            </script> 
306         
307        <#else> 
308            <script> 
309                console.log("FI Cards Data empty"); 
310                location.href = '${url404}'; 
311            </script> 
312        </#if>   
313    <#else> 
314        <script> 
315            console.log("FI opt out"); 
316            //location.href = '${url404}'; 
317        </script> 
318    </#if>  
319<#else> 
320    <script> 
321        console.log("location code empty"); 
322        //location.href = '${url404}'; 
323    </script> 
324</#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#154098141.
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                        <div class="hero-container ${pageClass} ${productClass!''}" title="${rollover_text!''}"> 
264                            <div class="hero-main"> 
265                                 
266                                <div class="hero-main-container"> 
267                                    <div class="hero-main-offer"> 
268                                        <div class="offer-header"> 
269                                            <div class="offer-text-top"> 
270                                                <div class="offer-title"> 
271                                                    ${primaryHeadlineText.getData()} 
272                                                </div> 
273                                                <div class="offer-subtitle"> 
274                                                    ${primaryHeadlineFeature.getData()} 
275                                                </div> 
276                                            </div> 
277                                            <div class="offer-text-bottom hide-mobile"> 
278                                                <div class="offer-detail-text text-color-default "> 
279                                                    ${primaryHeadlineFeatureTop.getData()} 
280                                                    ${primaryHeadlineFeatureBottom.getData()} 
281                                                    <#-- allow for all except these url --> 
282                                                    <#if (!url?contains("business-real-rewards") && !url?contains("max-cash") && !url?contains("consumer-edr2112") && !url?contains("college-real-rewards") && !url?contains("business-cash-preferred"))> 
283                                                        <br> 
284                                                        <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"  class="text-color-default" target="_blank">See terms & conditions</a> 
285                                                    </#if> 
286                                                </div> 
287                                                <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>                                                      
288                                                <#if ( 
289                                                    url?contains("smart-business-rewards") || 
290                                                    url?contains("business-real-rewards") || 
291                                                    url?contains("max-cash")  ||    
292                                                    url?contains("business-cash-preferred") ||                                                
293                                                    url?contains("consumer-edr2112") 
294
295
296                                                    <#-- Make link not show for max cash secured and show only on max cash--> 
297                                                    <#if !url?contains("max-cash-secured")> 
298                                                        <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> 
299                                                    </#if>                                                    
300                                                </#if>                                
301 
302                                            </div> 
303                                        </div> 
304                                        <div class="offer-detail"> 
305                                            <div class="offer-detail-cardArt cardArtImg"> 
306                                                  <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
307                                                    <p>${card_text!''}</p> 
308                                            </div> 
309                                            <div class="offer-detail-text text-color-default hide-desktop"> 
310                                                ${primaryHeadlineFeatureTop.getData()} 
311                                                ${primaryHeadlineFeatureBottom.getData()} 
312                                            </div> 
313                                            <#if (fiCardsData?size > 0)>  
314                                                 
315                                                <form class="form1 hide-desktop" action='${oadURL}?locationCode=${lc_used}&offerId=${newOfferId}&preparerType=customer&sourceCode=${newSourceCode}' method="post" id="BAAForm"> 
316                                                    <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
317                                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
318                                                    <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 /> 
319                                                </form> 
320                                            <#else> 
321                                                <form class="form2 hide-desktop" action='${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=customer&sourceCode=${sourceCode}' method="post" id="BAAForm"> 
322                                                    <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
323                                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
324                                                    <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 /> 
325                                                </form> 
326                                            </#if> 
327                                        </div> 
328                                    </div> 
329                                </div> 
330                            </div> 
331                            <div class="hero-primary-benefits"> 
332                                <#if secondaryFeatureText.getData() != ""> 
333                                    <#foreach item in secondaryFeatureText.getSiblings()> 
334                                        <div class="primary-benefit"> 
335                                            <div class="primary-benefit-wrapper text-color-white"> 
336                                                ${item.getData()} 
337                                            </div> 
338                                        </div> 
339                                    </#foreach> 
340                                </#if> 
341                            </div> 
342                        </div> 
343                        <div class="standard-content-container" title="${rollover_text!''}"> 
344                            <div class="product-details-container"> 
345                                <div class="detail-background"> 
346                                    <h2>${secondaryHeadlineText.getData()}</h2> 
347                                    <div class="secondary-benefits"> 
348                                        <div class="option"> 
349                                            ${additionalInfoGroupA.getData()} 
350                                            <#if pbu != "0892445">                                              
351                                                <div> 
352                                                    <#if (fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "115" || fib.offerType == "147" || fib.offerType == "101" || fib.offerType =="128") > 
353                                                    <#-- Dont show scrapped data--> 
354                                                    <#else> 
355                                                        <#if (fib.offerType == "104") > 
356                                                            <#list sdata as d> 
357                                                                <#if (d.scrapedLabel?contains("APR for Balance Transfers") && (d.scrapedValue?has_content))>            
358                                                                    <h3 >APR<sup>*</sup> for Purchases:</h3> 
359                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"  class="text-color-default" target="_blank">Terms & Conditions</a> 
360                                                                            </p> 
361                                                                        <#break> 
362                                                                </#if> 
363                                                            </#list>                                                       
364                                                        <#else> 
365 
366                                                            <#if (fib.offerType == "115" || fib.offerType == "123" || fib.offerType == "144")> 
367                                                                <h3>APR for Purchases and Balance Transfers</h3>                                                        
368                                                            <#elseif (fib.offerType=="141")> 
369                                                                <h3>Annual Fee</h3><br/> 
370                                                            <#else> 
371                                                                <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3> 
372                                                            </#if> 
373                                                            <#list sdata as d> 
374                                                                <#if (fib.offerType=="128" || fib.offerType=="141")> 
375                                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
376                                                                        <#if (fiCardsData?size > 0)>  
377                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
378                                                                                    class="text-color-default" target="_blank">Terms & Conditions</a> 
379                                                                            </p> 
380                                                                                     
381                                                                        <#else> 
382                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
383                                                                                        class="text-color-default" target="_blank">Terms & Conditions</a> 
384                                                                            </p> 
385                                                                        </#if> 
386                                                                        <#break> 
387                                                                    </#if> 
388 
389                                                                <#else> 
390                                                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
391                                                                                 
392                                                                        <#if (fiCardsData?size > 0)>      
393                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
394                                                                            </p> 
395                                                                        <#else> 
396                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"  class="text-color-default" target="_blank">Terms & Conditions</a> 
397                                                                            </p> 
398                                                                        </#if> 
399                                                                        <#break> 
400                                                                    </#if> 
401                                                                </#if> 
402                                                            </#list> 
403 
404                                                        </#if> 
405                                                    </#if> 
406                                                </div>                                             
407                                            </#if> 
408                                        </div> 
409                                        <div class="option"> 
410                                            ${additionalInfoGroupB.getData()}  
411                                            <#if pbu != "0892445" && fib.offerType != "147"> 
412                                                <div> 
413                                                    <#if (fiCardsData?size > 0)>                                           
414                                                            <#if (fib.offerType=="128")> 
415                                                                <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3> 
416                                                            <#elseif fib.offerType=="104" || fib.offerType=="141"> 
417                                                                <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3> 
418 
419                                                            <#else> 
420                                                                <#if (fib.offerType=="144" || fib.offerType=="143" || fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "115")> 
421                                                                <h3>Annual Fee</h3> 
422                                                                <#else> 
423                                                                    <h3>Annual Fee<sup>*</sup></h3> 
424                                                                </#if> 
425                                                            </#if> 
426                                                            <#list sdata as d> 
427                                                                <#if (fib.offerType=="128")> 
428                                                                    <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
429                                                                         
430                                                                        <#if (fiCardsData?size > 0)>   
431                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
432                                                                                class="text-color-default" target="_blank">Terms & Conditions</a> 
433                                                                            </p> 
434                                                                        <#else> 
435                                                                            <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" 
436                                                                                class="text-color-default" target="_blank">Terms & Conditions</a> 
437                                                                            </p> 
438                                                                        </#if> 
439                                                                        <#break> 
440                                                                    </#if> 
441                                                                <#else> 
442                                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
443                                                                         
444                                                                        <#if (fiCardsData?size > 0)>  
445                                                                        <p> 
446                                                                            <#if (fib.offerType == "123")> 
447                                                                            Annual Fee: ${d.scrapedValue} 
448                                                                            <#else> 
449                                                                            ${d.scrapedValue}  
450                                                                            </#if> 
451                                                                            <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
452                                                                        </p> 
453                                                                        <#else> 
454                                                                        <p> 
455                                                                            <#if (fib.offerType == "123")> 
456                                                                            Annual Fee: ${d.scrapedValue} 
457                                                                            <#else> 
458                                                                            ${d.scrapedValue}  
459                                                                            </#if> 
460                                                                            <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" class="text-color-default" target="_blank">Terms & Conditions</a> 
461                                                                        </p> 
462                                                                        </#if> 
463                                                                        <#break> 
464                                                                    </#if> 
465                                                                </#if> 
466                                                            </#list>                                                       
467                                                    </#if> 
468                                                </div> 
469                                            </#if> 
470                                        </div> 
471                                        <#if (additionalInfoGroupC?has_content)> 
472                                        <div class="option">   
473 
474                                            ${additionalInfoGroupC.getData()}  
475                                            <#list sdata as d> 
476                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
477                                                    <#if (fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "101" || fib.offerType == "103" || fib.offerType=="147")> 
478                                                        <h3>Intro APR<sup>*</sup> for Purchases and Balance Transfers:</h3>  
479                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
480                                                            </p> 
481                                                    </#if> 
482                                                    <#if (fib.offerType=="147" || fib.offerType=="115")> 
483                                                        <h3>APR for Purchases and Balance Transfers:</h3>  
484                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">Terms & Conditions</a> 
485                                                            </p> 
486                                                    </#if>  
487                                                </#if>  
488                                            </#list> 
489                                            <#if (fib.offerType=="104" || fib.offerType=="128" || fib.offerType=="147")> 
490                                                <h3>Annual Fee<sup>*</sup></h3> 
491                                                <#list sdata as d>                                                    
492                                                    <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
493                                                         
494                                                        <#if (fiCardsData?size > 0)>  
495                                                        <p> 
496                                                            <#if (fib.offerType == "123")> 
497                                                            Annual Fee: ${d.scrapedValue} 
498                                                            <#else> 
499                                                            ${d.scrapedValue}  
500                                                            </#if> 
501                                                            <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
502                                                        </p> 
503                                                        <#else> 
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}" class="text-color-default" target="_blank">Terms & Conditions</a> 
511                                                        </p> 
512                                                        </#if> 
513                                                        <#break> 
514                                                    </#if> 
515                                                 
516                                                </#list> 
517                                            </#if>                         
518                                        </div>   
519                                    </#if>                                          
520                                </div> 
521                                </div> 
522                            </div> 
523                        </div> 
524                        <div class="banner-wrapper" title="${rollover_text!''}"> 
525                            <div class="banner ${override}"> 
526                                <div class="banner-cardArt cardArtImg"> 
527                                   <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">  
528                                </div> 
529                                <div class="banner-cta"> 
530                                    <div class="banner-cta-text text-color-white text-bold"> 
531                                        ${optionalCtaFeatureText.getData()}                                    
532                                    </div> 
533                                    <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> 
534                                </div> 
535                            </div> 
536                        </div> 
537                    <#break /> 
538                    </#if> 
539                </#list>                         
540 
541                <script> 
542                        var reportingData = window.reportingData || {}; 
543                    document.addEventListener('DOMContentLoaded', function() { 
544                        //console.log('inside ready'); 
545                        var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
546                        var hostName = location.hostname; 
547                     
548                        function getDomainFromHostname(hostname) { 
549                            var parts = hostname.split('.'); 
550                            return parts.length === 3 ? parts[1] : parts[0]; 
551
552                        var domain = getDomainFromHostname(hostName); 
553                        var partnerName = "${partnerName!''}"; 
554 
555                        var ameriprise = '${ameriprise?string("yes", "no")}'; 
556                        var locationCode = "${rlc!lc}"; 
557                        var eidAmp = ""; 
558                        if (ameriprise == "yes") { 
559                            var bankercode_amp = '${bCode}'; 
560                            eidAmp = bankercode_amp.substring(3); 
561                            locationCode =""; 
562                        }    
563                             
564                        var heroCardImgs = document.querySelectorAll('.cardArtImg img'); 
565                        for (var index = 0; index < heroCardImgs.length; index++) { 
566                            var heroCardImg = heroCardImgs[index]; 
567                            var heroCardSrc = heroCardImg.getAttribute("src"); 
568                            if(heroCardSrc != "") { 
569                                resizeImg(heroCardImg); 
570
571
572                        function resizeImg(img) { 
573                            img.addEventListener("load", function() { 
574                                var cardImgWidth = img.width; 
575                                var cardImgHeight = img.height; 
576                                //console.log('width', cardImgWidth); 
577                                //console.log('height', cardImgHeight); 
578                                if(cardImgWidth > cardImgHeight) { 
579                                    img.style.width = "285px"; 
580                                } else { 
581                                    img.style.width = "150px"; 
582
583                            }); 
584
585                         
586                         
587                        $('.jn-button').removeAttr('disabled'); 
588                        $('.jn-button').removeClass('jn-disabled'); 
589                        jQuery('#oadSecButton, #oadSecButton-top').on('click', function(e) { 
590                            jQuery('#BAAForm').submit(); 
591                        }); 
592                         
593                        jQuery('#BAAForm').on('submit', function(e){ 
594                            e.preventDefault(); 
595                            //console.log('in custom submit'); 
596                            var xmlData; 
597                            if(ameriprise == "yes") { 
598                                xmlData = '<?xml version="1.0"?>'+ 
599                                    "<prefillData>"+  
600                                    "<versionNumber>1.0</versionNumber>"+  
601                                    "<applicationData>"+  
602                                    "<referral>" +  
603                                    "<employeeId>" + eidAmp + "</employeeId>" + 
604                                    "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
605                                    "<divisionNumber></divisionNumber>"+ 
606                                    "</referral>" +  
607                                    "<bankerInformation>"+  
608                                    "<locationCode>" + locationCode + "</locationCode>"+ 
609                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
610                                    "<employeeID>${boeid!0}</employeeID>"+ 
611                                    "<name>" + 
612                                    "<first>${bFName!'0'}</first>" + 
613                                    "<last>${bLName!'0'}</last>" + 
614                                    "</name>"+ 
615                                    "<phone>"+ 
616                                    "<areaCode>"+areaCode+"</areaCode>"+  
617                                    "<exchange>"+exchangeCode+"</exchange>"+ 
618                                    "<number>"+num+"</number>"+  
619                                    "</phone>"+  
620                                    "</bankerInformation>"+  
621                                    "</applicationData>"+  
622                                    "</prefillData>" 
623                            } else { 
624                                xmlData = '<?xml version="1.0"?>'+ 
625                                    "<prefillData>"+  
626                                    "<versionNumber>1.0</versionNumber>"+  
627                                    "<applicationData>"+  
628                                    "<bankerInformation>"+  
629                                    "<locationCode>" + locationCode + "</locationCode>"+ 
630                                    "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
631                                    "<employeeID>${boeid!0}</employeeID>"+ 
632                                    "<name>" + 
633                                    "<first>${bFName!'0'}</first>" + 
634                                    "<last>${bLName!'0'}</last>" + 
635                                    "</name>"+ 
636                                    "<phone>"+ 
637                                    "<areaCode>"+areaCode+"</areaCode>"+  
638                                    "<exchange>"+exchangeCode+"</exchange>"+ 
639                                    "<number>"+num+"</number>"+  
640                                    "</phone>"+  
641                                    "</bankerInformation>"+  
642                                    "</applicationData>"+  
643                                    "</prefillData>" 
644                            }                                 
645                            jQuery('#appDataBAA').val(xmlData); 
646                            var buttonName = jQuery('.jn-button').data('button-name'); 
647                            /* SiteCatalyst  onClick tracking */ 
648                            reportingData.apply_button = buttonName; 
649                            AUI().ready(function() { 
650                                if (window.publisherFW) { 
651                                    window.publisherFW.publishEvent("onClick", reportingData); 
652
653                            }); 
654 
655                            this.submit(); 
656                        }); 
657                        var regex = /\d+/g; 
658                        var bdNumber = "${bPhone!''}"; 
659                        var phoneNum = bdNumber.match(regex); 
660                        var areaCode = ""; 
661                        var exchangeCode = ""; 
662                        var num = ""; 
663                        if(phoneNum != null) { 
664                            phoneNum = phoneNum.join(""); 
665                            areaCode = phoneNum.substring(0,3); 
666                            exchangeCode = phoneNum.substring(3,6); 
667                            num = phoneNum.substring(6,10); 
668
669                        var product = ""; 
670                        switch(page) { 
671                            case "consumer-platinum2103": 
672                                product="Platinum Card" 
673                                break; 
674                            case "consumer-edr2112": 
675                                product="Everyday Rewards+" 
676                                break; 
677                            case "secured": 
678                                product="Secured Card" 
679                                break; 
680                            case "business-cash-preferred": 
681                                product="Business Cash Preferred" 
682                                break; 
683                            case "business-real-rewards": 
684                                product="Business Real Rewards Card" 
685                                break; 
686                            case "business-rewards-plus": 
687                                product="Business Rewards PLUS Card" 
688                                break; 
689                            case "premier-visa-signature": 
690                                product="Premier Visa Signature Card" 
691                                break; 
692                            case "business-platinum2103": 
693                                product="Business" 
694                                break; 
695                            case "visa-signature": 
696                                product="Visa Signature Card" 
697                                break;                                     
698                            default:   
699                                product = "All Cards";                           
700                        }                                  
701                             
702                        /* update SiteCatalyst data object */ 
703                        reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
704                        reportingData.location_code = '${rlc!0}'; 
705                        reportingData.product = product; 
706                        reportingData.site_section = 'credit cards'; 
707                        reportingData.platform = 'microsite'; 
708                        reportingData.partner_name = "${partnerName}"; 
709                        reportingData.Banker_id = '${boeid}'; 
710                        reportingData.Banker_code = '${bCode}'; 
711                        reportingData.visitor_type = 'prospect'; 
712                        reportingData.text_to_apply_source = '${text_to_apply_source}'; 
713                        reportingData.page_type = 'product';  
714                        reportingData.campaign_id = '${campaignId}';  
715 
716                             
717                        }); 
718                </script> 
719                                     
720            <#else> 
721                <script> 
722                    console.log("FI Cards Data empty"); 
723                    //location.href = '${url404}'; 
724                </script> 
725            </#if>                   
726        <#else> 
727            <script> 
728                console.log("Fi opt-out"); 
729                //location.href = '${url404}'; 
730            </script> 
731        </#if>        
732    <#else> 
733        <script> 
734            console.log("client profile empty"); 
735            //location.href = '${url404}'; 
736        </script> 
737    </#if>   
738 
739</#if> 
740<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
741<#if (clientdata?size > 0)> 
742    <#assign backgroundColor = clientdata[0].backgroundHexColor>               
743</#if> 
744<script> 
745    // Makes the Header subtitle work if there is two lines of text  
746    var consumerHeader = document.getElementsByClassName("consumer-card")[0]; 
747    if(consumerHeader){ 
748        var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0]; 
749        var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle"); 
750        consumerOfferHeader = consumerOfferHeader[0].getElementsByTagName("p")[0]; 
751        if(consumerOfferHeader.innerText.length >= 31 && consumerOfferHeader.innerText.length < 48){ 
752            //not two lines but the header on tablet gose outside of allocated space. 
753            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 60%, ${backgroundColor!'#173989'} 60%)"; 
754        } else if (consumerOfferHeader.innerText.length >= 48){ 
755            //two lines 
756            consumerHeroContainer.style.background = "linear-gradient(0deg, #f8f8f8 55%, ${backgroundColor!'#173989'} 55%)"; 
757
758
759 
760    var buisnessHeader = document.getElementsByClassName("business-card")[0];   
761    if(buisnessHeader) { 
762        var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0]; 
763        var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0]; 
764 
765        if(buisnessOfferHeader.innerText.length >= 31 && buisnessOfferHeader.innerText.length < 48){ 
766            //not two lines but the header on tablet gose outside of allocated space. 
767            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 40%, ${backgroundColor!'#173989'} 40%)"; 
768        } else if (buisnessOfferHeader.innerText.length >= 48){ 
769            //two lines 
770            buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)"; 
771
772
773     
774</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>