1<#assign oadURL = propsUtil.get('elan.oad.url') > <#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> <#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> <#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> <#assign url404 = '/error/404.html' > <#assign lc = qstringmap["ecdma-lc"]?first> <#assign lc = htmlUtil.escape(lc)> <#assign lc = htmlUtil.escapeJS(lc)> <#assign dcoSourceCode = ""> <#assign dcoSourceCodeQueryParameter = "">
2<#if qstringmap["sourcecode"]?has_content> <#assign dcoSourceCode = qstringmap["sourcecode"]?first> <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}"> <#elseif qstringmap<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
5<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
6<#assign url404 = '/error/404.html' >
7
8<#assign lc = qstringmap["ecdma-lc"]?first>
9<#assign lc = htmlUtil.escape(lc)>
10<#assign lc = htmlUtil.escapeJS(lc)>
11
12<#assign dcoSourceCode = "">
13<#assign dcoSourceCodeQueryParameter = "">
14
15<#if qstringmap["sourcecode"]?has_content>
16 <#assign dcoSourceCode = qstringmap["sourcecode"]?first>
17 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
18 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
19 <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}">
20<#elseif qstringmap["sourceCode"]?has_content>
21 <#assign dcoSourceCode = qstringmap["sourceCode"]?first>
22 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
23 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
24 <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}">
25</#if>
26
27<#assign prefix = "00000" >
28<#assign lcWithPrefix = prefix + lc >
29<#assign withPrefixLength = lcWithPrefix?length >
30<#assign startHere = withPrefixLength - 5>
31<#assign lc = lcWithPrefix?substring(startHere)>
32<#assign prcaURL = propsUtil.get('elan.prca.url')>
33<#assign useprcaValue = "" >
34
35<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
36<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
37
38<#if clientProfileList?first?has_content>
39 <#assign clientProfile = clientProfileList?first>
40 <#assign partnerName = clientProfile.getMarketingNameLong()>
41 <#assign pbu = clientProfile.getPbu()>
42 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
43 <#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!>
44
45 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu + '&' + lc)>
46 <#assign temp = []>
47 <#assign offerTypeList = []>
48 <#assign index = 0>
49 <#list fiCardsData as fib>
50 <#assign useprcaValue = fib.useprca!"">
51 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
52 <#assign offerTypeList = offerTypeList + [fib.offerType]>
53 <#assign temp = temp + fiCardsData[index..index]>
54 </#if>
55 <#assign index = index + 1>
56 </#list>
57 <#assign fiCardsData = temp>
58
59 <#if (fiCardsData?size > 0)>
60 <#list fiCardsData as fib>
61 <#switch fib.offerType>
62 <#case "101">
63 <#assign productURL = "consumer-edr">
64 <#assign productName = "Everyday Rewards+">
65 <#break>
66 <#case "103">
67 <#assign productURL = "consumer-edr">
68 <#assign productName = "Everyday Rewards+">
69 <#break>
70 <#case "104">
71 <#assign productURL = "max-cash">
72 <#assign productName = "Max Cash Preferred Card">
73 <#break>
74 <#case "108">
75 <#assign productURL="consumer-platinum">
76 <#assign productName="Platinum Card">
77 <#break>
78 <#case "109">
79 <#assign productURL="consumer-platinum">
80 <#assign productName="Platinum Card">
81 <#break>
82 <#case "115">
83 <#assign productURL = "secured">
84 <#assign productName = "Secured Card" >
85 <#break>
86 <#case "138">
87 <#assign productURL = "travel-rewards-plus">
88 <#assign productName = "Travel Rewards+" >
89 <#break>
90 <#case "141">
91 <#assign productURL = "college-real-rewards">
92 <#assign productName = "College Real Rewards" >
93 <#break>
94 <#case "147">
95 <#assign productURL = "max-cash-secured">
96 <#assign productName = "Max Cash Secured Card" >
97 <#break>
98 <#case "154">
99 <#assign productURL = "reserve-rewards-plus">
100 <#assign productName = "Reserve Rewards+" >
101 <#break>
102 <#case "121">
103 <#assign productURL = "business-platinum">
104 <#assign productName = "Business Card" >
105 <#break>
106 <#case "128">
107 <#assign productURL = "business-cash-preferred">
108 <#assign productName = "Business Cash Preferred" >
109 <#break>
110 <#case "143">
111 <#assign productURL = "business-real-rewards">
112 <#assign productName = "Business Real Rewards Card" >
113 <#break>
114 <#case "144">
115 <#assign productURL = "smart-business-rewards">
116 <#assign productName = "Smart Business Rewards Card" >
117 <#break>
118 <#default>
119 </#switch>
120
121 <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">
122 <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">
123 <#if productURL?has_content && url?matches(".*/${productURL}\\?.*")>
124 <script>
125 console.log('offerType', '${fib.offerType}', '${productURL}')
126 </script>
127 <#list product.getSiblings() as card>
128 <#if card?has_content && card.offerType.getData() == fib.offerType>
129 <#assign isExcluded = 0>
130 <#if fib.dmaexclude??>
131 <#assign isExcluded = fib.dmaexclude?number!0>
132 </#if>
133
134 <div class="content-container jn-container-banner" title="${partnerName!''} ${productName!''}">
135 <div class="banner-wrapper">
136 <div class="banner">
137 <div class="banner-cardArt cardArtImg">
138 <img
139 src="${cardArtImage!''}"
140 alt="${partnerName!''} ${productName!''}"
141 title="${partnerName!''} ${productName!''}"
142 class="jn-img-responsive"
143 onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"
144 >
145 </div>
146 <div class="banner-cta">
147 <div class="banner-cta-text">
148 ${card.optionalCtaFeatureText.getData()}
149 </div>
150 <#if isExcluded == 0>
151
152 <#if useprcaValue == "1">
153 <a
154 class="jn-button"
155 data-button-name="cta-button-bottom"
156 data-product-name="${productURL}!''"
157 href="#"
158 offerId="${fib.offerId}"
159 onclick="submitForm(event)"
160 >
161 ${card.optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span>
162 </a>
163 <form id="applyFormLB" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer" method="post">
164 <input type="hidden" name="locationCode" value="${lc}" id="locationCodeLB">
165 <input type="hidden" name="offerId" value="${fib.offerId}" id="offerId">
166 <input type="hidden" name="preparerType" value="customer">
167 </form>
168 <#else>
169 <a
170 class="jn-button"
171 data-button-name="cta-button-bottom"
172 data-product-name="${productURL}!''"
173 href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
174 id="oadSecButton"
175 >
176 ${card.optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span>
177 </a>
178 </#if>
179 <#else>
180 <a
181 class="jn-button"
182 data-button-name="cta-button-bottom"
183 data-product-name="${productURL}!''"
184 data-micromodal-trigger="modal-lower-banner"
185 id="oadSecButton"
186 href="javascript:void(0);"
187 >
188 ${card.optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span>
189 </a>
190 </#if>
191 </div>
192 </div>
193 </div>
194 </div>
195 <style>
196 .excludeModal__overlay {
197 position: fixed;
198 top: 0;
199 left: 0;
200 right: 0;
201 bottom: 0;
202 background: rgba(0,0,0,0.6);
203 display: flex;
204 justify-content: center;
205 align-items: center;
206 }
207
208 .excludeModal__container {
209 background-color: #fff;
210 padding: 30px;
211 min-width: 500px;
212 max-width: 500px;
213 max-height: 100vh;
214 border-radius: 4px;
215 overflow-y: auto;
216 box-sizing: border-box;
217 }
218
219 .excludeModal__header {
220 display: flex;
221 justify-content: space-between;
222 align-items: center;
223 }
224
225 .modal .excludeModal__container .excludeModal__title {
226 margin-top: 0;
227 margin-bottom: 0;
228 font-weight: 600;
229 font-size: 20px;
230 line-height: 1.25;
231 color: #00449e;
232 box-sizing: border-box;
233 }
234
235 .excludeModal__close {
236 background: transparent;
237 border: 1px solid white;
238 padding: 4px 8px;
239 float: right;
240 }
241
242 .excludeModal__close:hover {
243 border: 1px solid black;
244 }
245
246 .excludeModal__close:before { content: "\2715"; }
247
248 @keyframes mmfadeIn {
249 from { opacity: 0; }
250 to { opacity: 1; }
251 }
252
253 @keyframes mmfadeOut {
254 from { opacity: 1; }
255 to { opacity: 0; }
256 }
257
258 @keyframes mmslideIn {
259 from { transform: translateY(15%); }
260 to { transform: translateY(0); }
261 }
262
263 @keyframes mmslideOut {
264 from { transform: translateY(0); }
265 to { transform: translateY(-10%); }
266 }
267
268 .micromodal-slide {
269 display: none;
270 }
271
272 .micromodal-slide.is-open {
273 display: block;
274 }
275
276 .micromodal-slide[aria-hidden="false"] .excludeModal__overlay {
277 animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
278 }
279
280 .micromodal-slide[aria-hidden="false"] .excludeModal__container {
281 animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
282 }
283
284 .micromodal-slide[aria-hidden="true"] .excludeModal__overlay {
285 animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
286 }
287
288 .micromodal-slide[aria-hidden="true"] .excludeModal__container {
289 animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
290 }
291
292 .micromodal-slide .excludeModal__container,
293 .micromodal-slide .excludeModal__overlay {
294 will-change: transform;
295 }
296 </style>
297 <div aria-hidden="true" class="modal micromodal-slide" id="modal-lower-banner" >
298 <div class="excludeModal__overlay" data-micromodal-close tabindex="-1">
299 <div
300 aria-modal="true"
301 aria-labelledby="modal-lower-banner-title"
302 class="excludeModal__container"
303 role="dialog"
304 >
305 <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button>
306 <header class="excludeModal__header">
307 <h2 class="excludeModal__title" id="modal-lower-banner-title">
308 <#if card.excludedMessage?? >
309 ${card.excludedMessage.getData()!""}
310 </#if>
311 </h2>
312 </header>
313 </div>
314 </div>
315 </div>
316 <!-- https://micromodal.vercel.app/ -->
317 <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script>
318 <script>
319 AUI().ready(function(){
320 MicroModal.init();
321 });
322 </script>
323 <#break>
324 </#if>
325 </#list>
326 <#break>
327 </#if>
328 </#list>
329 </#if>
330<#else>
331 <script>
332 console.log("discalimer: client profile empty");
333 </script>
334</#if>
335<script>
336 function submitForm(event) {
337 event.preventDefault(); // Prevent the default behavior of the anchor tag
338 var offerId = event.target.getAttribute("offerId");
339
340 var lc = document.getElementById('locationCodeLB').value;
341 //var offerId = document.getElementById('offerIdLB').value;
342
343 // Construct the URL
344 var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer";
345
346 // Set the form action to the constructed URL
347 document.getElementById('applyFormLB').action = url;
348
349 // Submit the form
350 postCreditcardLearnMore(url);
351 //document.getElementById('applyFormLB').submit();
352 }
353
354 function postCreditcardLearnMore(path, method='post') {
355 // Create a form element
356 const form = document.createElement('form');
357 form.method = method;
358 //form.target = '_blank'; // Open in a new tab
359 form.action = path;
360
361 // Add each parameter as a hidden input field
362
363 document.body.appendChild(form);
364 form.submit();
365 }
366</script>["sourceCode"]?has_content> <#assign dcoSourceCode = qstringmap["sourceCode"]?first>
367<#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}"> </#if> <#assign prefix = "00000" > <#assign lcWithPrefix = prefix + lc > <#assign withPrefixLength = lcWithPrefix?length > <#assign startHere = withPrefixLength - 5> <#assign lc = lcWithPrefix?substring(startHere)> <#assign prcaURL = propsUtil.get('elan.prca.url')> <#assign useprcaValue = "" > <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
368<#if clientProfileList?first?has_content> <#assign clientProfile = clientProfileList?first> <#assign partnerName = clientProfile.getMarketingNameLong()> <#assign pbu = clientProfile.getPbu()> <#assign subbu = clientProfile.getSUBBRANDBUNBR()> <#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!> <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu + '&' + lc)> <#assign temp = []> <#assign offerTypeList = []> <#assign index = 0> <#list fiCardsData as fib> <#assign useprcaValue = fib.useprca!""> <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
369<#assign offerTypeList = offerTypeList + [fib.offerType]> <#assign temp = temp + fiCardsData[index..index]> </#if> <#assign index = index + 1> </#list> <#assign fiCardsData = temp> <#if (fiCardsData?size > 0)> <#list fiCardsData as fib> <#switch fib.offerType> <#case "101"> <#assign productURL = "consumer-edr"> <#assign productName = "Everyday Rewards+"> <#break> <#case "103"> <#assign productURL = "consumer-edr"> <#assign productName = "Everyday Rewards+"> <#break> <#case "104"> <#assign productURL = "max-cash"> <#assign productName = "Max Cash Preferred Card"> <#break> <#case "108"> <#assign productURL="consumer-platinum"> <#assign productName="Platinum Card"> <#break> <#case "109"> <#assign productURL="consumer-platinum"> <#assign productName="Platinum Card"> <#break> <#case "115"> <#assign productURL = "secured"> <#assign productName = "Secured Card" > <#break> <#case "138"> <#assign productURL = "travel-rewards-plus"> <#assign productName = "Travel Rewards+" > <#break> <#case "141"> <#assign productURL = "college-real-rewards"> <#assign productName = "College Real Rewards" > <#break> <#case "147"> <#assign productURL = "max-cash-secured"> <#assign productName = "Max Cash Secured Card" > <#break> <#case "154"> <#assign productURL = "reserve-rewards-plus"> <#assign productName = "Reserve Rewards+" > <#break> <#case "121"> <#assign productURL = "business-platinum"> <#assign productName = "Business Card" > <#break> <#case "128"> <#assign productURL = "business-cash-preferred">
370<#assign productName = "Business Cash Preferred" > <#break> <#case "143"> <#assign productURL = "business-real-rewards"> <#assign productName = "Business Real Rewards Card" > <#break> <#case "144"> <#assign productURL = "smart-business-rewards">
371<#assign productName = "Smart Business Rewards Card" > <#break> <#default> </#switch>
372<#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg"> <#if productURL?has_content && url?matches("/${productURL}\\?.*")>
373
374<script> console.log('offerType', '${fib.offerType}', '${productURL}') </script>
375<#list product.getSiblings() as card>
376<#if card?has_content && card.offerType.getData() == fib.offerType>
377<#assign isExcluded = 0>
378<#if fib.dmaexclude??> <#assign isExcluded = fib.dmaexclude?number!0> </#if> <div class="content-container jn-container-banner" title="${partnerName!''} ${productName!''}"> <div class="banner-wrapper"> <div class="banner"> <div class="banner-cardArt cardArtImg"> <img src="${cardArtImage!''}" alt="${partnerName!''} ${productName!''}" title="${partnerName!''} ${productName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'" >
379</div> <div class="banner-cta"> <div class="banner-cta-text"> ${card.optionalCtaFeatureText.getData()} </div> <#if isExcluded == 0> <#if useprcaValue == "1"> <a class="jn-button" data-button-name="cta-button-bottom" data-product-name="${productURL}!''" href="#" offerId="${fib.offerId}" onclick="submitForm(event)" > ${card.optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span> </a> <form id="applyFormLB" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer" method="post"> <input type="hidden" name="locationCode" value="${lc}" id="locationCodeLB"> <input type="hidden" name="offerId" value="${fib.offerId}" id="offerId"> <input type="hidden" name="preparerType" value="customer"> </form> <#else>
380 <a class="jn-button" data-button-name="cta-button-bottom" data-product-name="${productURL}!''" href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}" id="oadSecButton" > ${card.optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span> </a> </#if> <#else> <a class="jn-button" data-button-name="cta-button-bottom" data-product-name="${productURL}!''" data-micromodal-trigger="modal-lower-banner" id="oadSecButton" href="javascript:void(0);" > ${card.optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span> </a> </#if> </div> </div> </div> </div> <style> .excludeModal__overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; } .excludeModal__container { background-color: #fff; padding: 30px; min-width: 500px; max-width: 500px; max-height: 100vh; border-radius: 4px; overflow-y: auto; box-sizing: border-box; } .excludeModal__header { display: flex; justify-content: space-between; align-items: center; } .modal .excludeModal__container .excludeModal__title { margin-top: 0; margin-bottom: 0; font-weight: 600; font-size: 20px; line-height: 1.25; color: #00449e; box-sizing: border-box; } .excludeModal__close { background: transparent; border: 1px solid white; padding: 4px 8px; float: right; } .excludeModal__close:hover { border: 1px solid black; } .excludeModal__close:before { content: "\2715"; } @keyframes mmfadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes mmfadeOut { from { opacity: 1; } to { opacity: 0; } } @keyframes mmslideIn { from { transform: translateY(15%); } to { transform: translateY(0); } } @keyframes mmslideOut { from { transform: translateY(0); } to { transform: translateY(-10%); } } .micromodal-slide { display: none; } .micromodal-slide.is-open { display: block; } .micromodal-slide[aria-hidden="false"] .excludeModal__overlay { animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); } .micromodal-slide[aria-hidden="false"] .excludeModal__container { animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); } .micromodal-slide[aria-hidden="true"] .excludeModal__overlay { animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); } .micromodal-slide[aria-hidden="true"] .excludeModal__container { animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); } .micromodal-slide .excludeModal__container, .micromodal-slide .excludeModal__overlay { will-change: transform; } </style> <div aria-hidden="true" class="modal micromodal-slide" id="modal-lower-banner" > <div class="excludeModal__overlay" data-micromodal-close tabindex="-1"> <div aria-modal="true" aria-labelledby="modal-lower-banner-title" class="excludeModal__container" role="dialog" > <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> <header class="excludeModal__header"> <h2 class="excludeModal__title" id="modal-lower-banner-title"> <#if card.excludedMessage?? > ${card.excludedMessage.getData()!""} </#if> </h2> </header> </div> </div> </div> <!-- https://micromodal.vercel.app/ --> <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> <script> AUI().ready(function(){ MicroModal.init(); }); </script> <#break> </#if> </#list> <#break> </#if> </#list> </#if> <#else> <script> console.log("discalimer: client profile empty"); </script> </#if> <script> function submitForm(event) { event.preventDefault(); // Prevent the default behavior of the anchor tag var offerId = event.target.getAttribute("offerId"); var lc = document.getElementById('locationCodeLB').value; //var offerId = document.getElementById('offerIdLB').value; // Construct the URL var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer"; // Set the form action to the constructed URL document.getElementById('applyFormLB').action = url; // Submit the form postCreditcardLearnMore(url); //document.getElementById('applyFormLB').submit(); } function postCreditcardLearnMore(path, method='post') { // Create a form element const form = document.createElement('form'); form.method = method; //form.target = '_blank'; // Open in a new tab form.action = path; // Add each parameter as a hidden input field document.body.appendChild(form); form.submit(); } </script>