Skip to content

Commit 8e5a1b0

Browse files
authored
feat: add new 3mo campaign msg (#1202)
1 parent dd4d851 commit 8e5a1b0

File tree

4 files changed

+169
-1
lines changed

4 files changed

+169
-1
lines changed

content/messages/US/long_term_multi_eqz_mixed.json renamed to content/messages/US/long_term_multi_gtz_3mez.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"meta": {
33
"id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6",
44
"offerCountry": "US",
5-
"offerType": "LT_MQEZ_RB",
5+
"offerType": "LT_MQGZ:3MEZ",
66
"offerTerm": "${CREDIT_OFFERS_DS.total_payments}",
77
"lander": "https://www.paypal.com/ppclander",
88
"variables": {

src/server/locale/US/PAY_LATER_LONG_TERM/mutations/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import longTermNQEQZ from './long_term_nq_eqz';
44
import longTermNQGTZ from './long_term_nq_gtz';
55
import longTermMultiEQZ from './long_term_multi_eqz';
6+
import longTermMultiGTZ3MEZ from './long_term_multi_gtz_3mez';
67
import longTermMultiGTZ from './long_term_multi_gtz';
78
import longTermSingleEQZ from './long_term_single_eqz';
89
import longTermSingleGTZ from './long_term_single_gtz';
@@ -22,6 +23,9 @@ export default function getMutations(id, type) {
2223
case 'LT_MQGZ':
2324
case 'PLLT_MQ_GZ':
2425
return longTermMultiGTZ[type];
26+
case 'LT_MQGZ:3MEZ':
27+
case 'PLLT_MQGZ:3MEZ':
28+
return longTermMultiGTZ3MEZ[type];
2529
case 'LT_SQEZ':
2630
case 'PLLT_SQ_EZ':
2731
return longTermSingleEQZ[type];
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
import Logo from '../../../../message/logos';
2+
import {
3+
textWrap,
4+
messageLogoWidth,
5+
altNoWrap,
6+
setLogoTop,
7+
logo20x1,
8+
xSmallFallback
9+
} from '../../../../message/mediaQueries';
10+
import { flexLogoMutations, textLogoMutations } from '../../../../message/logoMutations';
11+
12+
const flex = [
13+
[
14+
'default',
15+
{
16+
logo: Logo.PP_PAYPAL.WHITE,
17+
headline: [
18+
{
19+
tag: 'xsmall'
20+
},
21+
{
22+
tag: 'medium'
23+
}
24+
],
25+
disclaimer: ['default'],
26+
styles: []
27+
}
28+
],
29+
[
30+
'ratio:20x1',
31+
{
32+
styles: [logo20x1()]
33+
}
34+
],
35+
[
36+
'ratio:8x1',
37+
{
38+
headline: [
39+
{
40+
tag: 'xsmall'
41+
},
42+
{
43+
tag: 'medium'
44+
}
45+
]
46+
}
47+
],
48+
['color:white-no-border', { logo: Logo.PP_PAYPAL.COLOR }],
49+
...flexLogoMutations
50+
];
51+
52+
export default {
53+
'layout:flex': flex,
54+
'layout:text': [
55+
[
56+
'default',
57+
({ textSize }) => ({
58+
styles: [
59+
`@media screen and (max-width: ${textSize * 18.5}px) {
60+
.message__headline > .tag--medium > span.br:first-child { white-space: normal; }
61+
}`,
62+
textWrap(textSize * 32, textSize, 'US'),
63+
xSmallFallback(textSize * 16),
64+
messageLogoWidth(false, textSize * 4, textSize * 1.25),
65+
setLogoTop(textSize * 16)
66+
],
67+
logo: Logo.PP_PAYPAL.COLOR,
68+
headline: [
69+
{
70+
tag: 'medium',
71+
br: ['mo.']
72+
},
73+
{
74+
tag: 'xsmall'
75+
}
76+
],
77+
disclaimer: ['default']
78+
})
79+
],
80+
[
81+
'logo.type:primary && logo.position:right',
82+
({ textSize }) => ({
83+
styles: [
84+
`@media screen and (max-width: ${textSize * 18.5}px) {
85+
.message__headline > .tag--medium { white-space: normal; }
86+
}`,
87+
xSmallFallback(textSize * 10.75),
88+
setLogoTop(textSize * 28.75),
89+
messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)
90+
]
91+
})
92+
],
93+
[
94+
'logo.type:primary && logo.position:top',
95+
({ textSize }) => ({
96+
styles: [
97+
`@media screen and (max-width: ${textSize * 18.5}px) {
98+
.message__headline > .tag--medium { white-space: normal; }
99+
}`,
100+
xSmallFallback(textSize * 10.75),
101+
messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)
102+
]
103+
})
104+
],
105+
[
106+
'logo.type:alternative',
107+
({ textSize }) => ({
108+
styles: [
109+
`@media screen and (max-width: ${textSize * 10.6}px) { .message__content { white-space: nowrap; }}`,
110+
xSmallFallback(textSize * 11.5),
111+
altNoWrap(textSize * 10.6),
112+
textWrap(textSize * 32, textSize, 'US'),
113+
messageLogoWidth(textSize * 1.75, textSize * 4, textSize * 1.25)
114+
],
115+
logo: Logo.PP_PAYPAL.COLOR[0]
116+
})
117+
],
118+
[
119+
'logo.type:none',
120+
({ textSize }) => ({
121+
styles: [xSmallFallback(textSize * 16)],
122+
logo: false,
123+
headline: [
124+
{
125+
tag: 'medium',
126+
br: ['mo.', 'mo'],
127+
replace: [
128+
['APR.', 'APR'],
129+
['mo.', 'mo']
130+
]
131+
},
132+
{
133+
tag: 'xsmall.2',
134+
replace: [['later.', 'later']]
135+
}
136+
]
137+
})
138+
],
139+
[
140+
'logo.type:inline',
141+
({ textSize }) => ({
142+
styles: [xSmallFallback(textSize * 16), `.message__logo { width: ${textSize * 4}px }`],
143+
logo: Logo.NO_PP_MONOGRAM.COLOR,
144+
headline: [
145+
{
146+
tag: 'medium',
147+
br: ['mo.', 'mo'],
148+
replace: [
149+
['APR.', 'APR'],
150+
['mo.', 'mo']
151+
]
152+
},
153+
{
154+
tag: 'xsmall.2',
155+
replace: [['later.', 'later']]
156+
}
157+
]
158+
})
159+
],
160+
...textLogoMutations
161+
]
162+
};

src/utils/miscellaneous.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ export function getStandardProductOffer(offer) {
211211
case 'LT_MQEZ':
212212
case 'LT_MQEZ_RB':
213213
case 'LT_MQGZ':
214+
case 'LT_MQGZ:3MEZ':
214215
case 'LT_SQEZ':
215216
case 'LT_SQEZ_RB':
216217
case 'LT_SQGZ':
@@ -230,6 +231,7 @@ export function getStandardProductOffer(offer) {
230231
case 'PLLT_NQ_GZ':
231232
case 'PLLT_MQ_EZ':
232233
case 'PLLT_MQ_GZ':
234+
case 'PLLT_MQ_GZ:3MEZ':
233235
case 'PLLT_SQ_EZ':
234236
case 'PLLT_SQ_GZ':
235237
case OFFER.PAY_LATER_LONG_TERM:

0 commit comments

Comments
 (0)