Web sisällön esitys

Web sisällön esitys

Virhe tapahtui prosessoidessa esityspohjaa.
Expression qstringmap["bankercode"] is undefined on line 8, column 17 in 10153#10191#5883698.
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('crcDDCBankerAssistedAppDetail','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('crcDDCBankerAssistedApp','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 clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
55    <#assign logoFileName = clientProfile.getLogoBFormat1()> 
56    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
57    <#if pbu == "0864054"> 
58        <#assign override = "berkshire"> 
59    <#else> 
60        <#assign override = " "> 
61    </#if> 
62    <#--  this one should be delete for prod  --> 
63                 
64        <#assign cdnLogoUrl = "https://4f61efb10f32ceb57895-3733e103896f37259213d6ad72acbe68.ssl.cf2.rackcdn.com">   
65        <#assign logoFileName = pbu + "-" + subbu + ".png"> 
66 
67    <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
68    <#if (subbu_special?has_content)> 
69        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
70        <script> 
71            console.log('new subbu', '${subbu_special!''}'); 
72        </script>  
73    <#else> 
74        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
75    </#if> 
76    <#assign temp = []> 
77    <#assign consumerCards = []> 
78    <#assign businessCards = []>  
79    <#assign offerTypeList = []>       
80    <#assign index = 0> 
81    <#assign ameriprise_cards= []> 
82    <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']> 
83    <#assign businessOfferTypes =['144', '128', '143', '121', '123']> 
84    <#list fiCardsData as fib> 
85        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
86            <#assign offerTypeList = offerTypeList + [fib.offerType]> 
87            <#assign temp = temp + fiCardsData[index..index]>    
88            <#if ameriprise> 
89                <#if (fib.offerType == "101" || fib.offerType == "103")> 
90                    <#assign ameriprise_cards= ameriprise_cards + fiCardsData[index..index]> 
91                </#if>                      
92            <#else> 
93                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
94                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
95                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
96                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
97                </#if>             
98            </#if>                 
99        </#if>  
100        <#assign index = index + 1>   
101                     
102    </#list>        
103    <#assign fiCardsData = temp> 
104    <#if ameriprise> 
105        <#assign consumerCards = ameriprise_cards?sort_by("offerType")> 
106    </#if> 
107 
108    <#if (fiCardsData?size > 0)>   
109        <#if (subbu_special?has_content)> 
110            <#assign lc_used = fiCardsData?first.WebLocationCode>   
111        <#else> 
112            <#if ameriprise> 
113                <#assign lc_used = mappedLC>  
114            <#else> 
115                <#assign lc_used = lc>  
116            </#if> 
117        </#if>               
118        <#assign offerId = ""> 
119        <#assign sourceCode = ""> 
120        <#assign cardArtImage = ""> 
121        <#assign productUrl = ""> 
122        <#assign product = ""> 
123        <#assign preparerType = "customer"> 
124        <#assign apr = ""> 
125        <#assign cardIndex = 0>   
126        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
127            <#if (offerTypeList?seq_contains("104")) > 
128                <#list consumerCards as card> 
129                    <#if (card.offerType=="104")> 
130                        <#assign offerId = card.offerId> 
131                        <#assign sourceCode = card.sourceCode> 
132                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
133                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
134                        <#assign productUrl="max-cash"> 
135                        <#assign product="Max Cash"> 
136                        <#assign cardIndex = 0> 
137                    </#if> 
138                </#list> 
139            <#else> 
140                <#assign displayedCard = consumerCards[0]> 
141                <script> 
142                    console.log('dispalyed card:','${displayedCard.offerType}'); 
143                </script> 
144                <#assign offerId = displayedCard.offerId> 
145                <#assign sourceCode = displayedCard.sourceCode> 
146                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
147                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
148                <#if ameriprise> 
149                    <#if (displayedCard.offerType == "101")> 
150                        <#assign productUrl="ameriprise-premier-visa-signature"> 
151                        <#assign product="Premier Visa Signature"> 
152                        <#assign cardIndex = 0> 
153                    <#elseif (displayedCard.offerType == "103")> 
154                        <#assign productUrl = "ameriprise-visa-signature"> 
155                        <#assign product="Visa Signature"> 
156                        <#assign cardIndex = 1> 
157                    </#if> 
158                <#else> 
159                        <#if (displayedCard.offerType == "101" || displayedCard.offerType == "103")> 
160                            <#assign productUrl="real-rewards"> 
161                            <#assign product="Real Rewards"> 
162                            <#assign cardIndex = 1>                           
163                        <#elseif (displayedCard.offerType == "108" || displayedCard.offerType == "109")> 
164                            <#assign productUrl = "consumer-platinum"> 
165                            <#assign product="Platinum">    
166                            <#assign cardIndex = 2>    
167                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
168                            <#if (scrapedData?size > 0)> 
169                                <#list scrapedData as sItem> 
170                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
171                                        <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
172                                        <#break> 
173                                    </#if> 
174                                </#list> 
175                                <script> 
176                                    $(document).ready(function () { 
177                                        var aprText = "${apr}"; 
178                                        if (aprText) { 
179                                            try { 
180                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
181                                                var billing_cycle = matches[1]; 
182                                                var apr_min = apr_min = matches[2]; 
183                                                var apr_max = apr_max = matches[3]; 
184                                                if (billing_cycle) { 
185                                                    $(".scraped-billing-cycle").html(billing_cycle); 
186
187                                                if (apr_min) { 
188                                                    $(".scraped-apr-min").html(apr_min); 
189
190                                                if (apr_max) { 
191                                                    $('.scraped-apr-max').html(apr_max); 
192
193 
194                                            } catch (e) { 
195                                                console.log(e); 
196
197
198                                    }); 
199                                </script> 
200                            </#if>                                                     
201                        <#elseif (displayedCard.offerType == "115")> 
202                            <#assign productUrl = "secured"> 
203                            <#assign product="Secured"> 
204                            <#assign cardIndex = 3> 
205                        </#if> 
206                </#if> 
207            </#if> 
208        </#if> 
209        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
210            <#if (offerTypeList?seq_contains("144")) > 
211                <#list businessCards as card> 
212                    <#if (card.offerType=="144")> 
213                        <#assign offerId = card.offerId> 
214                        <#assign sourceCode = card.sourceCode> 
215                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
216                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
217                        <#assign productUrl="smart-business-rewards"> 
218                        <#assign product="Smart Business Rewards"> 
219                        <#assign cardIndex = 0> 
220                    </#if> 
221                </#list> 
222            <#else> 
223                <#assign displayedCard = businessCards[0]> 
224                <#assign offerId = displayedCard.offerId> 
225                <#assign sourceCode = displayedCard.sourceCode> 
226                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
227                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
228 
229                <#if (displayedCard.offerType=="143")> 
230                    <#assign productUrl="business-real-rewards"> 
231                    <#assign product="Business Real Rewards"> 
232                    <#assign cardIndex = 0>    
233                <#elseif (displayedCard.offerType=="128")> 
234                    <#assign productUrl = "business-cashback"> 
235                    <#assign product="Business Cash"> 
236                    <#assign cardIndex = 1>                     
237                <#elseif (displayedCard.offerType=="121")> 
238                    <#assign productUrl = "visa-business"> 
239                    <#assign product="Visa Business"> 
240                    <#assign cardIndex = 3> 
241                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
242                    <#if (scrapedData?size > 0)> 
243                        <#list scrapedData as sItem> 
244                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
245                                <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
246                                <#break> 
247                            </#if> 
248                        </#list> 
249                        <script> 
250                            $(document).ready(function () { 
251                                var aprText = "${apr}"; 
252                                if (aprText) { 
253                                    try { 
254                                        var matches= aprText.match(/\d+(\.\d+)?%?/g); 
255                                        var billing_cycle = matches[1]; 
256                                        var apr_min = apr_min = matches[2]; 
257                                        var apr_max = apr_max = matches[3]; 
258                                        if (billing_cycle) { 
259                                            $(".scraped-billing-cycle").html(billing_cycle); 
260
261                                        if (apr_min) { 
262                                            $(".scraped-apr-min").html(apr_min); 
263
264                                        if (apr_max) { 
265                                            $('.scraped-apr-max').html(apr_max); 
266
267 
268                                    } catch (e) { 
269                                        console.log(e); 
270
271
272                            }); 
273                        </script> 
274                    </#if>                       
275                </#if> 
276            </#if> 
277        </#if>    
278        <#if product != ""> 
279            <#if ameriprise> 
280                <#assign card_art_alt =  partnerName + " " + product + " Card"> 
281                <#assign rollover_text =  partnerName + " " + product + " Card"> 
282            <#else> 
283                <#assign card_art_alt = partnerName> 
284                <#assign rollover_text =  partnerName + " " + product + " Credit Card"> 
285            </#if>  
286        </#if>  
287        <div class="jn-hero-container product-${productUrl} tier1-hero-${class.getData()}" title="${rollover_text!''}"> 
288            <div class="hero-main"> 
289                <div class="hero-main-logo"> 
290                    <#if partnerUrl?has_content> 
291                        <a href="${partnerUrl!''}" title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
292                    <#else> 
293                        <a title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
294                    </#if> 
295                </div> 
296                <div class="hero-main-container"> 
297                    <div class="hero-main-offer bg-color-white"> 
298                        <div class="offer-header bg-color-black text-color-white text-bold">${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
299                        <div class="offer-detail"> 
300                            <div class="offer-detail-head">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
301                            <div class="offer-detail-text text-color-default"> 
302                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()} 
303                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()} 
304                            </div> 
305                            <div class="offer-detail-cardArt">                                                  
306                                <img src="${cardArtImage!''}" alt="${card_art_alt!''}" srcset="" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
307                            </div> 
308                            <#if ameriprise> 
309                                <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>                                 
310                            <#else>  
311                                <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm"> 
312                                    <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
313                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
314                                    <input type="submit" data-button-name="cta-button-top"  data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card" 
315                                        class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled /> 
316                                </form> 
317                            </#if> 
318                        </div> 
319                    </div> 
320                </div> 
321            </div> 
322        </div>   
323 
324    </#if> 
325</#if> 

Web sisällön esitys

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

Web sisällön esitys

Virhe tapahtui prosessoidessa esityspohjaa.
Expression qstringmap["bankercode"] is undefined on line 5, column 17 in 10153#10191#5843858.
1<#assign url = request.attributes.CURRENT_URL > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")> 
4 
5<#assign bCode= qstringmap["bankercode"]?first> 
6<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
7<#list bData as b>      
8    <#assign lc = b.locationcode > 
9    <#assign rLC = b.reallocationcode > 
10    <#assign mappedLC = b.mappedLocationCode > 
11</#list>  
12<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
13    <#assign ameriprise = true> 
14<#else> 
15    <#assign ameriprise = false> 
16</#if> 
17<#if mappedLC?has_content && !ameriprise> 
18    <#assign lc = mappedLC > 
19</#if> 
20 
21<#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="content-container" title="${partnerName} - Disclaimer"> 
35        <div class="jn-disclaimer tier1-disclaimer-${class.getData()}"> 
36            ${content.getData()} 
37        </div> 
38    </div> 
39</#if> 

Web sisällön esitys

Virhe tapahtui prosessoidessa esityspohjaa.
Expression qstringmap["bankercode"] is undefined on line 6, column 17 in 10153#10191#5843861.
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('crcDDCBankerAssistedAppDetail','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>