wickes-css2 2.103.0-RG-1742-billie-30-60-90-days.1 → 2.103.0-RG-1742-billie-30-60-90-days.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css/components/checkout-chip.css +1 -0
- package/build/css/components/checkout-payment-details-v2.css +1 -1
- package/build/css/components/checkout-payment-repayment-terms.css +1 -0
- package/build/css/components/energy-efficiency.css +1 -0
- package/build/css/components/global-search.css +1 -0
- package/build/css/components/kitchen/strip-stickers.css +1 -0
- package/build/css/components/legal-info.css +1 -0
- package/build/css/components/loader.css +1 -0
- package/build/css/components/long-banner.css +1 -0
- package/build/css/components/payment-details-BPS-form.css +1 -0
- package/build/css/components/pdf-loader.css +1 -0
- package/build/css/components/pdp-favourite-product.css +1 -0
- package/build/css/components/plp-favourite-product.css +1 -0
- package/build/css/components/price-block-v2-critical.css +1 -0
- package/build/css/components/price-block-v2.css +1 -0
- package/build/css/components/special-opening-schedule-v2.css +1 -0
- package/build/css/components/special-opening-schedule.css +1 -0
- package/build/css/components/store-locator-about.css +1 -0
- package/build/css/components/store-locator-facilities.css +1 -0
- package/build/css/components/store-locator-lookup.css +1 -0
- package/build/css/components/store-locator-v2-details.css +1 -0
- package/build/css/components/strip-stickers.css +1 -0
- package/build/css/components/tile-calculator.css +1 -0
- package/build/css/components/trade-pro-extras.css +1 -0
- package/build/css/main.css +1 -1
- package/build/css/pages/bicester-header.css +1 -0
- package/build/css/pages/bicester-project-list.css +1 -0
- package/build/css/pages/checkout-new.css +1 -0
- package/build/css/pages/checkout.css +1 -0
- package/build/css/pages/design-appointment.css +1 -0
- package/build/css/pages/home-movers.css +1 -0
- package/build/css/pages/iframe-paypage.css +1 -0
- package/build/css/pages/my-account-v2.css +1 -0
- package/build/css/pages/my-account.css +1 -0
- package/build/css/pages/new-usp-bar.css +1 -0
- package/build/css/pages/oldweb_header.css +1 -0
- package/build/css/pages/page_account-deletion.css +1 -0
- package/build/css/pages/page_act-trade-pro.css +1 -0
- package/build/css/pages/page_address-book.css +1 -0
- package/build/css/pages/page_bathroom-trends.css +1 -0
- package/build/css/pages/page_book-consultant-thank-you-new.css +1 -0
- package/build/css/pages/page_change-password.css +1 -0
- package/build/css/pages/page_checkout-payment-details.css +1 -0
- package/build/css/pages/page_checkout_delivery-new.css +1 -0
- package/build/css/pages/page_cms_homepage.css +1 -0
- package/build/css/pages/page_contact-us.css +1 -0
- package/build/css/pages/page_content.css +1 -0
- package/build/css/pages/page_coshh.css +1 -0
- package/build/css/pages/page_default-store.css +1 -0
- package/build/css/pages/page_discount.css +1 -0
- package/build/css/pages/page_empty-basket.css +1 -0
- package/build/css/pages/page_favourite-list.css +1 -0
- package/build/css/pages/page_fdl-management.css +1 -0
- package/build/css/pages/page_fdl-product.css +1 -0
- package/build/css/pages/page_fi.css +1 -0
- package/build/css/pages/page_forgotten-password.css +1 -0
- package/build/css/pages/page_half-login.css +1 -0
- package/build/css/pages/page_home.css +1 -0
- package/build/css/pages/page_hotspot-guttering.css +1 -0
- package/build/css/pages/page_in-store-checkout.css +1 -0
- package/build/css/pages/page_in-store_MVP_order-summary-submitted.css +1 -0
- package/build/css/pages/page_in-store_MVP_order-summary.css +1 -0
- package/build/css/pages/page_installation.css +1 -0
- package/build/css/pages/page_installer.css +1 -0
- package/build/css/pages/page_installer_form.css +1 -0
- package/build/css/pages/page_kitchen-claims.css +1 -0
- package/build/css/pages/page_kitchen-list.css +1 -0
- package/build/css/pages/page_login.css +1 -0
- package/build/css/pages/page_marketing-preferences.css +1 -0
- package/build/css/pages/page_merged-basket.css +1 -0
- package/build/css/pages/page_my-account_tradePro.css +1 -0
- package/build/css/pages/page_my-order.css +1 -0
- package/build/css/pages/page_my-orders.css +1 -0
- package/build/css/pages/page_new-checkout-forgot.css +1 -0
- package/build/css/pages/page_new-checkout_login-register.css +1 -0
- package/build/css/pages/page_no-results.css +1 -0
- package/build/css/pages/page_online-exclusive.css +1 -0
- package/build/css/pages/page_paint-mixing-error.css +1 -0
- package/build/css/pages/page_personal-details.css +1 -0
- package/build/css/pages/page_pre_home.css +1 -0
- package/build/css/pages/page_pre_home_thank-you.css +1 -0
- package/build/css/pages/page_product-details-critical.css +1 -0
- package/build/css/pages/page_product-details-v2-critical.css +1 -0
- package/build/css/pages/page_product-details-v2.css +1 -0
- package/build/css/pages/page_product-details.css +1 -0
- package/build/css/pages/page_product_search.css +1 -0
- package/build/css/pages/page_products-list-combined.css +1 -0
- package/build/css/pages/page_products-list-phone.css +1 -0
- package/build/css/pages/page_products-list.css +1 -0
- package/build/css/pages/page_products-list_v2.css +1 -0
- package/build/css/pages/page_projects.css +1 -0
- package/build/css/pages/page_quiz.css +1 -0
- package/build/css/pages/page_rate-review.css +1 -0
- package/build/css/pages/page_registration.css +1 -0
- package/build/css/pages/page_shopping-cart-v2.css +1 -0
- package/build/css/pages/page_shopping-cart.css +1 -0
- package/build/css/pages/page_split-orders.css +1 -0
- package/build/css/pages/page_store-locator-details.css +1 -0
- package/build/css/pages/page_store-locator.css +1 -0
- package/build/css/pages/page_thankyou.css +1 -0
- package/build/css/pages/page_ti.css +1 -0
- package/build/css/pages/page_tiling-calculator-generic.css +1 -0
- package/build/css/pages/page_top-rated.css +1 -0
- package/build/css/pages/page_track-my-order.css +1 -0
- package/build/css/pages/page_track_your_order.css +1 -0
- package/build/css/pages/page_trade_installer.css +1 -0
- package/build/css/pages/page_upd-pass.css +1 -0
- package/build/css/pages/page_wismo-details.css +1 -0
- package/build/css/pages/page_wismo-order-history.css +1 -0
- package/build/css/pages/page_wismo-orders.css +1 -0
- package/build/css/pages/print_quiz.css +1 -0
- package/build/css/pages/sticky_header.css +1 -0
- package/build/css/pages/tradePro-about.css +1 -0
- package/build/css/pages/tradePro-address-book.css +1 -0
- package/build/css/pages/tradePro-delivery-details.css +1 -0
- package/build/css/pages/tradePro-discount.css +1 -0
- package/build/css/pages/tradePro-order-history.css +1 -0
- package/build/css/pages/tradePro-payment-details.css +1 -0
- package/build/css/pages/tradePro-rewards-old.css +1 -0
- package/build/css/pages/tradePro-rewards.css +1 -0
- package/build/css/pages/tradePro-signup.css +1 -0
- package/build/css/pages/tradePro-thankyou-activate.css +1 -0
- package/build/js/emulation.min.js +145 -97
- package/build/js/page/checkout-payment-details.js +96 -43
- package/package.json +1 -1
- package/src/components/checkout-chip.hbs +15 -0
- package/src/components/checkout-payment-details-v2.hbs +35 -36
- package/src/components/checkout-payment-repayment-terms.hbs +3 -16
- package/src/data/data_billie-terms.json +7 -0
- package/src/js/emulation/checkout-payment-details.js +8 -8
- package/src/js/emulation/forms.js +99 -88
- package/src/js/emulation/paymentLoader.js +4 -3
- package/src/js/emulation/repayment-toggle.js +35 -0
- package/src/js/page/checkout-payment-details.js +96 -43
- package/src/scss/components/checkout-chip.scss +64 -0
- package/src/scss/components/checkout-payment-details-v2.scss +0 -1
- package/src/scss/components/checkout-payment-repayment-terms.scss +27 -91
- package/src/scss/main.scss +2 -0
|
@@ -8,6 +8,8 @@ Wick.CheckoutPaymentDetails = (function() {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const elements = {
|
|
11
|
+
$billieRepaymentTerms: $('.js-billie-repayment-terms'),
|
|
12
|
+
$billieInfoBlock: $('.checkout-payment-details__billie'),
|
|
11
13
|
$wrapperPaymentInput: $('.checkout-payment-details__row'),
|
|
12
14
|
paymentInputName: '[name=payment-method]',
|
|
13
15
|
$cardDetails: $('.checkout-payment-details__card-details'),
|
|
@@ -15,45 +17,81 @@ Wick.CheckoutPaymentDetails = (function() {
|
|
|
15
17
|
$billingAddress: $('.billing-address'),
|
|
16
18
|
hiddenCardDetailsClass: 'checkout-payment-details__card-details_hidden',
|
|
17
19
|
hiddenClass: 'd-none',
|
|
18
|
-
}
|
|
20
|
+
};
|
|
19
21
|
|
|
20
22
|
function preparePage() {
|
|
21
|
-
var modalOpened = $(
|
|
23
|
+
var modalOpened = $('.modal.show').length;
|
|
22
24
|
if (!modalOpened) {
|
|
23
25
|
return;
|
|
24
26
|
}
|
|
25
27
|
var modalContent = $modal.find('.modal-content').clone();
|
|
26
|
-
$modal.modal(
|
|
27
|
-
modalContent.addClass(
|
|
28
|
-
$(
|
|
29
|
-
.addClass(
|
|
28
|
+
$modal.modal('hide');
|
|
29
|
+
modalContent.addClass('print-area');
|
|
30
|
+
$('body')
|
|
31
|
+
.addClass('print-mode')
|
|
30
32
|
.append(modalContent);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
function resetPage() {
|
|
34
|
-
var modalPrintModeActive = $(
|
|
36
|
+
var modalPrintModeActive = $('body.print-mode').length;
|
|
35
37
|
if (!modalPrintModeActive) {
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
|
-
$(
|
|
39
|
-
$(
|
|
40
|
-
$modal.modal(
|
|
40
|
+
$('body').removeClass('print-mode');
|
|
41
|
+
$('.print-area').remove();
|
|
42
|
+
$modal.modal('show');
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
function getPaymentMethods() {
|
|
44
46
|
return $(elements.paymentInputName)
|
|
45
47
|
.map((_, item) => $(item).val())
|
|
46
|
-
.get()
|
|
48
|
+
.get();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function setBillieStepVisibility(isReady) {
|
|
52
|
+
setBillingDetailsRowVisibility(isReady);
|
|
53
|
+
|
|
54
|
+
elements.$billieInfoBlock.toggle(isReady);
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
function togglePaymentBlocks(paymentMethods, checkedMethod) {
|
|
50
58
|
paymentMethods.forEach(method => {
|
|
51
|
-
$(`[data-${method}]`).toggle(checkedMethod === method)
|
|
52
|
-
})
|
|
59
|
+
$(`[data-${method}]`).toggle(checkedMethod === method);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function setBillingDetailsRowVisibility(isVisible) {
|
|
64
|
+
const $row = elements.$billingAddress.find('.checkout-payment-details__row');
|
|
65
|
+
|
|
66
|
+
$row.toggle(isVisible);
|
|
67
|
+
|
|
68
|
+
$row.find(':input').prop('disabled', !isVisible);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
function resetBillieRepaymentSelection() {
|
|
73
|
+
elements.$billieRepaymentTerms.find('input[name="repaymentTerms"]').prop('checked', false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function bindBillieRepaymentGate() {
|
|
77
|
+
$(document).on('change', 'input[name="repaymentTerms"]', function() {
|
|
78
|
+
const currentMethod = $(elements.paymentInputName + ':checked').val();
|
|
79
|
+
if (currentMethod !== 'billie') return;
|
|
80
|
+
|
|
81
|
+
const hasSelection = $('input[name="repaymentTerms"]:checked').length > 0;
|
|
82
|
+
setBillingDetailsRowVisibility(hasSelection);
|
|
83
|
+
|
|
84
|
+
const $row = $(this).closest('.form-row[data-row-required]');
|
|
85
|
+
$row.removeClass('form-row_validation-error').find('.form-row__error').remove();
|
|
86
|
+
});
|
|
53
87
|
}
|
|
54
88
|
|
|
55
89
|
function changeDetailsBlock(checkedMethod) {
|
|
56
|
-
|
|
90
|
+
if (checkedMethod !== 'billie') {
|
|
91
|
+
setBillingDetailsRowVisibility(true);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
switch (checkedMethod) {
|
|
57
95
|
case 'paypal':
|
|
58
96
|
hideCardDetails();
|
|
59
97
|
showPlaceOrder();
|
|
@@ -66,42 +104,48 @@ Wick.CheckoutPaymentDetails = (function() {
|
|
|
66
104
|
detailsLabel = {
|
|
67
105
|
...detailsLabel,
|
|
68
106
|
labelText: 'Name on Billie account',
|
|
69
|
-
buttonText: 'Pay with Billie'
|
|
70
|
-
}
|
|
107
|
+
buttonText: 'Pay with Billie',
|
|
108
|
+
};
|
|
71
109
|
changeLabelText(detailsLabel);
|
|
110
|
+
|
|
111
|
+
setBillieStepVisibility(false);
|
|
112
|
+
|
|
113
|
+
resetBillieRepaymentSelection();
|
|
72
114
|
break;
|
|
115
|
+
|
|
116
|
+
|
|
73
117
|
case 'clearpay':
|
|
74
118
|
detailsLabel = {
|
|
75
119
|
...detailsLabel,
|
|
76
120
|
labelText: 'Name on Clearpay account',
|
|
77
|
-
buttonText: 'Pay with Clearpay'
|
|
78
|
-
}
|
|
121
|
+
buttonText: 'Pay with Clearpay',
|
|
122
|
+
};
|
|
79
123
|
prevClearableMethod === 'card' && clearInputFields();
|
|
80
124
|
changeLabelText(detailsLabel);
|
|
81
125
|
prevClearableMethod = checkedMethod;
|
|
82
126
|
break;
|
|
83
127
|
case 'apple':
|
|
84
|
-
hideCardDetails()
|
|
85
|
-
hidePlaceOrder()
|
|
86
|
-
hideBillingAddres()
|
|
128
|
+
hideCardDetails();
|
|
129
|
+
hidePlaceOrder();
|
|
130
|
+
hideBillingAddres();
|
|
87
131
|
break;
|
|
88
132
|
case 'google':
|
|
89
|
-
hideCardDetails()
|
|
90
|
-
hidePlaceOrder()
|
|
91
|
-
hideBillingAddres()
|
|
133
|
+
hideCardDetails();
|
|
134
|
+
hidePlaceOrder();
|
|
135
|
+
hideBillingAddres();
|
|
92
136
|
break;
|
|
93
137
|
case 'card':
|
|
94
138
|
detailsLabel = {
|
|
95
139
|
...detailsLabel,
|
|
96
140
|
labelText: 'Name on card',
|
|
97
|
-
buttonText: 'Enter card details'
|
|
98
|
-
}
|
|
141
|
+
buttonText: 'Enter card details',
|
|
142
|
+
};
|
|
99
143
|
prevClearableMethod === 'clearpay' && clearInputFields();
|
|
100
144
|
changeLabelText(detailsLabel);
|
|
101
145
|
prevClearableMethod = checkedMethod;
|
|
102
146
|
break;
|
|
103
147
|
default:
|
|
104
|
-
showPlaceOrder()
|
|
148
|
+
showPlaceOrder();
|
|
105
149
|
}
|
|
106
150
|
}
|
|
107
151
|
|
|
@@ -117,7 +161,7 @@ Wick.CheckoutPaymentDetails = (function() {
|
|
|
117
161
|
const { inputName, labelText, buttonName, buttonText } = params;
|
|
118
162
|
elements.$billingAddress.removeClass(elements.hiddenClass);
|
|
119
163
|
let labelElement = elements.$billingAddress.find('[for="' + inputName + '"]');
|
|
120
|
-
let buttonElement = elements.$billingAddress.find(
|
|
164
|
+
let buttonElement = elements.$billingAddress.find('.' + buttonName + ' .btn__text');
|
|
121
165
|
|
|
122
166
|
labelElement && labelElement.text(labelText);
|
|
123
167
|
buttonElement && buttonElement.text(buttonText);
|
|
@@ -138,11 +182,27 @@ Wick.CheckoutPaymentDetails = (function() {
|
|
|
138
182
|
function init() {
|
|
139
183
|
const paymentMethods = getPaymentMethods();
|
|
140
184
|
|
|
185
|
+
$(document).on('change', 'input[name="repaymentTerms"]', function() {
|
|
186
|
+
const currentMethod = $(elements.paymentInputName + ':checked').val();
|
|
187
|
+
if (currentMethod !== 'billie') return;
|
|
188
|
+
|
|
189
|
+
const hasSelection = $('input[name="repaymentTerms"]:checked').length > 0;
|
|
190
|
+
|
|
191
|
+
setBillieStepVisibility(hasSelection);
|
|
192
|
+
|
|
193
|
+
const $row = $(this).closest('.form-row[data-row-required]');
|
|
194
|
+
$row.removeClass('form-row_validation-error')
|
|
195
|
+
.find('.form-row__error').remove();
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
|
|
141
199
|
elements.$wrapperPaymentInput.on('change', elements.paymentInputName, function() {
|
|
142
|
-
const
|
|
200
|
+
const form = $(this).closest('form')[0];
|
|
201
|
+
form && Wick.Forms.clearValidationErrors(form);
|
|
143
202
|
|
|
144
|
-
|
|
145
|
-
|
|
203
|
+
const checkedMethod = $(this).val();
|
|
204
|
+
togglePaymentBlocks(paymentMethods, checkedMethod);
|
|
205
|
+
changeDetailsBlock(checkedMethod);
|
|
146
206
|
});
|
|
147
207
|
|
|
148
208
|
$('.btn-new-card').on('click', function() {
|
|
@@ -157,27 +217,20 @@ Wick.CheckoutPaymentDetails = (function() {
|
|
|
157
217
|
return false;
|
|
158
218
|
});
|
|
159
219
|
|
|
160
|
-
|
|
161
|
-
if (!$modal.length) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
220
|
+
if (!$modal.length) return;
|
|
164
221
|
|
|
165
|
-
if (typeof(window.onbeforeprint) !== 'undefined') {
|
|
166
|
-
// subscriptions for browsers
|
|
222
|
+
if (typeof (window.onbeforeprint) !== 'undefined') {
|
|
167
223
|
window.onbeforeprint = preparePage;
|
|
168
224
|
window.onafterprint = resetPage;
|
|
169
225
|
} else if (window.matchMedia) {
|
|
170
|
-
// subscriptions for iOS devices
|
|
171
226
|
var mediaQueryList = window.matchMedia('print');
|
|
172
227
|
mediaQueryList.addListener(function(mql) {
|
|
173
|
-
if (mql.matches)
|
|
174
|
-
|
|
175
|
-
} else {
|
|
176
|
-
resetPage();
|
|
177
|
-
}
|
|
228
|
+
if (mql.matches) preparePage();
|
|
229
|
+
else resetPage();
|
|
178
230
|
});
|
|
179
231
|
}
|
|
180
232
|
}
|
|
181
233
|
|
|
234
|
+
|
|
182
235
|
init();
|
|
183
236
|
})();
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<div class="checkout-chip">
|
|
2
|
+
<input
|
|
3
|
+
class="checkout-chip__input"
|
|
4
|
+
type="radio"
|
|
5
|
+
name="{{name}}"
|
|
6
|
+
id="{{id}}"
|
|
7
|
+
value="{{value}}"
|
|
8
|
+
{{#if checked}}checked{{/if}}
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<label class="checkout-chip__label" for="{{id}}">
|
|
12
|
+
<span class="checkout-chip__label-top">{{top}}</span>
|
|
13
|
+
<span class="checkout-chip__label-bottom">{{bottom}}</span>
|
|
14
|
+
</label>
|
|
15
|
+
</div>
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
<div class="form-row">
|
|
67
67
|
<div class="form-row__field form-row__field-clearpay">
|
|
68
68
|
<label
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
class="rbn rbn_align clearpay-label__rbn"
|
|
70
|
+
for="checkout-payment-details-clearpay">
|
|
71
71
|
<input
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
type="radio"
|
|
73
|
+
id="checkout-payment-details-clearpay"
|
|
74
|
+
name="payment-method"
|
|
75
|
+
value="clearpay">
|
|
76
76
|
<ins></ins>
|
|
77
77
|
<div class="clearpay-logo">
|
|
78
78
|
<img class="payments-checkout__image" src="./img/payment/checkout/clearpay.svg" alt="clearpay">
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
<div class="form-row">
|
|
86
86
|
<div class="form-row__field form-row__field-apple">
|
|
87
87
|
<label
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
class="rbn rbn_align apple-label__rbn"
|
|
89
|
+
for="checkout-payment-details-apple">
|
|
90
90
|
<input
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
type="radio"
|
|
92
|
+
id="checkout-payment-details-apple"
|
|
93
|
+
name="payment-method"
|
|
94
|
+
value="apple">
|
|
95
95
|
<ins></ins>
|
|
96
96
|
<div class="apple-logo">
|
|
97
97
|
<img src="img/apple-pay.svg" alt="apple pay">
|
|
@@ -104,13 +104,13 @@
|
|
|
104
104
|
<div class="form-row">
|
|
105
105
|
<div class="form-row__field form-row__field-google">
|
|
106
106
|
<label
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
class="rbn rbn_align google-label__rbn"
|
|
108
|
+
for="checkout-payment-details-google">
|
|
109
109
|
<input
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
type="radio"
|
|
111
|
+
id="checkout-payment-details-google"
|
|
112
|
+
name="payment-method"
|
|
113
|
+
value="google">
|
|
114
114
|
<ins></ins>
|
|
115
115
|
<div class="google-logo">
|
|
116
116
|
<img src="img/google-pay-mark.png" alt="google pay">
|
|
@@ -124,7 +124,8 @@
|
|
|
124
124
|
<label class="rbn rbn_align" for="checkout-payment-details-paypal">
|
|
125
125
|
<input type="radio" id="checkout-payment-details-paypal" name="payment-method" value="paypal">
|
|
126
126
|
<ins></ins>
|
|
127
|
-
<img class="checkout-payment-details__icon" src="img/payments_paypal-large.png" width="90" height="24"
|
|
127
|
+
<img class="checkout-payment-details__icon" src="img/payments_paypal-large.png" width="90" height="24"
|
|
128
|
+
alt="paypal">
|
|
128
129
|
</label>
|
|
129
130
|
</div>
|
|
130
131
|
</div>
|
|
@@ -163,7 +164,18 @@
|
|
|
163
164
|
</div>
|
|
164
165
|
</div>
|
|
165
166
|
|
|
167
|
+
<div class="form-row js-billie-repayment-terms" style="display: none" data-billie data-row-required data-message="Please select repayment terms">
|
|
168
|
+
<div class="form-row__field">
|
|
169
|
+
{{> checkout-payment-repayment-terms
|
|
170
|
+
name="repaymentTerms"
|
|
171
|
+
title="Select repayment terms"
|
|
172
|
+
repaymentTerms=billieTerms
|
|
173
|
+
}}
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
166
177
|
{{> checkout-payment-info-block
|
|
178
|
+
showRepaymentTerms=false
|
|
167
179
|
dataAttr="data-klarna"
|
|
168
180
|
blockClass="checkout-payment-details__klarna"
|
|
169
181
|
infoClass="klarna-info"
|
|
@@ -198,27 +210,13 @@
|
|
|
198
210
|
</a>"
|
|
199
211
|
}}
|
|
200
212
|
|
|
201
|
-
|
|
202
|
-
<div class="form-row" data-row-required data-message="Please select repayment terms">
|
|
203
|
-
<div class="form-row__field">
|
|
204
|
-
{{> checkout-payment-repayment-terms
|
|
205
|
-
name="repaymentTerms"
|
|
206
|
-
title="Select repayment terms"
|
|
207
|
-
repaymentTerms=(array
|
|
208
|
-
(hash id="repay-30" value="30" top="30" bottom="days")
|
|
209
|
-
(hash id="repay-60" value="60" top="60" bottom="days")
|
|
210
|
-
(hash id="repay-90" value="90" top="90" bottom="days")
|
|
211
|
-
)
|
|
212
|
-
}}
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
|
|
216
213
|
{{> checkout-payment-info-block
|
|
217
214
|
dataAttr="data-billie"
|
|
215
|
+
showRepaymentTerms=true
|
|
218
216
|
blockClass="checkout-payment-details__billie"
|
|
219
217
|
infoClass="billie-info"
|
|
220
218
|
|
|
221
|
-
heading="Get first. Pay later <br> Pay 30 days after shipment"
|
|
219
|
+
heading="Get first. Pay later <br> Pay <span class='term'>30</span> days after shipment"
|
|
222
220
|
brandLogoHtml="<img
|
|
223
221
|
src='https://static.billie.io/badges/Billie_Checkout_Default.svg'
|
|
224
222
|
alt='Billie Pay Later'
|
|
@@ -244,7 +242,8 @@
|
|
|
244
242
|
<div class="billing-address">
|
|
245
243
|
{{> checkout-edit-billing-address actionBlock="true" no-set-card="true" billie-form=billie-form}}
|
|
246
244
|
</div>
|
|
247
|
-
<div data-existing-card
|
|
245
|
+
<div data-existing-card
|
|
246
|
+
class="form-row form-row__action form-row__action_custom checkout-payment-details__place-order paypal__row">
|
|
248
247
|
<div class="form-row__col-btn" data-paypal style="display: none;">
|
|
249
248
|
<a class="pay-pal_wrap" href="./page_checkout_confirmation-new.html">
|
|
250
249
|
<div class="buttons-container">
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
<div class="repayment-terms">
|
|
2
2
|
<div class="repayment-terms__title">
|
|
3
3
|
<span class="repayment-terms__asterisk">*</span>
|
|
4
|
-
<span>
|
|
4
|
+
<span>{{title}}</span>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<div class="repayment-terms__chips" role="radiogroup">
|
|
8
8
|
{{#each repaymentTerms}}
|
|
9
|
-
|
|
10
|
-
<input
|
|
11
|
-
class="repayment-terms__input"
|
|
12
|
-
type="radio"
|
|
13
|
-
name="repaymentTerms"
|
|
14
|
-
id="{{id}}"
|
|
15
|
-
value="{{value}}"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<label class="repayment-terms__label" for="{{id}}">
|
|
19
|
-
<span class="repayment-terms__label-top">{{top}}</span>
|
|
20
|
-
<span class="repayment-terms__label-bottom">{{bottom}}</span>
|
|
21
|
-
</label>
|
|
22
|
-
</div>
|
|
9
|
+
{{> checkout-chip name=../name }}
|
|
23
10
|
{{/each}}
|
|
24
11
|
</div>
|
|
25
|
-
</div>
|
|
12
|
+
</div>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var Wick = Wick || {};
|
|
2
2
|
|
|
3
|
-
Wick.PaymentDetails = (function
|
|
3
|
+
Wick.PaymentDetails = (function() {
|
|
4
4
|
var $btnEnterDetails = $('.btn-enter-details'),
|
|
5
5
|
$form = $btnEnterDetails.parents('form'),
|
|
6
6
|
isGuestPage = $('.page_checkout-payment-details_guest').length;
|
|
7
7
|
|
|
8
|
-
function bindEvents
|
|
9
|
-
$btnEnterDetails.on('click', function(){
|
|
10
|
-
if ($form.find('#card-name').val()
|
|
8
|
+
function bindEvents() {
|
|
9
|
+
$btnEnterDetails.on('click', function() {
|
|
10
|
+
if ($form.find('#card-name').val()?.length &&
|
|
11
11
|
$form.find('#first-line-address').val().length &&
|
|
12
12
|
$form.find('#address-line-1').val().length &&
|
|
13
13
|
$form.find('#town-city').val().length &&
|
|
14
|
-
$form.find('#postcode_additional').val().length){
|
|
14
|
+
$form.find('#postcode_additional').val().length) {
|
|
15
15
|
$('.checkout-payment-details__card-details').removeClass('checkout-payment-details__card-details_hidden');
|
|
16
16
|
$('html, body').animate({
|
|
17
|
-
scrollTop: $('.checkout-payment-details__card-details').offset().top - 15
|
|
17
|
+
scrollTop: $('.checkout-payment-details__card-details').offset().top - 15,
|
|
18
18
|
}, 700);
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
@@ -22,14 +22,14 @@ Wick.PaymentDetails = (function () {
|
|
|
22
22
|
return false;
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
$('.checkout-payment-details__card-details').on('submit', function(){
|
|
25
|
+
$('.checkout-payment-details__card-details').on('submit', function() {
|
|
26
26
|
var $form = $(this);
|
|
27
27
|
if ($form.find('#card-type').val() &&
|
|
28
28
|
$form.find('#card-name1').val().length &&
|
|
29
29
|
$form.find('#card-number').val().length &&
|
|
30
30
|
$form.find('#month').val() &&
|
|
31
31
|
$form.find('#year').val() &&
|
|
32
|
-
$form.find('#security-code').val()){
|
|
32
|
+
$form.find('#security-code').val()) {
|
|
33
33
|
window.location.href = isGuestPage
|
|
34
34
|
? './page_checkout_confirmation_guest.html'
|
|
35
35
|
: './page_checkout_confirmation.html';
|