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