웹 내용 전시

웹 내용 전시

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

웹 내용 전시

템플렛을 가공하고 있는 동안 과실은 일어났다.
Expression bCode is undefined on line 58, column 6 in 10153#10191#6523909.
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                                                <#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}&amp;offerId=${newOfferId}&amp;preparerType=customer&amp;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}&amp;offerId=${offerId}&amp;preparerType=customer&amp;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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
394                                                                            </p> 
395                                                                        <#else> 
396                                                                            <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> 
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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${fib.offerId}&amp;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&amp;offerId=${fib.offerId}&amp;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&amp;offerId=${newOfferId}&amp;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&amp;offerId=${newOfferId}&amp;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> 

웹 내용 전시

템플렛을 가공하고 있는 동안 과실은 일어났다.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10153#10191#5843831.
1<#assign url = request.attributes.CURRENT_URL > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
4 
5<#assign bCode= qstringmap["bankercode"]?first> 
6<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
7<#list bData as b>      
8    <#assign lc = b.locationcode > 
9    <#assign rLC = b.reallocationcode > 
10    <#assign mappedLC = b.mappedLocationCode > 
11</#list>  
12<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
13    <#assign ameriprise = true> 
14<#else> 
15    <#assign ameriprise = false> 
16</#if> 
17<#if mappedLC?has_content && !ameriprise> 
18    <#assign lc = mappedLC > 
19</#if> 
20 
21<#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> 

웹 내용 전시

템플렛을 가공하고 있는 동안 과실은 일어났다.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10153#10191#5843837.
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>