wickes-css2 2.113.0-develop.11 → 2.113.0-develop.13
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/Readme.md +0 -1
- package/build/css/category-main.css +1 -1
- package/build/css/components/checkout-payment-details-v2.css +1 -1
- package/build/css/components/checkout-payment-repayment-terms.css +1 -1
- package/build/css/components/price-block-v2-critical.css +1 -1
- package/build/css/components/price-block-v2.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/my-account-main-v2.css +1 -1
- package/build/css/my-account-main.css +1 -1
- package/build/css/pages/checkout-new.css +1 -1
- package/build/css/pages/checkout.css +1 -1
- package/build/css/pages/page_checkout_delivery-new.css +1 -1
- package/build/css/pages/page_products-list-combined.css +1 -1
- package/build/css/pages/page_products-list_v2.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-critical.css +1 -1
- package/build/css/pdp-main-non-critical.css +1 -1
- package/build/css/pdp-main.css +1 -1
- package/build/css/plp-main.css +1 -1
- package/build/js/page/ripple/thumb-gallery.js +102 -34
- package/package.json +1 -1
- package/src/components/suite-product-card.hbs +2 -2
- package/src/js/page/ripple/thumb-gallery.js +102 -34
- package/src/page_bathroom-plp-vat.html +1 -1
- package/src/page_bathroom-plp-without-load-more.html +1 -1
- package/src/page_bathroom-plp.html +1 -1
- package/src/page_checkout_delivery-details-v2-calendar-not-loaded.html +167 -0
- package/src/page_checkout_payment-details-v2-asm.html +2 -3
- package/src/page_checkout_payment-details-v2.html +2 -3
- package/src/page_checkout_payment-details_with-card-loader.html +2 -3
- package/src/page_checkout_payment-details_with-klarna-loader.html +2 -3
- package/src/page_checkout_payment-details_with-loader-v2.html +2 -3
- package/src/page_klarna_payment-details_with-klarna.html +2 -3
- package/src/page_payment-details-billie-registered-only.html +2 -3
- package/src/page_payment-details-billie-unregistered-only.html +2 -3
- package/src/page_payment-details-with-billie.html +2 -3
- package/src/page_payment-details-with-clearpay.html +2 -3
- package/src/page_payment-details-with-gift-card.html +2 -3
- package/src/page_payment-details_with_apple-pay.html +0 -1
- package/src/page_payment-details_with_google-pay.html +2 -3
- package/src/page_product-details-ripple-gallery-1-image.html +120 -0
- package/src/page_product-details-ripple-gallery-missing-image.html +121 -0
- package/src/page_product-details-ripple-gallery.html +1 -1
- package/src/page_product-details-suite-includes-banners.html +1 -1
- package/src/page_product-details-suite-includes-billie.html +1 -1
- package/src/page_product-details-suite-includes-klarna.html +1 -1
- package/src/page_product-details-suite-includes-vat.html +1 -1
- package/src/page_product-details-suite-includes.html +1 -1
- package/src/scss/common/_loading-button.scss +3 -1
- package/src/scss/components/_date-selection-add-new-styles.scss +24 -3
- package/src/scss/components/_gift-cards.scss +1 -1
- package/src/scss/components/_thumb-gallery-critical.scss +5 -4
- package/src/scss/components/_thumb-gallery.scss +9 -1
- package/src/scss/components/checkout-payment-details-v2.scss +44 -20
- package/src/scss/components/checkout-payment-repayment-terms.scss +0 -1
- package/src/scss/components/price-block-v2-critical.scss +4 -0
- package/src/scss/components/price-block-v2.scss +4 -0
- package/src/scss/pages/_checkout_delivery-details.scss +16 -104
- package/src/scss/pages/page_checkout_delivery-new.scss +252 -164
- package/src/scss/pages/page_products-list-combined.scss +8 -6
- package/src/scss/pages/page_products-list_v2.scss +8 -6
- package/src/sitemap.html +4 -0
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var Wick = window.Wick || {};
|
|
2
2
|
|
|
3
3
|
Wick.ThumbGallery = (function () {
|
|
4
|
-
const BASE_URL = 'https://media.wickes.co.uk/image/upload/';
|
|
5
|
-
const productName = window.pdpProduct && window.pdpProduct.name ? window.pdpProduct.name : '';
|
|
6
|
-
|
|
7
4
|
const IMG_BREAKPOINTS = [
|
|
8
5
|
{ media: '(max-width: 576px)', w: 576, h: 324 },
|
|
9
6
|
{ media: '(max-width: 768px)', w: 510, h: 287 },
|
|
@@ -13,40 +10,75 @@ Wick.ThumbGallery = (function () {
|
|
|
13
10
|
const MAIN_DEFAULT = { w: 710, h: 399 };
|
|
14
11
|
const THUMB = { w: 100, h: 56 };
|
|
15
12
|
|
|
16
|
-
function
|
|
13
|
+
function getMediaDomain() {
|
|
14
|
+
return (typeof window !== 'undefined' && window.mediaDomain) || 'media.wickes.co.uk';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getProductName() {
|
|
18
|
+
return (typeof window !== 'undefined' && window.pdpProduct && window.pdpProduct.name) || '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getBaseUrl(customDomain) {
|
|
22
|
+
const domain = customDomain || getMediaDomain();
|
|
23
|
+
const cleanDomain = domain.replace(/^https?:\/\//, '').replace(/\/$/, '');
|
|
24
|
+
return `https://${cleanDomain}/image/upload/`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function buildCloudinaryUrl(publicId, w, h, baseUrl) {
|
|
28
|
+
const base = baseUrl || getBaseUrl();
|
|
29
|
+
const cleanId = String(publicId).replace(/^\/+/, '');
|
|
17
30
|
const transforms = `b_rgb:FFFFFF,c_pad,dpr_1.0,f_jpg,h_${h},q_auto:good,w_${w}`;
|
|
18
|
-
return `${
|
|
31
|
+
return `${base}${transforms}/c_pad,h_${h},w_${w}/v1/${cleanId}`;
|
|
19
32
|
}
|
|
20
33
|
|
|
21
34
|
function parseIdentifiers(hybrisString) {
|
|
22
|
-
|
|
23
|
-
.
|
|
24
|
-
|
|
35
|
+
if (Array.isArray(hybrisString)) {
|
|
36
|
+
return hybrisString.filter(Boolean);
|
|
37
|
+
}
|
|
38
|
+
if (!hybrisString || typeof hybrisString !== 'string') {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
const trimmed = hybrisString.trim();
|
|
42
|
+
const content = trimmed.startsWith('[') && trimmed.endsWith(']')
|
|
43
|
+
? trimmed.slice(1, -1)
|
|
44
|
+
: trimmed;
|
|
45
|
+
|
|
46
|
+
return content
|
|
25
47
|
.split(',')
|
|
26
48
|
.map((s) => s.trim())
|
|
27
49
|
.filter(Boolean);
|
|
28
50
|
}
|
|
29
51
|
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
(bp) =>
|
|
33
|
-
`<source srcset="${buildCloudinaryUrl(publicId, bp.w, bp.h)}" media="${bp.media}">`
|
|
34
|
-
).join('\n ');
|
|
35
|
-
|
|
52
|
+
function renderMainSlide(src, sourcesHtml = '') {
|
|
53
|
+
const productName = getProductName();
|
|
36
54
|
return `<div class="thumb-gallery__slide-wrapper swiper-slide">
|
|
37
55
|
<picture>
|
|
38
|
-
${
|
|
39
|
-
<img class="swiper-slide-main" src="${
|
|
56
|
+
${sourcesHtml}
|
|
57
|
+
<img class="swiper-slide-main" src="${src}" alt="${productName}">
|
|
40
58
|
</picture>
|
|
41
59
|
</div>`;
|
|
42
60
|
}
|
|
43
61
|
|
|
44
|
-
function
|
|
62
|
+
function renderThumbSlide(src) {
|
|
63
|
+
const productName = getProductName();
|
|
45
64
|
return `<div class="thumb-gallery__slide-wrapper swiper-slide">
|
|
46
|
-
<img class="swiper-slide-thumbs" src="${
|
|
65
|
+
<img class="swiper-slide-thumbs" src="${src}" alt="${productName}">
|
|
47
66
|
</div>`;
|
|
48
67
|
}
|
|
49
68
|
|
|
69
|
+
function generateCloudinaryMainSlide(publicId, baseUrl) {
|
|
70
|
+
const sourcesHtml = IMG_BREAKPOINTS.map(
|
|
71
|
+
(bp) => `<source srcset="${buildCloudinaryUrl(publicId, bp.w, bp.h, baseUrl)}" media="${bp.media}">`
|
|
72
|
+
).join('\n ');
|
|
73
|
+
const fallbackSrc = buildCloudinaryUrl(publicId, MAIN_DEFAULT.w, MAIN_DEFAULT.h, baseUrl);
|
|
74
|
+
return renderMainSlide(fallbackSrc, sourcesHtml);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function generateCloudinaryThumbSlide(publicId, baseUrl) {
|
|
78
|
+
const src = buildCloudinaryUrl(publicId, THUMB.w, THUMB.h, baseUrl);
|
|
79
|
+
return renderThumbSlide(src);
|
|
80
|
+
}
|
|
81
|
+
|
|
50
82
|
const SELECTORS = {
|
|
51
83
|
galleryCarousel: '.thumb-gallery',
|
|
52
84
|
swiperContainerMain: '.swiper-container-main',
|
|
@@ -89,7 +121,11 @@ Wick.ThumbGallery = (function () {
|
|
|
89
121
|
function handleThumbClick(swiper) {
|
|
90
122
|
return function () {
|
|
91
123
|
const clickedIndex = $(this).index();
|
|
92
|
-
swiper.
|
|
124
|
+
if (swiper.params && swiper.params.loop) {
|
|
125
|
+
swiper.slideToLoop(clickedIndex);
|
|
126
|
+
} else {
|
|
127
|
+
swiper.slideTo(clickedIndex);
|
|
128
|
+
}
|
|
93
129
|
};
|
|
94
130
|
}
|
|
95
131
|
|
|
@@ -110,9 +146,11 @@ Wick.ThumbGallery = (function () {
|
|
|
110
146
|
};
|
|
111
147
|
}
|
|
112
148
|
|
|
113
|
-
function getMainSwiperConfig($nextBtn, $prevBtn, thumbsSwiper, onSlideChange) {
|
|
149
|
+
function getMainSwiperConfig($nextBtn, $prevBtn, thumbsSwiper, onSlideChange, count) {
|
|
114
150
|
return {
|
|
115
151
|
...MAIN_SWIPER_CONFIG,
|
|
152
|
+
loop: count > 1,
|
|
153
|
+
simulateTouch: count > 1,
|
|
116
154
|
navigation: {
|
|
117
155
|
nextEl: $nextBtn[0],
|
|
118
156
|
prevEl: $prevBtn[0],
|
|
@@ -122,17 +160,44 @@ Wick.ThumbGallery = (function () {
|
|
|
122
160
|
};
|
|
123
161
|
}
|
|
124
162
|
|
|
125
|
-
function initializeCarousel($slider, ids) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
163
|
+
function initializeCarousel($slider, ids, baseUrl, missingImage) {
|
|
164
|
+
const isMissing = ids.length === 0 && Boolean(missingImage);
|
|
165
|
+
if (ids.length === 0 && !missingImage) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
130
168
|
|
|
131
169
|
const $container = $slider.find(SELECTORS.swiperContainerMain);
|
|
170
|
+
const $thumbContainer = $slider.find(SELECTORS.swiperContainerThumbs);
|
|
171
|
+
if (!$container.length || !$thumbContainer.length) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if ($container[0].swiper) {
|
|
176
|
+
$container[0].swiper.destroy(true, true);
|
|
177
|
+
}
|
|
178
|
+
if ($thumbContainer[0].swiper) {
|
|
179
|
+
$thumbContainer[0].swiper.destroy(true, true);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const total = isMissing ? 1 : ids.length;
|
|
183
|
+
$slider.attr('data-length', total);
|
|
184
|
+
|
|
185
|
+
if (isMissing) {
|
|
186
|
+
$slider.addClass('thumb-gallery--missing-image');
|
|
187
|
+
$slider.find(SELECTORS.swiperMainWrapper).html(renderMainSlide(missingImage));
|
|
188
|
+
$slider.find(SELECTORS.swiperThumbsWrapper).html(renderThumbSlide(missingImage));
|
|
189
|
+
} else {
|
|
190
|
+
$slider.removeClass('thumb-gallery--missing-image');
|
|
191
|
+
$slider
|
|
192
|
+
.find(SELECTORS.swiperMainWrapper)
|
|
193
|
+
.html(ids.map((id) => generateCloudinaryMainSlide(id, baseUrl)).join('\n'));
|
|
194
|
+
$slider
|
|
195
|
+
.find(SELECTORS.swiperThumbsWrapper)
|
|
196
|
+
.html(ids.map((id) => generateCloudinaryThumbSlide(id, baseUrl)).join('\n'));
|
|
197
|
+
}
|
|
198
|
+
|
|
132
199
|
const $nextBtn = $slider.find(SELECTORS.nextBtn);
|
|
133
200
|
const $prevBtn = $slider.find(SELECTORS.prevBtn);
|
|
134
|
-
|
|
135
|
-
const $thumbContainer = $slider.find(SELECTORS.swiperContainerThumbs);
|
|
136
201
|
const $thumbNextBtn = $slider.find(SELECTORS.thumbNextBtn);
|
|
137
202
|
const $thumbPrevBtn = $slider.find(SELECTORS.thumbPrevBtn);
|
|
138
203
|
|
|
@@ -145,22 +210,25 @@ Wick.ThumbGallery = (function () {
|
|
|
145
210
|
$container[0],
|
|
146
211
|
getMainSwiperConfig($nextBtn, $prevBtn, thumbsSwiper, () => {
|
|
147
212
|
updateActiveThumbnail(swiper, thumbsSwiper);
|
|
148
|
-
})
|
|
213
|
+
}, total)
|
|
149
214
|
);
|
|
150
215
|
|
|
151
|
-
$thumbContainer
|
|
216
|
+
$thumbContainer
|
|
217
|
+
.off('click', SELECTORS.swiperSlide)
|
|
218
|
+
.on('click', SELECTORS.swiperSlide, handleThumbClick(swiper));
|
|
219
|
+
|
|
152
220
|
updateActiveThumbnail(swiper, thumbsSwiper);
|
|
153
221
|
}
|
|
154
222
|
|
|
155
|
-
function init(hybrisString) {
|
|
223
|
+
function init(hybrisString, options = {}) {
|
|
156
224
|
const ids = parseIdentifiers(hybrisString);
|
|
157
225
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
226
|
+
const opts = typeof options === 'string' ? { mediaDomain: options } : (options || {});
|
|
227
|
+
const baseUrl = getBaseUrl(opts.mediaDomain);
|
|
228
|
+
const missingImage = opts.missingImage || '';
|
|
161
229
|
|
|
162
230
|
$(SELECTORS.galleryCarousel).each(function (_, slider) {
|
|
163
|
-
initializeCarousel($(slider), ids);
|
|
231
|
+
initializeCarousel($(slider), ids, baseUrl, missingImage);
|
|
164
232
|
});
|
|
165
233
|
}
|
|
166
234
|
|
package/package.json
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
<div class="suite-product-card__price-qty">
|
|
17
17
|
<div class="suite-product-card__vat including-vat">
|
|
18
18
|
<span class="suite-product-card__price{{#if was_price}} suite-product-card__price--red{{/if}}">£{{price-vat}}</span>
|
|
19
|
-
<span class="suite-product-card__vat-text">Inc.
|
|
19
|
+
<span class="suite-product-card__vat-text">Inc.VAT</span>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<div class="suite-product-card__vat excluding-vat d-none">
|
|
23
23
|
<span class="suite-product-card__price{{#if was_price}} suite-product-card__price--red{{/if}}">£{{price}}</span>
|
|
24
|
-
<span class="suite-product-card__vat-text">Exc.
|
|
24
|
+
<span class="suite-product-card__vat-text">Exc.VAT</span>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<span class="suite-product-card__quantity">
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var Wick = window.Wick || {};
|
|
2
2
|
|
|
3
3
|
Wick.ThumbGallery = (function () {
|
|
4
|
-
const BASE_URL = 'https://media.wickes.co.uk/image/upload/';
|
|
5
|
-
const productName = window.pdpProduct && window.pdpProduct.name ? window.pdpProduct.name : '';
|
|
6
|
-
|
|
7
4
|
const IMG_BREAKPOINTS = [
|
|
8
5
|
{ media: '(max-width: 576px)', w: 576, h: 324 },
|
|
9
6
|
{ media: '(max-width: 768px)', w: 510, h: 287 },
|
|
@@ -13,40 +10,75 @@ Wick.ThumbGallery = (function () {
|
|
|
13
10
|
const MAIN_DEFAULT = { w: 710, h: 399 };
|
|
14
11
|
const THUMB = { w: 100, h: 56 };
|
|
15
12
|
|
|
16
|
-
function
|
|
13
|
+
function getMediaDomain() {
|
|
14
|
+
return (typeof window !== 'undefined' && window.mediaDomain) || 'media.wickes.co.uk';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getProductName() {
|
|
18
|
+
return (typeof window !== 'undefined' && window.pdpProduct && window.pdpProduct.name) || '';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getBaseUrl(customDomain) {
|
|
22
|
+
const domain = customDomain || getMediaDomain();
|
|
23
|
+
const cleanDomain = domain.replace(/^https?:\/\//, '').replace(/\/$/, '');
|
|
24
|
+
return `https://${cleanDomain}/image/upload/`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function buildCloudinaryUrl(publicId, w, h, baseUrl) {
|
|
28
|
+
const base = baseUrl || getBaseUrl();
|
|
29
|
+
const cleanId = String(publicId).replace(/^\/+/, '');
|
|
17
30
|
const transforms = `b_rgb:FFFFFF,c_pad,dpr_1.0,f_jpg,h_${h},q_auto:good,w_${w}`;
|
|
18
|
-
return `${
|
|
31
|
+
return `${base}${transforms}/c_pad,h_${h},w_${w}/v1/${cleanId}`;
|
|
19
32
|
}
|
|
20
33
|
|
|
21
34
|
function parseIdentifiers(hybrisString) {
|
|
22
|
-
|
|
23
|
-
.
|
|
24
|
-
|
|
35
|
+
if (Array.isArray(hybrisString)) {
|
|
36
|
+
return hybrisString.filter(Boolean);
|
|
37
|
+
}
|
|
38
|
+
if (!hybrisString || typeof hybrisString !== 'string') {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
const trimmed = hybrisString.trim();
|
|
42
|
+
const content = trimmed.startsWith('[') && trimmed.endsWith(']')
|
|
43
|
+
? trimmed.slice(1, -1)
|
|
44
|
+
: trimmed;
|
|
45
|
+
|
|
46
|
+
return content
|
|
25
47
|
.split(',')
|
|
26
48
|
.map((s) => s.trim())
|
|
27
49
|
.filter(Boolean);
|
|
28
50
|
}
|
|
29
51
|
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
(bp) =>
|
|
33
|
-
`<source srcset="${buildCloudinaryUrl(publicId, bp.w, bp.h)}" media="${bp.media}">`
|
|
34
|
-
).join('\n ');
|
|
35
|
-
|
|
52
|
+
function renderMainSlide(src, sourcesHtml = '') {
|
|
53
|
+
const productName = getProductName();
|
|
36
54
|
return `<div class="thumb-gallery__slide-wrapper swiper-slide">
|
|
37
55
|
<picture>
|
|
38
|
-
${
|
|
39
|
-
<img class="swiper-slide-main" src="${
|
|
56
|
+
${sourcesHtml}
|
|
57
|
+
<img class="swiper-slide-main" src="${src}" alt="${productName}">
|
|
40
58
|
</picture>
|
|
41
59
|
</div>`;
|
|
42
60
|
}
|
|
43
61
|
|
|
44
|
-
function
|
|
62
|
+
function renderThumbSlide(src) {
|
|
63
|
+
const productName = getProductName();
|
|
45
64
|
return `<div class="thumb-gallery__slide-wrapper swiper-slide">
|
|
46
|
-
<img class="swiper-slide-thumbs" src="${
|
|
65
|
+
<img class="swiper-slide-thumbs" src="${src}" alt="${productName}">
|
|
47
66
|
</div>`;
|
|
48
67
|
}
|
|
49
68
|
|
|
69
|
+
function generateCloudinaryMainSlide(publicId, baseUrl) {
|
|
70
|
+
const sourcesHtml = IMG_BREAKPOINTS.map(
|
|
71
|
+
(bp) => `<source srcset="${buildCloudinaryUrl(publicId, bp.w, bp.h, baseUrl)}" media="${bp.media}">`
|
|
72
|
+
).join('\n ');
|
|
73
|
+
const fallbackSrc = buildCloudinaryUrl(publicId, MAIN_DEFAULT.w, MAIN_DEFAULT.h, baseUrl);
|
|
74
|
+
return renderMainSlide(fallbackSrc, sourcesHtml);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function generateCloudinaryThumbSlide(publicId, baseUrl) {
|
|
78
|
+
const src = buildCloudinaryUrl(publicId, THUMB.w, THUMB.h, baseUrl);
|
|
79
|
+
return renderThumbSlide(src);
|
|
80
|
+
}
|
|
81
|
+
|
|
50
82
|
const SELECTORS = {
|
|
51
83
|
galleryCarousel: '.thumb-gallery',
|
|
52
84
|
swiperContainerMain: '.swiper-container-main',
|
|
@@ -89,7 +121,11 @@ Wick.ThumbGallery = (function () {
|
|
|
89
121
|
function handleThumbClick(swiper) {
|
|
90
122
|
return function () {
|
|
91
123
|
const clickedIndex = $(this).index();
|
|
92
|
-
swiper.
|
|
124
|
+
if (swiper.params && swiper.params.loop) {
|
|
125
|
+
swiper.slideToLoop(clickedIndex);
|
|
126
|
+
} else {
|
|
127
|
+
swiper.slideTo(clickedIndex);
|
|
128
|
+
}
|
|
93
129
|
};
|
|
94
130
|
}
|
|
95
131
|
|
|
@@ -110,9 +146,11 @@ Wick.ThumbGallery = (function () {
|
|
|
110
146
|
};
|
|
111
147
|
}
|
|
112
148
|
|
|
113
|
-
function getMainSwiperConfig($nextBtn, $prevBtn, thumbsSwiper, onSlideChange) {
|
|
149
|
+
function getMainSwiperConfig($nextBtn, $prevBtn, thumbsSwiper, onSlideChange, count) {
|
|
114
150
|
return {
|
|
115
151
|
...MAIN_SWIPER_CONFIG,
|
|
152
|
+
loop: count > 1,
|
|
153
|
+
simulateTouch: count > 1,
|
|
116
154
|
navigation: {
|
|
117
155
|
nextEl: $nextBtn[0],
|
|
118
156
|
prevEl: $prevBtn[0],
|
|
@@ -122,17 +160,44 @@ Wick.ThumbGallery = (function () {
|
|
|
122
160
|
};
|
|
123
161
|
}
|
|
124
162
|
|
|
125
|
-
function initializeCarousel($slider, ids) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
163
|
+
function initializeCarousel($slider, ids, baseUrl, missingImage) {
|
|
164
|
+
const isMissing = ids.length === 0 && Boolean(missingImage);
|
|
165
|
+
if (ids.length === 0 && !missingImage) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
130
168
|
|
|
131
169
|
const $container = $slider.find(SELECTORS.swiperContainerMain);
|
|
170
|
+
const $thumbContainer = $slider.find(SELECTORS.swiperContainerThumbs);
|
|
171
|
+
if (!$container.length || !$thumbContainer.length) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if ($container[0].swiper) {
|
|
176
|
+
$container[0].swiper.destroy(true, true);
|
|
177
|
+
}
|
|
178
|
+
if ($thumbContainer[0].swiper) {
|
|
179
|
+
$thumbContainer[0].swiper.destroy(true, true);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const total = isMissing ? 1 : ids.length;
|
|
183
|
+
$slider.attr('data-length', total);
|
|
184
|
+
|
|
185
|
+
if (isMissing) {
|
|
186
|
+
$slider.addClass('thumb-gallery--missing-image');
|
|
187
|
+
$slider.find(SELECTORS.swiperMainWrapper).html(renderMainSlide(missingImage));
|
|
188
|
+
$slider.find(SELECTORS.swiperThumbsWrapper).html(renderThumbSlide(missingImage));
|
|
189
|
+
} else {
|
|
190
|
+
$slider.removeClass('thumb-gallery--missing-image');
|
|
191
|
+
$slider
|
|
192
|
+
.find(SELECTORS.swiperMainWrapper)
|
|
193
|
+
.html(ids.map((id) => generateCloudinaryMainSlide(id, baseUrl)).join('\n'));
|
|
194
|
+
$slider
|
|
195
|
+
.find(SELECTORS.swiperThumbsWrapper)
|
|
196
|
+
.html(ids.map((id) => generateCloudinaryThumbSlide(id, baseUrl)).join('\n'));
|
|
197
|
+
}
|
|
198
|
+
|
|
132
199
|
const $nextBtn = $slider.find(SELECTORS.nextBtn);
|
|
133
200
|
const $prevBtn = $slider.find(SELECTORS.prevBtn);
|
|
134
|
-
|
|
135
|
-
const $thumbContainer = $slider.find(SELECTORS.swiperContainerThumbs);
|
|
136
201
|
const $thumbNextBtn = $slider.find(SELECTORS.thumbNextBtn);
|
|
137
202
|
const $thumbPrevBtn = $slider.find(SELECTORS.thumbPrevBtn);
|
|
138
203
|
|
|
@@ -145,22 +210,25 @@ Wick.ThumbGallery = (function () {
|
|
|
145
210
|
$container[0],
|
|
146
211
|
getMainSwiperConfig($nextBtn, $prevBtn, thumbsSwiper, () => {
|
|
147
212
|
updateActiveThumbnail(swiper, thumbsSwiper);
|
|
148
|
-
})
|
|
213
|
+
}, total)
|
|
149
214
|
);
|
|
150
215
|
|
|
151
|
-
$thumbContainer
|
|
216
|
+
$thumbContainer
|
|
217
|
+
.off('click', SELECTORS.swiperSlide)
|
|
218
|
+
.on('click', SELECTORS.swiperSlide, handleThumbClick(swiper));
|
|
219
|
+
|
|
152
220
|
updateActiveThumbnail(swiper, thumbsSwiper);
|
|
153
221
|
}
|
|
154
222
|
|
|
155
|
-
function init(hybrisString) {
|
|
223
|
+
function init(hybrisString, options = {}) {
|
|
156
224
|
const ids = parseIdentifiers(hybrisString);
|
|
157
225
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
226
|
+
const opts = typeof options === 'string' ? { mediaDomain: options } : (options || {});
|
|
227
|
+
const baseUrl = getBaseUrl(opts.mediaDomain);
|
|
228
|
+
const missingImage = opts.missingImage || '';
|
|
161
229
|
|
|
162
230
|
$(SELECTORS.galleryCarousel).each(function (_, slider) {
|
|
163
|
-
initializeCarousel($(slider), ids);
|
|
231
|
+
initializeCarousel($(slider), ids, baseUrl, missingImage);
|
|
164
232
|
});
|
|
165
233
|
}
|
|
166
234
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{{> search-filter collapsed="accordion_collapsed" hidden="hidden-state"}}
|
|
20
20
|
</aside>
|
|
21
21
|
|
|
22
|
-
<div class="package-plp__content">
|
|
22
|
+
<div class="package-plp__content products-list-v2">
|
|
23
23
|
<div class="plp-filters" data-component="plp-filters" aria-label="Product filters">
|
|
24
24
|
<div class="plp-filters__bar plp-filters__bar-mobile" role="tablist" aria-label="Filters">
|
|
25
25
|
{{> kitchen/mobile-nav-item
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{{> search-filter collapsed="accordion_collapsed" hidden="hidden-state"}}
|
|
27
27
|
</aside>
|
|
28
28
|
|
|
29
|
-
<div class="package-plp__content">
|
|
29
|
+
<div class="package-plp__content products-list-v2">
|
|
30
30
|
<div class="plp-filters" data-component="plp-filters" aria-label="Product filters">
|
|
31
31
|
<div class="plp-filters__bar plp-filters__bar-mobile" role="tablist" aria-label="Filters">
|
|
32
32
|
{{> kitchen/mobile-nav-item
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{{> search-filter collapsed="accordion_collapsed" hidden="hidden-state"}}
|
|
27
27
|
</aside>
|
|
28
28
|
|
|
29
|
-
<div class="package-plp__content">
|
|
29
|
+
<div class="package-plp__content products-list-v2">
|
|
30
30
|
<div class="plp-filters" data-component="plp-filters" aria-label="Product filters">
|
|
31
31
|
<div class="plp-filters__bar plp-filters__bar-mobile" role="tablist" aria-label="Filters">
|
|
32
32
|
{{> kitchen/mobile-nav-item
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{{#extend "checkout-new" pageClass="page_checkout-delivery-new page_checkout-confirmation-new page_checkout" title="Checkout - Delivery details calendar not loaded" isAsideSticky="true"}}
|
|
2
|
+
{{#content "steps"}}
|
|
3
|
+
{{> steps-three-steps active-step-index="1"}}
|
|
4
|
+
{{/content}}
|
|
5
|
+
|
|
6
|
+
{{#content "head" mode="append"}}
|
|
7
|
+
<link type="text/css" rel="stylesheet" href="./css/pages/checkout-new.css">
|
|
8
|
+
<link type="text/css" rel="stylesheet" href="./css/pages/page_checkout_delivery-new.css">
|
|
9
|
+
{{/content}}
|
|
10
|
+
|
|
11
|
+
{{#content "aside"}}
|
|
12
|
+
{{> order-summary delivery-address-v2.summary no-action=true id=1 basket-id=true}}
|
|
13
|
+
{{/content}}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
{{#content "main"}}
|
|
17
|
+
<div class="delivery-block">
|
|
18
|
+
<h3 class="delivery-block__heading">Delivery Information</h3>
|
|
19
|
+
<div class="delivery-block__wrapper">
|
|
20
|
+
|
|
21
|
+
<div class="date-selection__wrapper">
|
|
22
|
+
<h3 class="date-selection__header">Select delivery date</h3>
|
|
23
|
+
<p class="date-selection__info-block">
|
|
24
|
+
Please choose a date for delivery from the calendar below
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="component component-date-selection">
|
|
29
|
+
<div class="delivery-details-product-oos">
|
|
30
|
+
<div class="product-oos-inner">
|
|
31
|
+
<div class="row">
|
|
32
|
+
<div class="content">
|
|
33
|
+
<h5>
|
|
34
|
+
We will pick the next available slot for you
|
|
35
|
+
</h5>
|
|
36
|
+
<p>The delivery calendar is not available at the moment but don't worry, we will pick the next available delivery slot for you. We will be in touch via email to confirm your delivery date.</p>
|
|
37
|
+
<p>Please press the Payment details button to continue.</p>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
{{#with checkoutOrder.deliveryDeliveryDetails.[0]}}
|
|
46
|
+
<div class="checkout-order">
|
|
47
|
+
{{> checkout-order-block}}
|
|
48
|
+
</div>
|
|
49
|
+
{{/with}}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="click-collect-block">
|
|
56
|
+
<h3 class="click-collect-block__heading">Click & Collect</h3>
|
|
57
|
+
|
|
58
|
+
<div class="click-collect-block__head-info">
|
|
59
|
+
<p>Simply enter or correct the contact information required below and continue to the next step of the checkout.</p>
|
|
60
|
+
<div class="head-info__wrapper">
|
|
61
|
+
<div class="head-info__wrapper-exclamation">
|
|
62
|
+
<i class="far fa-exclamation-circle"></i>
|
|
63
|
+
<span>Your order will be held for up to 24 hours</span>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="head-info__wrapper-text">
|
|
66
|
+
<p>You will receive a text when your order is ready to collect (usually within 1 trading hour of receiving your order confirmation email).</p>
|
|
67
|
+
<p>Please wait for confirmation before travelling to your chosen store.</p>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class="click-collect-block__wrapper">
|
|
73
|
+
|
|
74
|
+
{{#with checkoutOrder.clickCollectDeliveryAddress.[0]}}
|
|
75
|
+
<div class="checkout-order">
|
|
76
|
+
{{> checkout-order-block}}
|
|
77
|
+
</div>
|
|
78
|
+
{{/with}}
|
|
79
|
+
|
|
80
|
+
<div class="add-contact-details">
|
|
81
|
+
<h3 class="add-contact-details__heading">Add contact details</h3>
|
|
82
|
+
<p>Please enter your phone number(s) below so we can contact you regarding your order.</p>
|
|
83
|
+
|
|
84
|
+
<div class="add-contact-details__form">
|
|
85
|
+
{{> form-row type="tel" id="mobile" label="Mobile number" required="true"}}
|
|
86
|
+
{{> form-row type="tel" id="home-phone" label="Home phone"}}
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="simplify-collection">
|
|
93
|
+
<h3 class="simplify-collection__heading">Simplify your collection</h3>
|
|
94
|
+
<p class="simplify-collection__info">All the Click & Collect items in your order are currently available at the following stores. Select
|
|
95
|
+
one of the store to collect all your items from the same location.</p>
|
|
96
|
+
|
|
97
|
+
<div class="simplify-collection__wrapper">
|
|
98
|
+
<div class="your-contact-details__checkbox">
|
|
99
|
+
{{#extend "radiobutton" id="oldham" name="store" label="Oldham" checked="true"}}
|
|
100
|
+
{{#content "html"}}
|
|
101
|
+
<span class="distance">6.2 Miles</span>
|
|
102
|
+
<div class="store-address">
|
|
103
|
+
<div class="store-address__street">Wickes Larch Street,</div>
|
|
104
|
+
<div class="store-address__town">Oldham</div>
|
|
105
|
+
<div class="store-address__city">Greater Manchester,</div>
|
|
106
|
+
<div class="store-address__postcode">OL8 1TA</div>
|
|
107
|
+
<div class="store-address__country">United Kingdom</div>
|
|
108
|
+
</div>
|
|
109
|
+
{{/content}}
|
|
110
|
+
{{/extend}}
|
|
111
|
+
</div>
|
|
112
|
+
<div class="your-contact-details__checkbox">
|
|
113
|
+
{{#extend "radiobutton" id="clifton" name="store" label="Clifton"}}
|
|
114
|
+
{{#content "html"}}
|
|
115
|
+
<span class="distance">4.9 Miles</span>
|
|
116
|
+
<div class="store-address">
|
|
117
|
+
<div class="store-address__street">Wickes Wynne Avenue,</div>
|
|
118
|
+
<div class="store-address__town"> Clifton, Swinton</div>
|
|
119
|
+
<div class="store-address__city">Greater Manchester,</div>
|
|
120
|
+
<div class="store-address__postcode">M27 8FU</div>
|
|
121
|
+
<div class="store-address__country">United Kingdom</div>
|
|
122
|
+
</div>
|
|
123
|
+
{{/content}}
|
|
124
|
+
{{/extend}}
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<p class="simplify-collection__info">I would like to update my order to collect all my items from one store.</p>
|
|
129
|
+
|
|
130
|
+
<button class="btn btn-primary simplify-collection__btn">
|
|
131
|
+
<span class="btn__text">Simplify collection</span>
|
|
132
|
+
</button>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div class="continue-btn">
|
|
136
|
+
<button class="btn btn-action">Continue to Payment Details</button>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
{{/content}}
|
|
140
|
+
|
|
141
|
+
{{#content "foot" mode="append"}}
|
|
142
|
+
{{> checkout-voucher-remove-modal
|
|
143
|
+
shopping-cart-v2.checkout.voucher-remove-popup
|
|
144
|
+
id="voucher-remove-popup"
|
|
145
|
+
}}
|
|
146
|
+
<script defer src="./js/page/checkout-confirmation-new.js"></script>
|
|
147
|
+
<script defer src="./js/page/select-address.js"></script>
|
|
148
|
+
|
|
149
|
+
{{#extend "modal" classMod="edit-delivery-address" id="modalEditAddress" title="Edit delivery address" fullWidth=true}}
|
|
150
|
+
{{#content "body"}}
|
|
151
|
+
<div class="edit-address-modal-block">
|
|
152
|
+
<div class="delivery-block__wrapper customer-journey-block">
|
|
153
|
+
{{> notifications notification-page.error-deliver-area}}
|
|
154
|
+
<div class="delivery-block__wrapper customer-journey-block">
|
|
155
|
+
{{> user-address-delivery radioName="checkout-address-radio" modal="modalDeliveryEdit" selectedAddress=true simpleAddress=true isDeleted=true}}
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<button class="btn btn-action btn_full">
|
|
160
|
+
<span class="btn__text">Continue to delivery details</span>
|
|
161
|
+
</button>
|
|
162
|
+
</div>
|
|
163
|
+
{{/content}}
|
|
164
|
+
{{/extend}}
|
|
165
|
+
|
|
166
|
+
{{/content}}
|
|
167
|
+
{{/extend}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{{#extend "checkout" pageClass="page_checkout-delivery-new page_checkout-confirmation-new" title="Checkout - Payment details" isAsideSticky="true"}}
|
|
1
|
+
{{#extend "checkout" pageClass="page_checkout-delivery-new page_checkout-confirmation-new" title="Checkout - Payment details" isAsideSticky="true" checkout=true}}
|
|
2
2
|
{{#content "steps"}}
|
|
3
3
|
{{> steps active-step-index="3" }}
|
|
4
4
|
{{/content}}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{{/content}}
|
|
12
12
|
|
|
13
13
|
{{#content "aside"}}
|
|
14
|
-
{{> order-summary delivery-address-v2.summary no-action=true id=1 basket-id=true email=true hideDeliveryCostMessage=true}}
|
|
14
|
+
{{> order-summary delivery-address-v2.summary no-action=true id=1 basket-id=true email=true hideDeliveryCostMessage=true checkout=true}}
|
|
15
15
|
{{/content}}
|
|
16
16
|
|
|
17
17
|
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
41
|
<div class="billing-payment-block">
|
|
42
|
-
<h3 class="billing-payment-block__heading">Billing & Payment</h3>
|
|
43
42
|
<div class="billing-payment-block__wrapper">
|
|
44
43
|
{{> checkout-payment-details-v2 }}
|
|
45
44
|
</div>
|