Artikkel

Artikkel

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

Artikkel

En feil oppsto under behandling av visningsmalen.
Expression qstringmap["bankercode"] is undefined on line 29, column 17 in 10154#10192#154098159.
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-platinum2103"> 
203                                        <#assign product="Platinum"> 
204                                        <#assign cardIndex = 2> 
205                                         
206                                        <#break> 
207                                    <#case "109"> 
208                                        <#assign productName = "consumer-platinum2103"> 
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}&offerId=${fib.offerId}&preparerType=customer&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}&offerId=${fib.offerId}&preparerType=customer&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&offerId=${fib.offerId}&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 tag="1">1</sup> for Purchases and Balance Transfers: </strong> 
297                                                            ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
298                                                        </p> 
299                                                    </li> 
300                                                     <#elseif (fib.offerType== "101")> 
301                                                    <li class="${fib.offerType}"> 
302                                                        <p> 
303                                                                <strong>Intro APR<sup class="tag-1">1</sup> for Purchases and Balance Transfers: </strong> 
304                                                            ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
305                                                        </p> 
306                                                    </li> 
307                                                <#else> 
308                                                    <li class="${fib.offerType}"> 
309                                                        <p> 
310                                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
311                                                            ${APR!''} <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
312                                                        </p> 
313                                                    </li> 
314                                                </#if> 
315                                            </#if> 
316                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
317                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
318                                                    <li>${marketingInfo.getData()}</li> 
319                                                </#list> 
320                                            </#if> 
321                                            <#if !ameriprise> 
322                                                <li> 
323                                                    <p>Annual Fee: ${AMF!''} <a  href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}"  target="_blank">Terms & Conditions</a></p> 
324                                                </li> 
325                                            </#if> 
326                                        </ul> 
327                                    </div> 
328                            </div> 
329 
330                               
331                        </#list> 
332                    </div> 
333                     
334                </div> 
335                 
336                </#if> 
337                <#if (businessCards?size > 0)>  
338                    <div class="tab-more-wrapper">    
339                        <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products"> 
340                             
341                            <#list businessCards as fib> 
342                                    <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> 
343                                    <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
344                                    <#switch fib.offerType> 
345                                        <#case "144"> 
346                                            <#assign productName = "smart-business-rewards"> 
347                                            <#assign product="Smart Business Rewards"> 
348                                            <#assign cardIndex = 4> 
349                                            <#break> 
350                                        <#case "128"> 
351                                            <#assign productName = "business-cashback"> 
352                                            <#assign product="Business Cash"> 
353                                            <#assign cardIndex = 5> 
354                                            <#break> 
355                                        <#case "143"> 
356                                            <#assign productName = "business-real-rewards"> 
357                                            <#assign product="Business Real Rewards"> 
358                                            <#assign cardIndex = 6> 
359                                            <#break> 
360                                        <#case "121"> 
361                                            <#assign productName = "business-platinum2103"> 
362                                            <#assign product="Business Card"> 
363                                            <#assign cardIndex = 7> 
364                                            <#break> 
365                                        <#default> 
366                                    </#switch> 
367                                    <#assign APR=""> 
368                                    <#assign AMF=""> 
369                                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
370                                    <#if (scrapedData?size > 0)> 
371                                        <#list scrapedData as sItem> 
372                                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
373                                                <#assign APR = sItem.scrapedValue> 
374                                            <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
375                                                <#assign AMF = sItem.scrapedValue> 
376                                            </#if> 
377                                            <#if (APR?has_content && AMF?has_content)> 
378                                                <#break> 
379                                            </#if> 
380                                        </#list> 
381                                    </#if> 
382                                     
383                                <div class="jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
384                                    <img src="${cardArtImage!''}"  alt="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
385                                    <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
386                                    <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
387                                    <ul class="actions">                                     
388                                        <li> 
389                                            <form action="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}" method="post" class="BAAForm"> 
390                                                <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
391                                                <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea>                                         
392                                                <a class="applyNowLink apply-now-button"  
393                                                href="${oadURL}?locationCode=${lc_used}&offerId=${fib.offerId}&preparerType=customer&sourceCode=${fib.sourceCode}"  
394                                                data-button-name="apply-now-link" data-product-name="${productName}" 
395                                                title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
396                                            </form> 
397                                        </li> 
398                                        <li><a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a></li> 
399                                    </ul> 
400                                    <div class="jn-additional"> 
401                                        <ul> 
402                                            <#if (fib.offerType == "144")> 
403                                                <li> 
404                                                    <p> 
405                                                        <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
406                                                        ${APR!''} 
407                                                        <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
408                                                    </p> 
409                                                </li> 
410                                            <#else> 
411                                                <li> 
412                                                    <p> 
413                                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
414                                                        ${APR!''} 
415                                                        <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
416                                                    </p> 
417                                                </li> 
418                                            </#if> 
419                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
420                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
421                                                    <li>${marketingInfo.getData()}</li> 
422                                                </#list> 
423                                            </#if> 
424                                            <li><p>Annual Fee: ${AMF!''} <a 
425                                                href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc_used}" target="_blank">Terms & Conditions</a></p> 
426                                            </li> 
427                                        </ul> 
428                                    </div> 
429                                </div> 
430                                 
431                            </#list> 
432                             
433                        </div> 
434                    </div> 
435                </#if>  
436                    <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> 
437                    <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> 
438            </div> 
439            <script> 
440                var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
441                var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
442                $(document).ready(function () { 
443                    var banker_code = "${bCode!''}"; 
444                    var tabs=$('.tab-nav'); 
445                    var slideDiv = $('.jn-tab-content.active');                    
446                    var screenWidthMobile = 768; 
447                    var screenWidth = window.innerWidth; 
448 
449                    if (tabs.length == 1) { 
450                        if ($(consumerSelector).length > 0) { 
451                            if(banker_code && (banker_code.indexOf("amp") == 0) && (banker_code.length > 6)) { 
452                                $("nav.jn-primary-nav").hide(); 
453                                changeCardLayout(consumerSelector); 
454                                createMetaTag("consumer"); 
455                            } else { 
456                                hideHeroAndDisclaimer('business'); 
457                                showHeroAndDisclaimer('consumer'); 
458                                changeCardLayout(consumerSelector); 
459                                renumberFootnote("consumer"); 
460                                createMetaTag("consumer");  
461
462                        }  
463                        if ($(businessSelector).length > 0) { 
464                            $(businessSelector).addClass('active'); 
465                            hideHeroAndDisclaimer('consumer'); 
466                            showHeroAndDisclaimer('business'); 
467                            changeCardLayout(businessSelector); 
468                            renumberFootnote("business"); 
469                            createMetaTag("business");  
470
471                        if(screenWidth > screenWidthMobile) { 
472                            if ($("#consumerTab").length > 0) { 
473                                if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
474                                    $('.more-link').show(); 
475                                } else { 
476                                    $('.more-link').hide(); 
477                                    $('.less-link').hide(); 
478
479                            } else if ($("#businessTab").length > 0) { 
480                                if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
481                                    $('.more-link').show(); 
482                                } else { 
483                                    $('.more-link').hide(); 
484                                    $('.less-link').hide(); 
485
486
487 
488                        }  
489
490                    if (tabs.length == 2) { 
491                        renumberFootnote("consumer"); 
492                        renumberFootnote("business"); 
493                        createMetaTag("consumer"); 
494                        if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
495                            changeCardLayout(consumerSelector); 
496
497                        if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
498                            changeCardLayout(businessSelector); 
499
500                        if(screenWidth > screenWidthMobile) { 
501                            if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
502                                $('.more-link').show(); 
503                            } else { 
504                                $('.more-link').hide(); 
505                                $('.less-link').hide(); 
506
507                          
508                            $(tabs).click(function(){ 
509                                if ($(this).attr('id') === "consumerTab") { 
510                                    if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
511                                        slideDiv = $('.jn-tab-content.active'); 
512                                        $(slideDiv).removeClass('transition-left'); 
513                                        $('.less-link').hide(); 
514                                        $('.more-link').show(); 
515                                    } else { 
516                                        $('.less-link').hide(); 
517                                        $('.more-link').hide(); 
518
519
520 
521                                if ($(this).attr('id') === "businessTab") { 
522                                    if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
523                                        slideDiv = $('.jn-tab-content.active'); 
524                                        $(slideDiv).removeClass('transition-left'); 
525                                        $('.less-link').hide(); 
526                                        $('.more-link').show(); 
527                                    } else { 
528                                        $('.less-link').hide(); 
529                                        $('.more-link').hide(); 
530
531
532                            }); 
533                                
534
535                        var tabsNav = document.querySelectorAll('.tab-nav'); 
536                        togglePrimaryNav(tabsNav); 
537 
538
539                    $('.more-link, .less-link').click(function(e){ 
540                        e.preventDefault(); 
541                    }); 
542                    $('.more-link').click(function(){ 
543                        slideDiv = $('.jn-tab-content.active'); 
544                        $(slideDiv).addClass('transition-left'); 
545                        $('.less-link').show(); 
546                        $(this).hide(); 
547                    }); 
548                    $('.less-link').click(function(){ 
549                        slideDiv = $('.jn-tab-content.active'); 
550                        $(slideDiv).removeClass('transition-left'); 
551                        $(this).hide(); 
552                        $('.more-link').show(); 
553                    }); 
554                }); 
555                // Primary Nav function 
556                 
557                function togglePrimaryNav(elem) { 
558                    for (var i = 0; i < elem.length; i++) { 
559                        elem[i].addEventListener("click", function(e) { 
560 
561                            var current = this, 
562                                allSections = document.querySelectorAll('[data-id]'), 
563                                section = document.querySelector("[data-id='"+ current.id +"']"); 
564 
565                            for (var a = 0; a < allSections.length; a++) { 
566                                allSections[a].classList.remove('active'); 
567
568                            for (var c = 0; c < elem.length; c++) { 
569                                if (current != elem[c]) { 
570                                    elem[c].classList.remove('active'); 
571                                } else { 
572                                    current.classList.add('active'); 
573                                    section.classList.add('active'); 
574                                    hideHeroAndDisclaimer('consumer'); 
575                                    hideHeroAndDisclaimer('business'); 
576                                    if(current.getAttribute('id') === "consumerTab"){ 
577                                        showHeroAndDisclaimer('consumer'); 
578                                    } else if(current.getAttribute('id') === "businessTab"){ 
579                                        showHeroAndDisclaimer('business'); 
580
581
582
583                            e.preventDefault(); 
584                        }); 
585
586
587 
588                function renumberFootnote(type) { 
589                    var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
590                    var disclaimerSelector = '.tier1-disclaimer-landing-' + type; 
591                    var heroSelector = '.tier1-hero-landing-' + type; 
592                    var numOfFootnote = $(disclaimerSelector + ' sup').length; 
593                    var showList = []; 
594                    var hideList=[]; 
595                    for (var i = 1; i <= numOfFootnote; i++) { 
596                    var cssClass="tag-" + i; 
597                    if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
598                        showList.push(i);      
599                    } else { 
600                        hideList.push(i); 
601
602                    }  
603                    for (var i = 1; i < showList.length + 1; i++) { 
604                        if(showList[i-1] != i) { 
605                            var className="tag-" + showList[i-1]; 
606                            $(heroSelector).find("." +  className).html(i); 
607                            // $(discriptionSelector).find("." +  className).html(i); 
608                            $(disclaimerSelector).find("." +  className).html(i); 
609
610
611                    for (var i = 0; i <hideList.length; i++) { 
612                        var cname="tag-" + hideList[i]; 
613                        $(disclaimerSelector).find("." + cname).parent().hide(); 
614                    }    
615
616 
617                function changeCardLayout(cssSelector) { 
618                    var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
619                    if(numOfCards == 1) { 
620                        $(cssSelector).addClass('one-card'); 
621                    } else if (numOfCards == 2) { 
622                        $(cssSelector).addClass('two-card'); 
623                    }   
624
625                function hideHeroAndDisclaimer(type) { 
626                    try { 
627                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('show'); 
628                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('hide'); 
629                    } catch (e) { 
630                        console.log(e); 
631
632 
633                    try { 
634                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('show'); 
635                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('hide');  
636                    } catch (e) { 
637                        console.log(e); 
638
639 
640
641                function showHeroAndDisclaimer(type) { 
642                    try { 
643                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('show'); 
644                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('hide'); 
645                    } catch (e) { 
646                        console.log(e); 
647
648                     
649                    try { 
650                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('show'); 
651                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('hide');  
652                    } catch (e) { 
653                        console.log(e); 
654
655 
656
657                function createMetaTag(type) { 
658                    var partnerName = "${partnerName!0}"; 
659                    var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
660                    var metaDesc = ""; 
661                    if (type == "consumer") {     
662                        if(location.pathname.indexOf("11t1m") != -1) { 
663                            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." 
664                        } else {                                    
665                            if(product_name ==  "consumer-platinum2103") { 
666                                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."; 
667                            } else if(product_name ==  "real-rewards") { 
668                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
669                            } else if(product_name ==  "secured") { 
670                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
671                            } else if(product_name ==  "max-cash") { 
672                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select."; 
673
674
675 
676                    } else if (type == "business") { 
677                        if(product_name ==  "business-cashback") {               
678                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
679                        } else if(product_name ==  "business-real-rewards") { 
680                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
681                        } else if(product_name ==  "business-visa") { 
682                            metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
683                        } else if(product_name ==  "smart-business-rewards") { 
684                            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."; 
685
686
687                    var m = document.createElement('meta');  
688                    m.name = 'description';  
689                    m.content = metaDesc;  
690                    document.head.appendChild(m); 
691
692                function goToByScroll(id) { 
693                    var element = document.getElementById(id); 
694                    element.scrollIntoView(true); 
695
696                function slideAmount(length) { 
697 
698
699                 
700            </script> 
701            <script> 
702                    var reportingData = {}; 
703                document.addEventListener('DOMContentLoaded', function() { 
704                    console.log('inside ready'); 
705                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
706                    var hostName = location.hostname;                                     
707                    function getDomainFromHostname(hostname) { 
708                        var parts = hostname.split('.'); 
709                        return parts.length === 3 ? parts[1] : parts[0]; 
710
711                    var domain = getDomainFromHostname(hostName); 
712                    var partnerName = "${partnerName!0}"; 
713                    var ameriprise = '${ameriprise?string("yes", "no")}'; 
714                    var locationCode = "${rLC!lc}"; 
715                    var eidAmp = ""; 
716                    if (ameriprise == "yes") { 
717                        var bankercode_amp = '${bCode}'; 
718                        eidAmp = bankercode_amp.substring(3); 
719                        locationCode =""; 
720                        document.title = "Ameriprise Financial Credit Card Overview Page"; 
721                    } else { 
722                        document.title = partnerName + " Credit Card Index Page"; 
723
724                     
725                    var lc = '${lc!0}'; 
726 
727                    var regex = /\d+/g; 
728                    var bdNumber = "${bPhone!''}"; 
729                    var phoneNum = bdNumber.match(regex); 
730                    var areaCode = ""; 
731                    var exchangeCode = ""; 
732                    var num = ""; 
733                    if(phoneNum != null) { 
734                        phoneNum = phoneNum.join(""); 
735                        areaCode = phoneNum.substring(0,3); 
736                        exchangeCode = phoneNum.substring(3,6); 
737                        num = phoneNum.substring(6,10); 
738
739 
740                        /* update SiteCatalyst data object */ 
741                    reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
742                    reportingData.page_type = 'product';  
743                    reportingData.site_section = 'credit cards'; 
744                    reportingData.platform = 'microsite'; 
745                    reportingData.campaign_id = '${campaignId}'; 
746                    reportingData.location_code = '${rLC!0}'; 
747                    reportingData.partner_name = "${partnerName}"; 
748                    reportingData.product = 'All Cards'; 
749                    reportingData.text_to_apply_source = '${text_to_apply_source}'; 
750                    reportingData.visitor_type = 'prospect';         
751                    reportingData.Banker_id = '${boeid}'; 
752                    reportingData.Banker_code = '${bCode}'; 
753 
754                                                     
755                    /* SiteCatalyst  pageView tracking */ 
756                    AUI().ready(function() { 
757                        if (window.publisherFW) { 
758                            //console.log('reportingData', reportingData); 
759                            window.publisherFW.publishEvent("pageView", reportingData); 
760
761                    });  
762 
763                                     
764                    $('.jn-button').removeAttr('disabled'); 
765                    $('.jn-button').removeClass('jn-disabled'); 
766 
767                    jQuery('.applyNowLink').on('click', function(e){ 
768                        $(this).closest('.BAAForm').submit(); 
769                        ga("send", { 
770                            hitType: "event", 
771                            eventAction: "ApplyNow", 
772                            eventCategory: "click", 
773                            eventLabel: "BottomButton" 
774                        }); 
775                        return false; 
776                    }); 
777                    jQuery(".BAAForm").on("submit", function(e){ 
778                        e.preventDefault(); 
779                        console.log("in custom submit"); 
780                        var xmlData; 
781                        if(ameriprise == "yes") { 
782                            xmlData = '<?xml version="1.0"?>'+ 
783                                "<prefillData>"+  
784                                "<versionNumber>1.0</versionNumber>"+  
785                                "<applicationData>"+  
786                                "<referral>" +  
787                                "<employeeId>" + eidAmp + "</employeeId>" + 
788                                "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
789                                "<divisionNumber></divisionNumber>"+ 
790                                "</referral>" +  
791                                "<bankerInformation>"+  
792                                "<locationCode>" + locationCode + "</locationCode>"+ 
793                                "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
794                                "<employeeID>${boeid!0}</employeeID>"+ 
795                                "<name>" + 
796                                "<first>${bFName!'0'}</first>" + 
797                                "<last>${bLName!'0'}</last>" + 
798                                "</name>"+ 
799                                "<phone>"+ 
800                                "<areaCode>"+areaCode+"</areaCode>"+  
801                                "<exchange>"+exchangeCode+"</exchange>"+ 
802                                "<number>"+num+"</number>"+  
803                                "</phone>"+  
804                                "</bankerInformation>"+  
805                                "</applicationData>"+  
806                                "</prefillData>" 
807                        } else { 
808                            xmlData = '<?xml version="1.0"?>'+ 
809                                "<prefillData>"+  
810                                "<versionNumber>1.0</versionNumber>"+  
811                                "<applicationData>"+  
812                                "<bankerInformation>"+  
813                                "<locationCode>" + locationCode + "</locationCode>"+ 
814                                "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
815                                "<employeeID>${boeid!0}</employeeID>"+ 
816                                "<name>" + 
817                                "<first>${bFName!'0'}</first>" + 
818                                "<last>${bLName!'0'}</last>" + 
819                                "</name>"+ 
820                                "<phone>"+ 
821                                "<areaCode>"+areaCode+"</areaCode>"+  
822                                "<exchange>"+exchangeCode+"</exchange>"+ 
823                                "<number>"+num+"</number>"+  
824                                "</phone>"+  
825                                "</bankerInformation>"+  
826                                "</applicationData>"+  
827                                "</prefillData>" 
828
829                        $(this).children(".appDataBAA").val(xmlData); 
830                        var buttonName = $(this).find(".apply-now-button").data("button-name"); 
831                        var productName = $(this).find(".apply-now-button").data("product-name"); 
832                        /* SiteCatalyst  onClick tracking */ 
833                        reportingData.apply_button = buttonName; 
834                        reportingData.product = productName; 
835 
836                        if (window.publisherFW) { 
837                            console.log('clicked', reportingData); 
838                            window.publisherFW.publishEvent("onClick", reportingData); 
839
840 
841                        this.submit(); 
842                    });                                                                
843                     
844 
845                }); 
846            </script>                    
847                 
848        </#if>  
849    </#if> 
850</#if> 

Artikkel

En feil oppsto under behandling av visningsmalen.
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('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="jn-disclaimer tier1-disclaimer-${class.getData()}" title="${partnerName} - Disclaimer"> 
35        <div class="disclaimer" > 
36            ${content.getData()} 
37        </div> 
38    </div> 
39</#if> 

Artikkel

En feil oppsto under behandling av visningsmalen.
Expression qstringmap["bankercode"] is undefined on line 6, column 17 in 10154#10192#153411747.
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>