Webcontent weergeven

Webcontent weergeven

Er trad een fout op tijdens de verwerking van het sjabloon.
Expression qstringmap["bankercode"] is undefined on line 8, column 17 in 10154#10192#153411750.
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 utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
5<#assign url404 = '/error/404.html'> 
6 
7 
8<#assign bCode= qstringmap["bankercode"]?first> 
9<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
10<#list bData as b>      
11    <#assign lc = b.locationcode > 
12    <#assign rLC = b.reallocationcode > 
13    <#assign mappedLC = b.mappedLocationCode > 
14</#list>  
15<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
16    <#assign ameriprise = true> 
17<#else> 
18    <#assign ameriprise = false> 
19</#if> 
20 
21<#if mappedLC?has_content && !ameriprise> 
22    <#assign lc = mappedLC > 
23</#if> 
24 
25<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bCode)> 
26<#if fiData?first?has_content> 
27    <#assign fi = fiData?first> 
28    <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
29        <#assign subbu_special = fi.offerId> 
30    </#if> 
31</#if> 
32 
33 
34<#if lc?has_content> 
35    <#assign prefix = "00000" > 
36    <#assign lcWithPrefix = prefix + lc> 
37    <#assign withPrefixLength = lcWithPrefix?length > 
38    <#assign startHere = withPrefixLength - 5> 
39    <#assign lc = lcWithPrefix?substring(startHere)>     
40    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
41    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
42 
43    <#assign clientProfile = clientProfileList?first> 
44    <#assign partnerName = clientProfile.getMarketingNameLong()> 
45    <#assign pbu = clientProfile.getPbu()> 
46    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>     
47    <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
48    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
49    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
50    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")>             
51        <#assign partnerUrl = 'https://' + partnerUrl> 
52    </#if> 
53 
54    <!-- <#assign clientdataList = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
55    <#if clientdataList?has_content > 
56    	<#assign clientdata = clientdataList?first > 
57		<#assign backgroundHexColor = clientdata["backgroundHexColor"] > 
58		<#assign backgroundImage = clientdata["backgroundImage"] > 
59		<#assign buttonHexColor = clientdata["buttonHexColor"] > 
60		<#assign AprMin = clientdata["AprMin"] > 
61		<#assign AprMax = clientdata["AprMax"] > 
62		<#assign cashAdvanceRate = clientdata["cashAdvanceRate"] > 
63		<#assign BillingCycles = clientdata["BillingCycles"] > 
64		<#assign textHexColor = clientdata["textHexColor"] > 
65		<#assign linkHexColor = clientdata["linkHexColor"] > 
66		<#assign hoverColor = clientdata["hoverColor"] > 
67		<#assign secondaryBackgroundImage = clientdata["secondaryBackgroundImage"] > 
68		<#assign transparency = clientdata["transparency"] > 
69		<#assign businessBackgroundImageLarge = clientdata["businessBackgroundImageLarge"] > 
70		<#assign businessBackgroundImageSmall = clientdata["businessBackgroundImageSmall"] > 
71		<#assign businessTransparency = clientdata["businessTransparency"] > 
72		<#assign dmaBackgroundImage = clientdata["dmaBackgroundImage"] > 
73		<#assign secondaryDmaBackgroundImage = clientdata["secondaryDmaBackgroundImage"] > 
74	</#if> --> 
75	 
76    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
77    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
78        <script> 
79        console.log('logo url', '${cdnLogoUrl}${logoFileName}'); 
80    </script> 
81    <#if pbu == "0864054"> 
82        <#assign override = "berkshire"> 
83    <#else> 
84        <#assign override = " "> 
85    </#if> 
86    <#--  this one should be delete for prod  --> 
87                 
88    <#-- <#assign cdnLogoUrl = "https://4f61efb10f32ceb57895-3733e103896f37259213d6ad72acbe68.ssl.cf2.rackcdn.com">   
89    <#assign logoFileName = pbu + "-" + subbu + ".png">--> 
90 
91    <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
92    <#if (subbu_special?has_content)> 
93        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
94        <script> 
95            console.log('new subbu', '${subbu_special!''}'); 
96        </script>  
97    <#else> 
98        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
99    </#if> 
100    <#assign temp = []> 
101    <#assign consumerCards = []> 
102    <#assign businessCards = []>  
103    <#assign offerTypeList = []>       
104    <#assign index = 0> 
105    <#assign ameriprise_cards= []> 
106    <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']> 
107    <#assign businessOfferTypes =['144', '128', '143', '121', '123']> 
108    <#list fiCardsData as fib> 
109        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
110            <#assign offerTypeList = offerTypeList + [fib.offerType]> 
111            <#assign temp = temp + fiCardsData[index..index]>    
112            <#if ameriprise> 
113                <#if (fib.offerType == "101" || fib.offerType == "103")> 
114                    <#assign ameriprise_cards= ameriprise_cards + fiCardsData[index..index]> 
115                </#if>                      
116            <#else> 
117                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
118                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
119                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
120                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
121                </#if>             
122            </#if>                 
123        </#if>  
124        <#assign index = index + 1>   
125                     
126    </#list>        
127    <#assign fiCardsData = temp> 
128    <#if ameriprise> 
129        <#assign consumerCards = ameriprise_cards?sort_by("offerType")> 
130    </#if> 
131 
132    <#if (fiCardsData?size > 0)>   
133        <#if (subbu_special?has_content)> 
134            <#assign lc_used = fiCardsData?first.WebLocationCode>   
135        <#else> 
136            <#if ameriprise> 
137                <#assign lc_used = mappedLC>  
138            <#else> 
139                <#assign lc_used = lc>  
140            </#if> 
141        </#if>               
142        <#assign offerId = ""> 
143        <#assign sourceCode = ""> 
144        <#assign cardArtImage = ""> 
145        <#assign productUrl = ""> 
146        <#assign product = ""> 
147        <#assign preparerType = "customer"> 
148        <#assign apr = ""> 
149        <#assign cardIndex = 0>   
150        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
151            <#if (offerTypeList?seq_contains("108")) || (offerTypeList?seq_contains("109")) > 
152                <#list consumerCards as card> 
153                    <#if (card.offerType=="101") > 
154                        <#assign offerId = card.offerId> 
155                        <#assign sourceCode = card.sourceCode> 
156                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
157                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
158 
159                        <#assign productUrl="consumer-edr2112"> 
160                        <#assign product="Everyday Rewards+"> 
161                        <#assign cardIndex = 4> 
162 
163                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
164                        <#if (scrapedData?size > 0)> 
165                            <#list scrapedData as sItem> 
166                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
167                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
168                                    <#break> 
169                                </#if> 
170                            </#list> 
171                            <script> 
172                                $(document).ready(function () { 
173                                    var aprText = "${apr}"; 
174                                    if (aprText) { 
175                                        try { 
176                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
177                                            var billing_cycle = matches[1]; 
178                                            var apr_min = apr_min = matches[2]; 
179                                            var apr_max = apr_max = matches[3]; 
180                                            if (billing_cycle) { 
181                                                $(".scraped-billing-cycle").html(billing_cycle); 
182
183                                            if (apr_min) { 
184                                                $(".scraped-apr-min").html(apr_min); 
185
186                                            if (apr_max) { 
187                                                $('.scraped-apr-max').html(apr_max); 
188
189 
190                                        } catch (e) { 
191                                            console.log(e); 
192
193
194                                }); 
195                            </script> 
196                        </#if>  
197                    </#if> 
198                </#list> 
199            <#else> 
200                <#assign displayedCard = consumerCards[0]> 
201                <script> 
202                    console.log('dispalyed card:','${displayedCard.offerType}'); 
203                </script> 
204                <#assign offerId = displayedCard.offerId> 
205                <#assign sourceCode = displayedCard.sourceCode> 
206                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
207                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
208                <#if ameriprise> 
209                    <#if (displayedCard.offerType == "101")> 
210                        <#assign productUrl="ameriprise-premier-visa-signature"> 
211                        <#assign product="Premier Visa Signature"> 
212                        <#assign cardIndex = 0> 
213                    <#elseif (displayedCard.offerType == "103")> 
214                        <#assign productUrl = "ameriprise-visa-signature"> 
215                        <#assign product="Visa Signature"> 
216                        <#assign cardIndex = 1> 
217                    </#if> 
218                <#else> 
219                        <#if (displayedCard.offerType == "101" || displayedCard.offerType == "103")> 
220                            <#assign productUrl="consumer-edr2112"> 
221                            <#assign product="Everyday Rewards+"> 
222                            <#assign cardIndex = 4>                           
223                        <#elseif (displayedCard.offerType == "108" || displayedCard.offerType == "109")> 
224                            <#assign productUrl = "consumer-platinum2103"> 
225                            <#assign product="Platinum">    
226                            <#assign cardIndex = 1>    
227                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
228                            <#if (scrapedData?size > 0)> 
229                                <#list scrapedData as sItem> 
230                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
231                                        <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
232                                        <#break> 
233                                    </#if> 
234                                </#list> 
235                                <script> 
236                                    $(document).ready(function () { 
237                                        var aprText = "${apr}"; 
238                                        if (aprText) { 
239                                            try { 
240                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
241                                                var billing_cycle = matches[1]; 
242                                                var apr_min = apr_min = matches[2]; 
243                                                var apr_max = apr_max = matches[3]; 
244                                                if (billing_cycle) { 
245                                                    $(".scraped-billing-cycle").html(billing_cycle); 
246
247                                                if (apr_min) { 
248                                                    $(".scraped-apr-min").html(apr_min); 
249
250                                                if (apr_max) { 
251                                                    $('.scraped-apr-max').html(apr_max); 
252
253 
254                                            } catch (e) { 
255                                                console.log(e); 
256
257
258                                    }); 
259                                </script> 
260                            </#if>                                                     
261                        <#elseif (displayedCard.offerType == "115")> 
262                            <#assign productUrl = "secured"> 
263                            <#assign product="Secured"> 
264                            <#assign cardIndex = 3> 
265                        </#if> 
266                </#if> 
267            </#if> 
268        </#if> 
269        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
270            <#if (offerTypeList?seq_contains("128")) > 
271                <#list businessCards as card> 
272                    <#if (card.offerType=="128")> 
273                        <#assign offerId = card.offerId> 
274                        <#assign sourceCode = card.sourceCode> 
275                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
276                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
277                        <#assign productUrl = "business-cash-preferred"> 
278                        <#assign product="Business Cash Preferred">                 
279                        <#assign cardIndex = 0> 
280                    </#if> 
281                </#list> 
282            <#else> 
283                <#assign displayedCard = businessCards[0]> 
284                <#assign offerId = displayedCard.offerId> 
285                <#assign sourceCode = displayedCard.sourceCode> 
286                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
287                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
288 
289                <#if (displayedCard.offerType=="143")> 
290                    <#assign productUrl="business-real-rewards"> 
291                    <#assign product="Business Real Rewards"> 
292                    <#assign cardIndex = 0>    
293                <#elseif (displayedCard.offerType=="128")> 
294                    <#assign productUrl = "business-cash-preferred"> 
295                    <#assign product="Business Cash Preferred"> 
296                    <#assign cardIndex = 1>                     
297                <#elseif (displayedCard.offerType=="121")> 
298                    <#assign productUrl = "business-platinum2103"> 
299                    <#assign product="Visa Business"> 
300                    <#assign cardIndex = 3> 
301                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
302                    <#if (scrapedData?size > 0)> 
303                        <#list scrapedData as sItem> 
304                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
305                                <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
306                                <#break> 
307                            </#if> 
308                        </#list> 
309                        <script> 
310                            $(document).ready(function () { 
311                                var aprText = "${apr}"; 
312                                if (aprText) { 
313                                    try { 
314                                        var matches= aprText.match(/\d+(\.\d+)?%?/g); 
315                                        var billing_cycle = matches[1]; 
316                                        var apr_min = apr_min = matches[2]; 
317                                        var apr_max = apr_max = matches[3]; 
318                                        if (billing_cycle) { 
319                                            $(".scraped-billing-cycle").html(billing_cycle); 
320
321                                        if (apr_min) { 
322                                            $(".scraped-apr-min").html(apr_min); 
323
324                                        if (apr_max) { 
325                                            $('.scraped-apr-max').html(apr_max); 
326
327 
328                                    } catch (e) { 
329                                        console.log(e); 
330
331
332                            }); 
333                        </script> 
334                    </#if>                       
335                </#if> 
336            </#if> 
337        </#if>    
338        <#if product != ""> 
339            <#if ameriprise> 
340                <#assign card_art_alt =  partnerName + " " + product + " Card"> 
341                <#assign rollover_text =  partnerName + " " + product + " Card"> 
342            <#else> 
343                <#assign card_art_alt = partnerName> 
344                <#assign rollover_text =  partnerName + " " + product + " Credit Card"> 
345                <#assign card_text = product + " Card"> 
346            </#if>  
347        </#if>  
348        <div class="jn-hero-container product-${productUrl} tier1-hero-${class.getData()}" title="${rollover_text!''}"> 
349            <div class="hero-main"> 
350                <div class="hero-main-logo"> 
351                    <#if partnerUrl?has_content> 
352                        <a href="${partnerUrl!''}" title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
353                    <#else> 
354                        <a title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
355                    </#if> 
356                </div> 
357                <div class="hero-main-container"> 
358                    <div class="hero-main-offer bg-color-white"> 
359                        <div class="offer-header"> 
360                             <div class="offer-text-top"> 
361                                <h3 class="offer-title">${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</h3> 
362                                <h2 class="offer-subtitle">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</h2> 
363                            </div> 
364                            <div class="offer-text-bottom hide-mobile"> 
365                                <div class="offer-detail-text text-color-default"> 
366                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()} 
367                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()} 
368                                </div> 
369 
370                                <#if ameriprise> 
371                                    <a data-button-name="cta-button-top" title="Learn More about ${partnerName!''} credit cards" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" href="javascript:void(0);" onclick="goToByScroll('product-display')">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                 
372                                <#else>  
373                                    <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm"> 
374                                        <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
375                                        <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
376                                        <input type="submit" data-button-name="cta-button-top"  data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card" 
377                                            class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled /> 
378                                    </form> 
379                                </#if> 
380                            </div> 
381                        </div> 
382 
383                        <div class="offer-detail"> 
384 
385                            <div class="offer-detail-cardArt cardArtImg">                                                  
386                                <img src="${cardArtImage!''}" alt="${card_art_alt!''}" srcset="" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
387                                <p>${card_text!''}</p> 
388                            </div> 
389                            <div class="offer-detail-text text-color-default hide-desktop"> 
390                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()} 
391                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()} 
392                            </div> 
393 
394                            <#if ameriprise> 
395                                <a data-button-name="cta-button-top" title="Learn More about ${partnerName!''} credit cards" class="jn-button apply-button text-bold button-bg-color-custom text-color-white hide-desktop" href="javascript:void(0);" onclick="goToByScroll('product-display')">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                 
396                            <#else>  
397                                <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm hide-desktop"> 
398                                    <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
399                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
400                                    <input type="submit" data-button-name="cta-button-top"  data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card" 
401                                        class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled /> 
402                                </form> 
403                            </#if> 
404                        </div> 
405                    </div> 
406                </div> 
407            </div> 
408        </div>   
409 
410    </#if> 
411</#if> 

Webcontent weergeven

Er trad een fout op tijdens de verwerking van het sjabloon.
Expression qstringmap["bankercode"] is undefined on line 8, column 17 in 10154#10192#153411750.
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 utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
5<#assign url404 = '/error/404.html'> 
6 
7 
8<#assign bCode= qstringmap["bankercode"]?first> 
9<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
10<#list bData as b>      
11    <#assign lc = b.locationcode > 
12    <#assign rLC = b.reallocationcode > 
13    <#assign mappedLC = b.mappedLocationCode > 
14</#list>  
15<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
16    <#assign ameriprise = true> 
17<#else> 
18    <#assign ameriprise = false> 
19</#if> 
20 
21<#if mappedLC?has_content && !ameriprise> 
22    <#assign lc = mappedLC > 
23</#if> 
24 
25<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bCode)> 
26<#if fiData?first?has_content> 
27    <#assign fi = fiData?first> 
28    <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
29        <#assign subbu_special = fi.offerId> 
30    </#if> 
31</#if> 
32 
33 
34<#if lc?has_content> 
35    <#assign prefix = "00000" > 
36    <#assign lcWithPrefix = prefix + lc> 
37    <#assign withPrefixLength = lcWithPrefix?length > 
38    <#assign startHere = withPrefixLength - 5> 
39    <#assign lc = lcWithPrefix?substring(startHere)>     
40    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
41    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
42 
43    <#assign clientProfile = clientProfileList?first> 
44    <#assign partnerName = clientProfile.getMarketingNameLong()> 
45    <#assign pbu = clientProfile.getPbu()> 
46    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>     
47    <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
48    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
49    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
50    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")>             
51        <#assign partnerUrl = 'https://' + partnerUrl> 
52    </#if> 
53 
54    <!-- <#assign clientdataList = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
55    <#if clientdataList?has_content > 
56    	<#assign clientdata = clientdataList?first > 
57		<#assign backgroundHexColor = clientdata["backgroundHexColor"] > 
58		<#assign backgroundImage = clientdata["backgroundImage"] > 
59		<#assign buttonHexColor = clientdata["buttonHexColor"] > 
60		<#assign AprMin = clientdata["AprMin"] > 
61		<#assign AprMax = clientdata["AprMax"] > 
62		<#assign cashAdvanceRate = clientdata["cashAdvanceRate"] > 
63		<#assign BillingCycles = clientdata["BillingCycles"] > 
64		<#assign textHexColor = clientdata["textHexColor"] > 
65		<#assign linkHexColor = clientdata["linkHexColor"] > 
66		<#assign hoverColor = clientdata["hoverColor"] > 
67		<#assign secondaryBackgroundImage = clientdata["secondaryBackgroundImage"] > 
68		<#assign transparency = clientdata["transparency"] > 
69		<#assign businessBackgroundImageLarge = clientdata["businessBackgroundImageLarge"] > 
70		<#assign businessBackgroundImageSmall = clientdata["businessBackgroundImageSmall"] > 
71		<#assign businessTransparency = clientdata["businessTransparency"] > 
72		<#assign dmaBackgroundImage = clientdata["dmaBackgroundImage"] > 
73		<#assign secondaryDmaBackgroundImage = clientdata["secondaryDmaBackgroundImage"] > 
74	</#if> --> 
75	 
76    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
77    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
78        <script> 
79        console.log('logo url', '${cdnLogoUrl}${logoFileName}'); 
80    </script> 
81    <#if pbu == "0864054"> 
82        <#assign override = "berkshire"> 
83    <#else> 
84        <#assign override = " "> 
85    </#if> 
86    <#--  this one should be delete for prod  --> 
87                 
88    <#-- <#assign cdnLogoUrl = "https://4f61efb10f32ceb57895-3733e103896f37259213d6ad72acbe68.ssl.cf2.rackcdn.com">   
89    <#assign logoFileName = pbu + "-" + subbu + ".png">--> 
90 
91    <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
92    <#if (subbu_special?has_content)> 
93        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
94        <script> 
95            console.log('new subbu', '${subbu_special!''}'); 
96        </script>  
97    <#else> 
98        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
99    </#if> 
100    <#assign temp = []> 
101    <#assign consumerCards = []> 
102    <#assign businessCards = []>  
103    <#assign offerTypeList = []>       
104    <#assign index = 0> 
105    <#assign ameriprise_cards= []> 
106    <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']> 
107    <#assign businessOfferTypes =['144', '128', '143', '121', '123']> 
108    <#list fiCardsData as fib> 
109        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
110            <#assign offerTypeList = offerTypeList + [fib.offerType]> 
111            <#assign temp = temp + fiCardsData[index..index]>    
112            <#if ameriprise> 
113                <#if (fib.offerType == "101" || fib.offerType == "103")> 
114                    <#assign ameriprise_cards= ameriprise_cards + fiCardsData[index..index]> 
115                </#if>                      
116            <#else> 
117                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
118                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
119                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
120                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
121                </#if>             
122            </#if>                 
123        </#if>  
124        <#assign index = index + 1>   
125                     
126    </#list>        
127    <#assign fiCardsData = temp> 
128    <#if ameriprise> 
129        <#assign consumerCards = ameriprise_cards?sort_by("offerType")> 
130    </#if> 
131 
132    <#if (fiCardsData?size > 0)>   
133        <#if (subbu_special?has_content)> 
134            <#assign lc_used = fiCardsData?first.WebLocationCode>   
135        <#else> 
136            <#if ameriprise> 
137                <#assign lc_used = mappedLC>  
138            <#else> 
139                <#assign lc_used = lc>  
140            </#if> 
141        </#if>               
142        <#assign offerId = ""> 
143        <#assign sourceCode = ""> 
144        <#assign cardArtImage = ""> 
145        <#assign productUrl = ""> 
146        <#assign product = ""> 
147        <#assign preparerType = "customer"> 
148        <#assign apr = ""> 
149        <#assign cardIndex = 0>   
150        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
151            <#if (offerTypeList?seq_contains("108")) || (offerTypeList?seq_contains("109")) > 
152                <#list consumerCards as card> 
153                    <#if (card.offerType=="101") > 
154                        <#assign offerId = card.offerId> 
155                        <#assign sourceCode = card.sourceCode> 
156                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
157                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
158 
159                        <#assign productUrl="consumer-edr2112"> 
160                        <#assign product="Everyday Rewards+"> 
161                        <#assign cardIndex = 4> 
162 
163                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
164                        <#if (scrapedData?size > 0)> 
165                            <#list scrapedData as sItem> 
166                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
167                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
168                                    <#break> 
169                                </#if> 
170                            </#list> 
171                            <script> 
172                                $(document).ready(function () { 
173                                    var aprText = "${apr}"; 
174                                    if (aprText) { 
175                                        try { 
176                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
177                                            var billing_cycle = matches[1]; 
178                                            var apr_min = apr_min = matches[2]; 
179                                            var apr_max = apr_max = matches[3]; 
180                                            if (billing_cycle) { 
181                                                $(".scraped-billing-cycle").html(billing_cycle); 
182
183                                            if (apr_min) { 
184                                                $(".scraped-apr-min").html(apr_min); 
185
186                                            if (apr_max) { 
187                                                $('.scraped-apr-max').html(apr_max); 
188
189 
190                                        } catch (e) { 
191                                            console.log(e); 
192
193
194                                }); 
195                            </script> 
196                        </#if>  
197                    </#if> 
198                </#list> 
199            <#else> 
200                <#assign displayedCard = consumerCards[0]> 
201                <script> 
202                    console.log('dispalyed card:','${displayedCard.offerType}'); 
203                </script> 
204                <#assign offerId = displayedCard.offerId> 
205                <#assign sourceCode = displayedCard.sourceCode> 
206                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
207                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
208                <#if ameriprise> 
209                    <#if (displayedCard.offerType == "101")> 
210                        <#assign productUrl="ameriprise-premier-visa-signature"> 
211                        <#assign product="Premier Visa Signature"> 
212                        <#assign cardIndex = 0> 
213                    <#elseif (displayedCard.offerType == "103")> 
214                        <#assign productUrl = "ameriprise-visa-signature"> 
215                        <#assign product="Visa Signature"> 
216                        <#assign cardIndex = 1> 
217                    </#if> 
218                <#else> 
219                        <#if (displayedCard.offerType == "101" || displayedCard.offerType == "103")> 
220                            <#assign productUrl="consumer-edr2112"> 
221                            <#assign product="Everyday Rewards+"> 
222                            <#assign cardIndex = 4>                           
223                        <#elseif (displayedCard.offerType == "108" || displayedCard.offerType == "109")> 
224                            <#assign productUrl = "consumer-platinum2103"> 
225                            <#assign product="Platinum">    
226                            <#assign cardIndex = 1>    
227                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
228                            <#if (scrapedData?size > 0)> 
229                                <#list scrapedData as sItem> 
230                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
231                                        <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
232                                        <#break> 
233                                    </#if> 
234                                </#list> 
235                                <script> 
236                                    $(document).ready(function () { 
237                                        var aprText = "${apr}"; 
238                                        if (aprText) { 
239                                            try { 
240                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
241                                                var billing_cycle = matches[1]; 
242                                                var apr_min = apr_min = matches[2]; 
243                                                var apr_max = apr_max = matches[3]; 
244                                                if (billing_cycle) { 
245                                                    $(".scraped-billing-cycle").html(billing_cycle); 
246
247                                                if (apr_min) { 
248                                                    $(".scraped-apr-min").html(apr_min); 
249
250                                                if (apr_max) { 
251                                                    $('.scraped-apr-max').html(apr_max); 
252
253 
254                                            } catch (e) { 
255                                                console.log(e); 
256
257
258                                    }); 
259                                </script> 
260                            </#if>                                                     
261                        <#elseif (displayedCard.offerType == "115")> 
262                            <#assign productUrl = "secured"> 
263                            <#assign product="Secured"> 
264                            <#assign cardIndex = 3> 
265                        </#if> 
266                </#if> 
267            </#if> 
268        </#if> 
269        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
270            <#if (offerTypeList?seq_contains("128")) > 
271                <#list businessCards as card> 
272                    <#if (card.offerType=="128")> 
273                        <#assign offerId = card.offerId> 
274                        <#assign sourceCode = card.sourceCode> 
275                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
276                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
277                        <#assign productUrl = "business-cash-preferred"> 
278                        <#assign product="Business Cash Preferred">                 
279                        <#assign cardIndex = 0> 
280                    </#if> 
281                </#list> 
282            <#else> 
283                <#assign displayedCard = businessCards[0]> 
284                <#assign offerId = displayedCard.offerId> 
285                <#assign sourceCode = displayedCard.sourceCode> 
286                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
287                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
288 
289                <#if (displayedCard.offerType=="143")> 
290                    <#assign productUrl="business-real-rewards"> 
291                    <#assign product="Business Real Rewards"> 
292                    <#assign cardIndex = 0>    
293                <#elseif (displayedCard.offerType=="128")> 
294                    <#assign productUrl = "business-cash-preferred"> 
295                    <#assign product="Business Cash Preferred"> 
296                    <#assign cardIndex = 1>                     
297                <#elseif (displayedCard.offerType=="121")> 
298                    <#assign productUrl = "business-platinum2103"> 
299                    <#assign product="Visa Business"> 
300                    <#assign cardIndex = 3> 
301                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
302                    <#if (scrapedData?size > 0)> 
303                        <#list scrapedData as sItem> 
304                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
305                                <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
306                                <#break> 
307                            </#if> 
308                        </#list> 
309                        <script> 
310                            $(document).ready(function () { 
311                                var aprText = "${apr}"; 
312                                if (aprText) { 
313                                    try { 
314                                        var matches= aprText.match(/\d+(\.\d+)?%?/g); 
315                                        var billing_cycle = matches[1]; 
316                                        var apr_min = apr_min = matches[2]; 
317                                        var apr_max = apr_max = matches[3]; 
318                                        if (billing_cycle) { 
319                                            $(".scraped-billing-cycle").html(billing_cycle); 
320
321                                        if (apr_min) { 
322                                            $(".scraped-apr-min").html(apr_min); 
323
324                                        if (apr_max) { 
325                                            $('.scraped-apr-max').html(apr_max); 
326
327 
328                                    } catch (e) { 
329                                        console.log(e); 
330
331
332                            }); 
333                        </script> 
334                    </#if>                       
335                </#if> 
336            </#if> 
337        </#if>    
338        <#if product != ""> 
339            <#if ameriprise> 
340                <#assign card_art_alt =  partnerName + " " + product + " Card"> 
341                <#assign rollover_text =  partnerName + " " + product + " Card"> 
342            <#else> 
343                <#assign card_art_alt = partnerName> 
344                <#assign rollover_text =  partnerName + " " + product + " Credit Card"> 
345                <#assign card_text = product + " Card"> 
346            </#if>  
347        </#if>  
348        <div class="jn-hero-container product-${productUrl} tier1-hero-${class.getData()}" title="${rollover_text!''}"> 
349            <div class="hero-main"> 
350                <div class="hero-main-logo"> 
351                    <#if partnerUrl?has_content> 
352                        <a href="${partnerUrl!''}" title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
353                    <#else> 
354                        <a title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
355                    </#if> 
356                </div> 
357                <div class="hero-main-container"> 
358                    <div class="hero-main-offer bg-color-white"> 
359                        <div class="offer-header"> 
360                             <div class="offer-text-top"> 
361                                <h3 class="offer-title">${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</h3> 
362                                <h2 class="offer-subtitle">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</h2> 
363                            </div> 
364                            <div class="offer-text-bottom hide-mobile"> 
365                                <div class="offer-detail-text text-color-default"> 
366                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()} 
367                                    ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()} 
368                                </div> 
369 
370                                <#if ameriprise> 
371                                    <a data-button-name="cta-button-top" title="Learn More about ${partnerName!''} credit cards" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" href="javascript:void(0);" onclick="goToByScroll('product-display')">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                 
372                                <#else>  
373                                    <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm"> 
374                                        <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
375                                        <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
376                                        <input type="submit" data-button-name="cta-button-top"  data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card" 
377                                            class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled /> 
378                                    </form> 
379                                </#if> 
380                            </div> 
381                        </div> 
382 
383                        <div class="offer-detail"> 
384 
385                            <div class="offer-detail-cardArt cardArtImg">                                                  
386                                <img src="${cardArtImage!''}" alt="${card_art_alt!''}" srcset="" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
387                                <p>${card_text!''}</p> 
388                            </div> 
389                            <div class="offer-detail-text text-color-default hide-desktop"> 
390                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()} 
391                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()} 
392                            </div> 
393 
394                            <#if ameriprise> 
395                                <a data-button-name="cta-button-top" title="Learn More about ${partnerName!''} credit cards" class="jn-button apply-button text-bold button-bg-color-custom text-color-white hide-desktop" href="javascript:void(0);" onclick="goToByScroll('product-display')">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                 
396                            <#else>  
397                                <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm hide-desktop"> 
398                                    <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
399                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
400                                    <input type="submit" data-button-name="cta-button-top"  data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card" 
401                                        class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled /> 
402                                </form> 
403                            </#if> 
404                        </div> 
405                    </div> 
406                </div> 
407            </div> 
408        </div>   
409 
410    </#if> 
411</#if> 

Webcontent weergeven

Er trad een fout op tijdens de verwerking van het sjabloon.
Expression qstringmap["bankercode"] is undefined on line 34, column 17 in 10154#10192#153411738.
1<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService") > 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign url = request.attributes.CURRENT_URL > 
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
5<#-- <#assign url404 = '/error/404.html'> --> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7<#assign environment = url?replace('/index.*','','r')> 
8 
9 
10 
11<#assign text_to_apply_source = "vanity url" > 
12<#if qstringmap["sms"]?has_content> 
13    <#assign sms = 1 > 
14    <#assign text_to_apply_source = "sms" > 
15</#if> 
16<#if qstringmap["qrCode"]?has_content> 
17    <#assign text_to_apply_source = "qr code" > 
18</#if> 
19 
20<#if qstringmap["ecid"]?has_content> 
21    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
22    <#assign campaignId = qstringmap["ecid"]?first > 
23<#else> 
24    <#assign ecidExt=""> 
25    <#assign campaignId = "" > 
26</#if> 
27<#--  check bankercode validity  --> 
28<#if oadURL?contains("uat-")> 
29    <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
30<#else> 
31    <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
32</#if> 
33<#assign bCode= qstringmap["bankercode"]?first> 
34 
35<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bCode)> 
36<#if fiData?first?has_content> 
37    <#assign fi = fiData?first> 
38    <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
39        <#assign subbu_special = fi.offerId> 
40    </#if> 
41</#if> 
42 
43<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
44<#list bData as b>      
45    <#assign lc = b.locationcode > 
46    <#assign bName = b.branch > 
47    <#assign bPhone = b.businessphone > 
48    <#assign boeid = b.oeid > 
49    <#assign fName = b.firstname?trim > 
50    <#assign lName = b.lastname?trim > 
51    <#assign rLC = b.reallocationcode > 
52    <#assign mappedLC = b.mappedLocationCode > 
53</#list>  
54 
55<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
56    <#assign ameriprise = true> 
57<#else> 
58    <#assign ameriprise = false> 
59</#if> 
60<#if mappedLC?has_content && !ameriprise> 
61    <#assign lc = mappedLC > 
62</#if> 
63 
64           
65<#if lc?has_content> 
66    <#assign firstNameLength = fName?length > 
67    <#assign lastNameLength = lName?length > 
68    <#if firstNameLength + lastNameLength &gt; 19 > 
69        <#if lastNameLength &gt; 18 > 
70            <#assign bLName = lName?substring(0,18)> 
71        <#else> 
72            <#assign bLName = lName> 
73        </#if> 
74        <#assign maxFirstName = 19 - bLName?length > 
75        <#if firstNameLength &gt; maxFirstName > 
76            <#assign bFName = fName?substring(0,maxFirstName)> 
77        <#else> 
78            <#assign bFName = fName> 
79        </#if> 
80    <#else> 
81        <#assign bFName = fName> 
82        <#assign bLName = lName> 
83    </#if>  
84 
85    <#assign prefix = "00000" > 
86    <#assign lcWithPrefix = prefix + lc > 
87    <#assign withPrefixLength = lcWithPrefix?length > 
88    <#assign startHere = withPrefixLength - 5> 
89    <#assign lc = lcWithPrefix?substring(startHere)>   
90    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
91    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
92    <#if (clientProfileList?first?has_content)> 
93        <#assign clientProfile = clientProfileList?first> 
94        <#assign partnerName = clientProfile.getMarketingNameLong()> 
95        <#assign pbu = clientProfile.getPbu()> 
96        <#assign subbu = clientProfile.getSUBBRANDBUNBR()>          
97        <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')>  
98        <#if (subbu_special?has_content)> 
99        <script> 
100            console.log("special subbu:", '${subbu_special}'); 
101        </script> 
102            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
103        <#else> 
104            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
105                    <script> 
106            console.log("subbu:", '${subbu}'); 
107        </script> 
108        </#if> 
109 
110        <#-- Begin: filter cards by sourceCode and offerId and remove duplicated cards--> 
111        <#assign temp = []> 
112        <#assign consumerCards = []> 
113        <#assign businessCards = []>  
114        <#assign offerTypeList = []>  
115        <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115', '141', '147']> 
116        <#assign businessOfferTypes =['144', '128', '143', '121', '123']>     
117        <#assign index = 0> 
118        <#list fiCardsData as fib> 
119            <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
120                <#assign offerTypeList = offerTypeList + [fib.offerType]> 
121                <#assign temp = temp + fiCardsData[index..index]>   
122                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
123                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
124                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
125                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
126                </#if>                 
127            </#if>  
128            <#assign index = index + 1>                
129        </#list>  
130 
131 
132        <#assign fiCardsData = temp> 
133 
134        <#if (fiCardsData?size > 0)>   
135            <#if (subbu_special?has_content)> 
136                <#assign lc_used = fiCardsData?first.WebLocationCode>   
137            <#else> 
138                <#if ameriprise> 
139                    <#assign lc_used = mappedLC>  
140                <#else> 
141                    <#assign lc_used = lc>  
142                </#if> 
143            </#if>  
144        </#if>  
145 
146        <#if (consumerCards?size > 0 || businessCards?size > 0)>  
147         
148            <div class="content-container content-container-main jn-consumer-content" id="product-display"> 
149                <#if ((consumerCards?size > 0) && (businessCards?size > 0))> 
150                    <nav class="jn-primary-nav two-tabs"> 
151                        <ul> 
152                            <li title="${partnerName!''} - Personal products"> 
153                                <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a> 
154                            </li> 
155                            <li title="${partnerName!''} - Business products"> 
156                                <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a> 
157                            </li> 
158                        </ul> 
159                    </nav> 
160                <#else> 
161                    <#if (consumerCards?size > 0)> 
162                        <nav class="jn-primary-nav" title="${partnerName!''} - Personal products"> 
163                            <ul> 
164                                <li> 
165                                    <p class="tab-nav" id="consumerTab"><span>Personal</span></p> 
166                                </li> 
167                            </ul> 
168                        </nav> 
169                    </#if> 
170                    <#if (businessCards?size > 0)> 
171                        <nav class="jn-primary-nav" title="${partnerName!''} - Business products"> 
172                            <ul> 
173                                <li> 
174                                    <p class="tab-nav" id="businessTab"><span>Business</span></p> 
175                                </li> 
176                            </ul> 
177                        </nav> 
178                    </#if> 
179                </#if> 
180                <#if (consumerCards?size > 0)> 
181                <div class="tab-more-wrapper"> 
182                    <div class="jn-consumer-content-wrapper jn-tab-content active transition-start" data-id="consumerTab" title="${partnerName!''} - Personal products"> 
183                        <#list consumerCards as fib> 
184                            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" > 
185                            <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">                         
186                            <#if ameriprise>                                
187                                <#if (fib.offerType == "101")> 
188                                        <#assign productName = "premier-visa-signature"> 
189                                        <#assign product="Premier Visa Signature"> 
190                                        <#assign cardIndex = 0> 
191                                <#elseif (fib.offerType == "103")> 
192                                        <#assign productName = "visa-signature"> 
193                                        <#assign product="Visa Signature"> 
194                                        <#assign cardIndex = 1> 
195                                </#if> 
196                                <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
197                                <#assign titleText = titleText?replace('<[^>]+>','','r')> 
198                            <#else> 
199                                <#switch fib.offerType> 
200                                    <#case "101"> 
201                                    <#assign productName = "consumer-edr2112"> 
202                                    <#assign product="Everyday Rewards+"> 
203                                    <#assign cardIndex = 0> 
204                                    <#break> 
205                                <#case "108"> 
206                                    <#assign productName = "consumer-platinum2103"> 
207                                    <#assign product="Platinum"> 
208                                    <#assign cardIndex = 2> 
209                                    <#break> 
210                                <#case "109"> 
211                                    <#assign productName = "consumer-platinum2103"> 
212                                    <#assign product="Platinum"> 
213                                    <#assign cardIndex = 2> 
214                                    <#break>                                            
215                                <#case "115"> 
216                                    <#assign productName = "secured"> 
217                                    <#assign product="Secured"> 
218                                    <#assign cardIndex = 5> 
219                                    <#break> 
220                                <#case "104"> 
221                                    <#assign productName = "max-cash"> 
222                                    <#assign product="Max Cash Preferred"> 
223                                    <#assign cardIndex = 1> 
224                                    <#break> 
225                                 <#case "147"> 
226                                    <#assign productName = "max-cash-secured"> 
227                                    <#assign product="Max Cash Secured"> 
228                                    <#assign cardIndex = 4> 
229                                    <#break> 
230                                <#case "141"> 
231                                    <#assign productName = "college-real-rewards"> 
232                                    <#assign product="College Real Rewards"> 
233                                    <#assign cardIndex = 3> 
234                                    <#break> 
235                                <#default> 
236                                </#switch> 
237                                 
238                                <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
239                                <#assign titleText = titleText?replace('<[^>]+>','','r')> 
240                                 
241 
242                                <#assign APR=""> 
243                                <#assign AMF=""> 
244                                <#assign BAL=""> 
245                                <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
246                                <#if (scrapedData?size > 0)> 
247                                    <#list scrapedData as sItem> 
248                                        <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
249                                            <#assign APR = sItem.scrapedValue> 
250                                        <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
251                                            <#assign AMF = sItem.scrapedValue> 
252                                        <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) > 
253                                            <#assign BAL = sItem.scrapedValue> 
254                                        </#if> 
255                                        <#if (APR?has_content && AMF?has_content && BAL?has_content)> 
256                                            <#break> 
257                                        </#if> 
258                                    </#list> 
259                                </#if> 
260                            </#if> 
261                            <#if ameriprise> 
262                                <#assign rollover_text =  partnerName + " " + product + " " + " Card"> 
263                            <#else> 
264                                <#assign rollover_text =  partnerName + " " + product + " " + " Credit Card"> 
265                            </#if>                             
266                            <div class="jn-consumer-item item-${fib.offerType}" title="${rollover_text!''}"> 
267                                <div class="consumer-card-heading hide-desktop"> 
268                                    <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
269                                    ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
270                                </div> 
271                                <div class="jn-consumer-card-image"> 
272                                    <img src="${cardArtImage!''}" alt="${rollover_text!''}"  class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
273                                    <#if (fib.offerType=="101" || fib.offerType=="104")> 
274                                        <a class="reward-calculator-link" target="_blank" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' class="whiteLink" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
275                                    </#if> 
276                                      
277                                </div> 
278 
279                                <div class="jn-consumer-card-info"> 
280                                    <div class="consumer-card-heading hide-mobile"> 
281                                        <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
282                                        ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
283                                    </div> 
284                                    <div class="jn-additional"> 
285                                        <ul class="${fib.offerType}"> 
286                                            <#if !ameriprise>                                            
287                                                <#if (fib.offerType == "104")> 
288                                                    <li class="${fib.offerType}"> 
289                                                        <p> 
290                                                            <strong>APR<sup>*</sup> for Purchases: </strong> 
291                                                            ${APR!''} 
292                                                        </p> 
293                                                         
294                                                    </li> 
295                                                    <li class="${fib.offerType}"> 
296                                                        <p> 
297                                                            <strong>Intro APR<sup>*</sup> for Balance Transfers: </strong> 
298                                                            ${BAL!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
299                                                        </p> 
300                                                    </li> 
301                                                <#elseif (fib.offerType== "115")> 
302                                                    <li class="${fib.offerType}"> 
303                                                        <p> 
304                                                            <strong>APR<sup tag="1">1</sup> for Purchases and Balance Transfers: </strong> 
305                                                            ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
306                                                        </p> 
307                                                    </li> 
308                                                <#elseif (fib.offerType== "101")> 
309                                                    <li class="${fib.offerType}"> 
310                                                        <p> 
311                                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
312                                                            ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
313                                                        </p> 
314                                                    </li> 
315                                                <#else> 
316                                                    <li class="${fib.offerType}"> 
317                                                        <p> 
318                                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
319                                                            ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
320                                                        </p> 
321                                                    </li> 
322                                                </#if> 
323                                            </#if> 
324                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
325                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
326                                                    <li>${marketingInfo.getData()}</li> 
327                                                </#list> 
328                                            </#if> 
329                                            <#if !ameriprise> 
330                                                <li> 
331                                                    <p>Annual Fee: ${AMF!''} <a  href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}"  target="_blank">Terms & Conditions</a></p> 
332                                                </li> 
333                                            </#if> 
334                                        </ul> 
335                                    </div> 
336                                    <ul class="actions"> 
337                                        <li> 
338                                            <form action="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}" method="post" class="BAAForm"> 
339                                                <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
340                                                <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
341                                                <a class="applyNowLink apply-now-button" href="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}"  
342                                                    data-button-name="apply-now-link" data-product-name="${productName}" 
343                                                    title="Apply Now for ${rollover_text!''}">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
344                                            </form> 
345                                        </li> 
346                                        <li> 
347                                        <#if ameriprise> 
348                                            <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc_used}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
349                                        <#else> 
350                                            <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
351                                        </#if> 
352                                        </li> 
353                                    </ul> 
354                                </div> 
355 
356 
357                                 
358                                 
359                            </div> 
360                        </#list> 
361                    </div> 
362                </div> 
363                 
364                </#if> 
365                <#if (businessCards?size > 0)>  
366                    <div class="tab-more-wrapper">    
367                        <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products"> 
368                             
369                            <#list businessCards as fib> 
370                                    <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> 
371                                    <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
372                                    <#switch fib.offerType>                                   
373                                        <#case "144"> 
374                                            <#assign productName = "smart-business-rewards"> 
375                                            <#assign product="Smart Business Rewards"> 
376                                            <#assign cardIndex = 8> 
377                                            <#break> 
378                                        <#case "128"> 
379                                            <#assign productName = "business-cash-preferred"> 
380                                            <#assign product="Business Cash Preferred"> 
381                                            <#assign cardIndex = 6>   
382                                            <#break> 
383                                        <#case "143"> 
384                                            <#assign productName = "business-real-rewards"> 
385                                            <#assign product="Business Real Rewards"> 
386                                            <#assign cardIndex = 9> 
387                                            <#break> 
388                                        <#case "121"> 
389                                            <#assign productName = "business-platinum2103"> 
390                                            <#assign product="Business Card"> 
391                                            <#assign cardIndex = 7> 
392                                            <#break> 
393                                        <#default> 
394                                    </#switch> 
395                                    <#assign APR=""> 
396                                    <#assign AMF=""> 
397                                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
398                                    <#if (scrapedData?size > 0)> 
399                                        <#list scrapedData as sItem> 
400                                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
401                                                <#assign APR = sItem.scrapedValue> 
402                                            <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
403                                                <#assign AMF = sItem.scrapedValue> 
404                                            </#if> 
405                                            <#if (APR?has_content && AMF?has_content)> 
406                                                <#break> 
407                                            </#if> 
408                                        </#list> 
409                                    </#if> 
410                                     
411                                <div class="jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
412                                    <div class="consumer-card-heading hide-desktop"> 
413                                        <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
414                                        ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
415                                    </div> 
416                                    <div class="jn-consumer-card-image"> 
417                                        <img src="${cardArtImage!''}" alt="${rollover_text!''}"  class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
418                                        <#if (fib.offerType=="144" || fib.offerType=="143")> 
419                                          <a class="reward-calculator-link" target="_blank" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' class="whiteLink" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
420                                        </#if> 
421                                    </div> 
422 
423                                    <div class="jn-consumer-card-info"> 
424                                        <div class="consumer-card-heading hide-mobile"> 
425                                            <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
426                                            ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
427                                        </div> 
428                                        <div class="jn-additional"> 
429                                            <ul> 
430                                                <#if (fib.offerType == "144")> 
431                                                    <li> 
432                                                        <p> 
433                                                            <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
434                                                            ${APR!''} 
435                                                            <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
436                                                        </p> 
437                                                    </li> 
438                                                <#else> 
439                                                    <li> 
440                                                        <p> 
441                                                            <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
442                                                            ${APR!''} 
443                                                            <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
444                                                        </p> 
445                                                    </li> 
446                                                </#if> 
447                                                <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
448                                                    <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
449                                                        <li>${marketingInfo.getData()}</li> 
450                                                    </#list> 
451                                                </#if> 
452                                                <li><p>Annual Fee: ${AMF!''} <a 
453                                                    href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a></p> 
454                                                </li> 
455                                            </ul> 
456                                        </div> 
457                                        <ul class="actions">                                     
458                                            <li> 
459                                                <form action="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}" method="post" class="BAAForm"> 
460                                                    <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
461                                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea>                                         
462                                                    <a class="applyNowLink apply-now-button"  
463                                                    href="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}"  
464                                                    data-button-name="apply-now-link" data-product-name="${productName}" 
465                                                    title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
466                                                </form> 
467                                            </li> 
468                                            <li><a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a></li> 
469                                        </ul> 
470                                    </div> 
471                                </div> 
472                                 
473                            </#list> 
474                             
475                        </div> 
476                    </div> 
477                </#if>  
478            </div> 
479            <script> 
480                var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
481                var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
482                 $(document).ready(function () { 
483                    var banker_code = "${bCode!''}"; 
484                    var tabs=$('.tab-nav'); 
485                    var slideDiv = $('.jn-tab-content.active');                    
486                    var screenWidthMobile = 768; 
487                    var screenWidth = window.innerWidth; 
488 
489                    if (tabs.length == 1) { 
490                        if ($(consumerSelector).length > 0) { 
491                            if(banker_code && (banker_code.indexOf("amp") == 0) && (banker_code.length > 6)) { 
492                                $("nav.jn-primary-nav").hide(); 
493                                changeCardLayout(consumerSelector); 
494                                createMetaTag("consumer"); 
495                            } else { 
496                                hideHeroAndDisclaimer('business'); 
497                                showHeroAndDisclaimer('consumer'); 
498                                changeCardLayout(consumerSelector); 
499                                renumberFootnote("consumer"); 
500                                createMetaTag("consumer");  
501
502                        }  
503                        if ($(businessSelector).length > 0) { 
504                            $(businessSelector).addClass('active'); 
505                            hideHeroAndDisclaimer('consumer'); 
506                            showHeroAndDisclaimer('business'); 
507                            changeCardLayout(businessSelector); 
508                            renumberFootnote("business"); 
509                            createMetaTag("business");  
510
511
512                    if (tabs.length == 2) { 
513                        renumberFootnote("consumer"); 
514                        renumberFootnote("business"); 
515                        createMetaTag("consumer"); 
516                        if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
517                            changeCardLayout(consumerSelector); 
518
519                        if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
520                            changeCardLayout(businessSelector); 
521
522                             
523                        var tabsNav = document.querySelectorAll('.tab-nav'); 
524                        togglePrimaryNav(tabsNav); 
525 
526                        if(window.location.href.indexOf('#business') > -1 ) { 
527                            $(consumerSelector).removeClass('active'); 
528                            $(businessSelector).addClass('active'); 
529                            $('#consumerTab').removeClass('active'); 
530                            $('#businessTab').addClass('active'); 
531                            hideHeroAndDisclaimer('consumer'); 
532                            showHeroAndDisclaimer('business'); 
533                            changeCardLayout(businessSelector); 
534                            renumberFootnote("business"); 
535                            createMetaTag("business"); 
536 
537                            $(tabs).click(function(){ 
538                                if ($(this).attr('id') === "consumerTab") { 
539                                    var newUrl = window.location.toString(); 
540                                    window.location = newUrl.replace(/#business/, '#consumer'); 
541
542                                if ($(this).attr('id') === "businessTab") { 
543                                    var url = window.location.toString(); 
544                                    window.location = url.replace(/#consumer/, '#business'); 
545
546                            }); 
547
548
549                     
550                }); 
551                // Primary Nav function 
552                 
553                function togglePrimaryNav(elem) { 
554                    for (var i = 0; i < elem.length; i++) { 
555                        elem[i].addEventListener("click", function(e) { 
556 
557                            var current = this, 
558                                allSections = document.querySelectorAll('[data-id]'), 
559                                section = document.querySelector("[data-id='"+ current.id +"']"); 
560 
561                            for (var a = 0; a < allSections.length; a++) { 
562                                allSections[a].classList.remove('active'); 
563
564                            for (var c = 0; c < elem.length; c++) { 
565                                if (current != elem[c]) { 
566                                    elem[c].classList.remove('active'); 
567                                } else { 
568                                    current.classList.add('active'); 
569                                    section.classList.add('active'); 
570                                    hideHeroAndDisclaimer('consumer'); 
571                                    hideHeroAndDisclaimer('business'); 
572                                    if(current.getAttribute('id') === "consumerTab"){ 
573                                        showHeroAndDisclaimer('consumer'); 
574                                    } else if(current.getAttribute('id') === "businessTab"){ 
575                                        showHeroAndDisclaimer('business'); 
576
577
578
579                            e.preventDefault(); 
580                        }); 
581
582
583 
584                function renumberFootnote(type) { 
585                    var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
586                    var disclaimerSelector = '.tier1-disclaimer-landing-' + type; 
587                    var heroSelector = '.tier1-hero-landing-' + type; 
588                    var numOfFootnote = $(disclaimerSelector + ' sup').length; 
589                    var showList = []; 
590                    var hideList=[]; 
591                    for (var i = 1; i <= numOfFootnote; i++) { 
592                    var cssClass="tag-" + i; 
593                    if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
594                        showList.push(i);      
595                    } else { 
596                        hideList.push(i); 
597
598                    }  
599                    /* 
600                    for (var i = 1; i < showList.length + 1; i++) { 
601                        if(showList[i-1] != i) { 
602                            var className="tag-" + showList[i-1]; 
603                            $(heroSelector).find("." +  className).html(i); 
604                            // $(discriptionSelector).find("." +  className).html(i); 
605                            $(disclaimerSelector).find("." +  className).html(i); 
606
607
608                    */ 
609                    for (var i = 0; i <hideList.length; i++) { 
610                        var cname="tag-" + hideList[i]; 
611                        $(disclaimerSelector).find("." + cname).parent().hide(); 
612                    }    
613
614 
615                function changeCardLayout(cssSelector) { 
616                    var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
617                    if(numOfCards == 1) { 
618                        $(cssSelector).addClass('one-card'); 
619                    } else if (numOfCards == 2) { 
620                        $(cssSelector).addClass('two-card'); 
621                    }   
622
623                function hideHeroAndDisclaimer(type) { 
624                    try { 
625                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('show'); 
626                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('hide'); 
627                    } catch (e) { 
628                        console.log(e); 
629
630 
631                    try { 
632                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('show'); 
633                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('hide');  
634                    } catch (e) { 
635                        console.log(e); 
636
637 
638
639                function showHeroAndDisclaimer(type) { 
640                    try { 
641                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('show'); 
642                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('hide'); 
643                    } catch (e) { 
644                        console.log(e); 
645
646                     
647                    try { 
648                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('show'); 
649                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('hide');  
650                    } catch (e) { 
651                        console.log(e); 
652
653 
654
655                function createMetaTag(type) { 
656                    var partnerName = "${partnerName!0}"; 
657                    var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
658                    var metaDesc = ""; 
659                    if (type == "consumer") {     
660                        if(location.pathname.indexOf("11t1m") != -1) { 
661                            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." 
662                        } else {                                    
663                            if(product_name ==  "consumer-platinum2103") { 
664                                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."; 
665                            } else if(product_name ==  "real-rewards") { 
666                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
667                            } else if(product_name ==  "secured") { 
668                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
669                            } else if(product_name ==  "max-cash") { 
670                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select."; 
671
672
673 
674                    } else if (type == "business") { 
675                        if(product_name ==  "business-cashback") {               
676                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
677                        } else if(product_name ==  "business-real-rewards") { 
678                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
679                        } else if(product_name ==  "business-visa") { 
680                            metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
681                        } else if(product_name ==  "smart-business-rewards") { 
682                            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."; 
683
684
685                    var m = document.createElement('meta');  
686                    m.name = 'description';  
687                    m.content = metaDesc;  
688                    document.head.appendChild(m); 
689
690                function goToByScroll(id) { 
691                    var element = document.getElementById(id); 
692                    element.scrollIntoView(true); 
693
694                 
695            </script> 
696            <script> 
697                    var reportingData = window.reportingData || {}; 
698                document.addEventListener('DOMContentLoaded', function() { 
699                    console.log('inside ready'); 
700                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
701                    var hostName = location.hostname;                                     
702                    function getDomainFromHostname(hostname) { 
703                        var parts = hostname.split('.'); 
704                        return parts.length === 3 ? parts[1] : parts[0]; 
705
706                    var domain = getDomainFromHostname(hostName); 
707                    var partnerName = "${partnerName!0}"; 
708                    var ameriprise = '${ameriprise?string("yes", "no")}'; 
709                    var locationCode = "${rLC!lc}"; 
710                    var eidAmp = ""; 
711                    var heroCardImgs = document.querySelectorAll('.jn-consumer-card-image img, .cardArtImg img'); 
712                    for (var index = 0; index < heroCardImgs.length; index++) { 
713                        var heroCardImg = heroCardImgs[index]; 
714                        var heroCardSrc = heroCardImg.getAttribute("src"); 
715                        if(heroCardSrc != "") { 
716                            resizeImg(heroCardImg); 
717
718
719                    if (ameriprise == "yes") { 
720                        var bankercode_amp = '${bCode}'; 
721                        eidAmp = bankercode_amp.substring(3); 
722                        locationCode =""; 
723                        document.title = "Ameriprise Financial Credit Card Overview Page"; 
724                    } else { 
725                        document.title = partnerName + " Credit Card Index Page"; 
726
727                     
728                    var lc = '${lc!0}'; 
729 
730                    var regex = /\d+/g; 
731                    var bdNumber = "${bPhone!''}"; 
732                    var phoneNum = bdNumber.match(regex); 
733                    var areaCode = ""; 
734                    var exchangeCode = ""; 
735                    var num = ""; 
736                    if(phoneNum != null) { 
737                        phoneNum = phoneNum.join(""); 
738                        areaCode = phoneNum.substring(0,3); 
739                        exchangeCode = phoneNum.substring(3,6); 
740                        num = phoneNum.substring(6,10); 
741
742 
743                        /* update SiteCatalyst data object */ 
744                    reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
745                    reportingData.page_type = 'product';  
746                    reportingData.site_section = 'credit cards'; 
747                    reportingData.platform = 'microsite'; 
748                    reportingData.campaign_id = '${campaignId}'; 
749                    reportingData.location_code = '${rLC!0}'; 
750                    reportingData.partner_name = "${partnerName}"; 
751                    reportingData.product = 'All Cards'; 
752                    reportingData.text_to_apply_source = '${text_to_apply_source}'; 
753                    reportingData.visitor_type = 'prospect';         
754                    reportingData.Banker_id = '${boeid}'; 
755                    reportingData.Banker_code = '${bCode}'; 
756 
757                                                     
758                    /* SiteCatalyst  pageView tracking */ 
759                    AUI().ready(function() { 
760                        if (window.publisherFW) { 
761                            //console.log('reportingData', reportingData); 
762                            window.publisherFW.publishEvent("pageView", reportingData); 
763
764                    });  
765 
766                                     
767                    $('.jn-button').removeAttr('disabled'); 
768                    $('.jn-button').removeClass('jn-disabled'); 
769 
770                    jQuery('.applyNowLink').on('click', function(e){ 
771                        $(this).closest('.BAAForm').submit(); 
772                        ga("send", { 
773                            hitType: "event", 
774                            eventAction: "ApplyNow", 
775                            eventCategory: "click", 
776                            eventLabel: "BottomButton" 
777                        }); 
778                        return false; 
779                    }); 
780                    jQuery(".BAAForm").on("submit", function(e){ 
781                        e.preventDefault(); 
782                        console.log("in custom submit"); 
783                        var xmlData; 
784                        if(ameriprise == "yes") { 
785                            xmlData = '<?xml version="1.0"?>'+ 
786                                "<prefillData>"+  
787                                "<versionNumber>1.0</versionNumber>"+  
788                                "<applicationData>"+  
789                                "<referral>" +  
790                                "<employeeId>" + eidAmp + "</employeeId>" + 
791                                "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
792                                "<divisionNumber></divisionNumber>"+ 
793                                "</referral>" +  
794                                "<bankerInformation>"+  
795                                "<locationCode>" + locationCode + "</locationCode>"+ 
796                                "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
797                                "<employeeID>${boeid!0}</employeeID>"+ 
798                                "<name>" + 
799                                "<first>${bFName!'0'}</first>" + 
800                                "<last>${bLName!'0'}</last>" + 
801                                "</name>"+ 
802                                "<phone>"+ 
803                                "<areaCode>"+areaCode+"</areaCode>"+  
804                                "<exchange>"+exchangeCode+"</exchange>"+ 
805                                "<number>"+num+"</number>"+  
806                                "</phone>"+  
807                                "</bankerInformation>"+  
808                                "</applicationData>"+  
809                                "</prefillData>" 
810                        } else { 
811                            xmlData = '<?xml version="1.0"?>'+ 
812                                "<prefillData>"+  
813                                "<versionNumber>1.0</versionNumber>"+  
814                                "<applicationData>"+  
815                                "<bankerInformation>"+  
816                                "<locationCode>" + locationCode + "</locationCode>"+ 
817                                "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
818                                "<employeeID>${boeid!0}</employeeID>"+ 
819                                "<name>" + 
820                                "<first>${bFName!'0'}</first>" + 
821                                "<last>${bLName!'0'}</last>" + 
822                                "</name>"+ 
823                                "<phone>"+ 
824                                "<areaCode>"+areaCode+"</areaCode>"+  
825                                "<exchange>"+exchangeCode+"</exchange>"+ 
826                                "<number>"+num+"</number>"+  
827                                "</phone>"+  
828                                "</bankerInformation>"+  
829                                "</applicationData>"+  
830                                "</prefillData>" 
831
832                        $(this).children(".appDataBAA").val(xmlData); 
833                        var buttonName = $(this).find(".apply-now-button").data("button-name"); 
834                        var productName = $(this).find(".apply-now-button").data("product-name"); 
835                        /* SiteCatalyst  onClick tracking */ 
836                        reportingData.apply_button = buttonName; 
837                        reportingData.product = productName; 
838 
839                        if (window.publisherFW) { 
840                            console.log('clicked', reportingData); 
841                            window.publisherFW.publishEvent("onClick", reportingData); 
842
843 
844                        this.submit(); 
845                    });                                                                
846                     
847 
848                }); 
849                function resizeImg(img) { 
850                    img.addEventListener("load", function() { 
851                        var cardImgWidth = img.width; 
852                        var cardImgHeight = img.height; 
853                        console.log('width', cardImgWidth); 
854                        console.log('height', cardImgHeight); 
855                        if(cardImgWidth > cardImgHeight) { 
856                            img.style.width = "285px"; 
857                        } else { 
858                            img.style.width = "150px"; 
859
860                    }); 
861
862            </script>                    
863                 
864        </#if>  
865    </#if> 
866</#if> 

Webcontent weergeven

Er trad een fout op tijdens de verwerking van het sjabloon.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10154#10192#153411744.
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    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
28    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
29 
30    <#assign clientProfile = clientProfileList?first>  
31    <#assign partnerName=clientProfile.getMarketingNameLong()> 
32 
33 
34    <div class="jn-disclaimer tier1-disclaimer-${class.getData()}" title="${partnerName} - Disclaimer"> 
35        <div class="disclaimer" > 
36            ${content.getData()} 
37        </div> 
38    </div> 
39</#if> 

Webcontent weergeven

Er trad een fout op tijdens de verwerking van het sjabloon.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10154#10192#153411744.
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    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
28    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
29 
30    <#assign clientProfile = clientProfileList?first>  
31    <#assign partnerName=clientProfile.getMarketingNameLong()> 
32 
33 
34    <div class="jn-disclaimer tier1-disclaimer-${class.getData()}" title="${partnerName} - Disclaimer"> 
35        <div class="disclaimer" > 
36            ${content.getData()} 
37        </div> 
38    </div> 
39</#if> 

Webcontent weergeven

Er trad een fout op tijdens de verwerking van het sjabloon.
Expression qstringmap["bankercode"] is undefined on line 6, column 17 in 10154#10192#155404885.
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<#assign url404 = '/error/404.html'> 
5 
6<#assign bCode= qstringmap["bankercode"]?first> 
7<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
8<#list bData as b>      
9    <#assign lc = b.locationcode > 
10    <#assign rLC = b.reallocationcode > 
11    <#assign mappedLC = b.mappedLocationCode > 
12</#list>  
13 
14<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
15    <#assign ameriprise = true> 
16<#else> 
17    <#assign ameriprise = false> 
18</#if> 
19<#if mappedLC?has_content && !ameriprise> 
20    <#assign lc = mappedLC > 
21</#if> 
22 
23<#if lc?has_content> 
24 
25    <#assign prefix = "00000" > 
26    <#assign lcWithPrefix = prefix + lc > 
27    <#assign withPrefixLength = lcWithPrefix?length > 
28    <#assign startHere = withPrefixLength - 5> 
29    <#assign lc = lcWithPrefix?substring(startHere)> 
30    <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") > 
31    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
32 
33    <#assign clientProfile = clientProfileList?first> 
34    <#assign pbu = clientProfile.getPbu()> 
35    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>   
36    <#assign partnerName=clientProfile.getMarketingNameLong()> 
37    <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") > 
38    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
39    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
40    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")> 
41        <#-- add protocal if missing  --> 
42        <#assign partnerUrl = 'https://' + partnerUrl> 
43    </#if> 
44    <footer class="footer bg-color-black text-color-white"> 
45        ${footerContent.getData()} 
46    </footer> 
47    <#if url?contains("11t1m")> 
48        <script>                 
49            document.querySelector('.footer .copyright').classList.add("ecdma-footer-client-name-copyright"); 
50            document.querySelector('.footer .fdic').innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?loc=18598" target="_blank">Privacy and Security</a>'; 
51        </script> 
52    <#else> 
53        <script>                 
54            document.querySelector('.footer .copyright').classList.add("ecdma-footer-client-name-copyright"); 
55            document.querySelector('.footer .fdic').innerHTML='<a class="text-color-white" href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?loc=${lc!0}" target="_blank">Privacy and Security</a>'; 
56            var newNode = document.createElement("div");  
57             newNode.classList.add("member-agreement"); 
58            newNode.innerHTML='<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>'; 
59            var fdicNode = document.querySelector('.footer .fdic'); 
60            var parent = fdicNode.parentNode; 
61            parent.insertBefore(newNode, fdicNode); 
62        </script> 
63    </#if> 
64 
65    <#if partnerUrl?has_content> 
66        <script> 
67            document.querySelector('.copyright .homelink').innerHTML="<a class='text-color-white' href='${partnerUrl!''}' title='${partnerName!''}' target='_blank'>Home</a>"; 
68        </script> 
69    </#if> 
70</#if>