wickes-css2 2.113.0-develop.3 → 2.113.0-develop.6
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/main.css +1 -1
- package/build/css/pages/checkout-new.css +1 -1
- package/build/css/pages/page_checkout_delivery-new.css +1 -1
- package/build/css/pages/page_merged-basket.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-non-critical.css +1 -1
- package/build/css/pdp-main.css +1 -1
- package/build/img/emulation/low-trees.png +0 -0
- package/build/img/emulation/overhead-power-cables.png +0 -0
- package/build/img/emulation/parked-vehicles.png +0 -0
- package/build/img/emulation/traffic-access-issues.png +0 -0
- package/build/img/emulation/walls-or-fences.png +0 -0
- package/build/js/basket.min.js +1 -1
- package/build/js/bloomreach-widget.min.js +1 -1
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +1 -1
- package/build/js/emulation.min.js +360 -3222
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/page/bloomreach-widget/bloomreach-recommendation-carousel-widget.js +318 -0
- package/build/js/page/bloomreach-widget/bloomreach-widget-core.js +370 -0
- package/build/js/page/bloomreach-widget/bloomreach-widget-tracking.js +16 -13
- package/build/js/page/bloomreach-widget/bloomreach-widget.js +8 -237
- package/build/js/page/bloomreach-widget/complete-your-project/cards.js +308 -0
- package/build/js/page/bloomreach-widget/complete-your-project/config.js +60 -0
- package/build/js/page/bloomreach-widget/complete-your-project/model.js +140 -0
- package/build/js/page/bloomreach-widget/complete-your-project/presenter.js +69 -0
- package/build/js/page/bloomreach-widget/complete-your-project/quantity.js +80 -0
- package/build/js/page/bloomreach-widget/complete-your-project/view.js +179 -0
- package/build/js/page/bloomreach-widget/complete-your-project/widget.js +185 -0
- package/build/js/page/bloomreach-widget/dont-forget-widget.js +15 -0
- package/build/js/page/bloomreach-widget/why-not-add-widget.js +10 -228
- package/build/js/pdp.bundle.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -1
- package/package.json +1 -1
- package/src/components/base/button.hbs +7 -0
- package/src/components/bloomreach/complete-your-project-skeleton.hbs +21 -0
- package/src/components/bloomreach/complete-your-project.hbs +6 -21
- package/src/components/bloomreach/why-not-add-card-skeleton.hbs +2 -2
- package/src/components/bloomreach/why-not-add-card.hbs +79 -60
- package/src/components/bloomreach/why-not-add-content.hbs +3 -3
- package/src/components/bloomreach/why-not-add.hbs +1 -1
- package/src/components/date-selection.hbs +17 -12
- package/src/components/heavy-banners-wrapper.hbs +21 -0
- package/src/data/data_heavy-banner.json +29 -0
- package/src/img/emulation/low-trees.png +0 -0
- package/src/img/emulation/overhead-power-cables.png +0 -0
- package/src/img/emulation/parked-vehicles.png +0 -0
- package/src/img/emulation/traffic-access-issues.png +0 -0
- package/src/img/emulation/walls-or-fences.png +0 -0
- package/src/js/components/general/cart-slider.js +41 -4
- package/src/js/emulation/complete-your-project-loading.js +16 -0
- package/src/js/emulation/custom-slider-emulation.js +21 -8
- package/src/js/emulation/dont-forget-loading.js +36 -0
- package/src/js/emulation/just-added-scenarios-emulation.js +131 -0
- package/src/js/emulation/mini-basket.js +34 -34
- package/src/js/emulation/mock.js +429 -4
- package/src/js/emulation/why-not-add-loading.js +14 -3
- package/src/js/emulation/why-not-add.js +12 -14
- package/src/js/page/bloomreach-widget/bloomreach-recommendation-carousel-widget.js +318 -0
- package/src/js/page/bloomreach-widget/bloomreach-widget-core.js +370 -0
- package/src/js/page/bloomreach-widget/bloomreach-widget-tracking.js +16 -13
- package/src/js/page/bloomreach-widget/bloomreach-widget.js +8 -237
- package/src/js/page/bloomreach-widget/complete-your-project/cards.js +308 -0
- package/src/js/page/bloomreach-widget/complete-your-project/config.js +60 -0
- package/src/js/page/bloomreach-widget/complete-your-project/model.js +140 -0
- package/src/js/page/bloomreach-widget/complete-your-project/presenter.js +69 -0
- package/src/js/page/bloomreach-widget/complete-your-project/quantity.js +80 -0
- package/src/js/page/bloomreach-widget/complete-your-project/view.js +179 -0
- package/src/js/page/bloomreach-widget/complete-your-project/widget.js +185 -0
- package/src/js/page/bloomreach-widget/dont-forget-widget.js +15 -0
- package/src/js/page/bloomreach-widget/why-not-add-widget.js +10 -228
- package/src/page_checkout_big-bulky-delivery-details.html +272 -0
- package/src/page_product-details-with-global-search-v2.html +4 -6
- package/src/page_product-details-with-why-not-add-single.html +1 -1
- package/src/scss/components/_checkout_order.scss +2 -1
- package/src/scss/components/_heavy-banners.scss +216 -0
- package/src/scss/components/bloomreach/_bloomreach.scss +1 -0
- package/src/scss/components/bloomreach/_card-shared.scss +24 -0
- package/src/scss/components/bloomreach/_complete-card.scss +1 -9
- package/src/scss/components/bloomreach/_why-not-add-card.scss +137 -10
- package/src/scss/components/bloomreach/_why-not-add.scss +31 -2
- package/src/scss/main.scss +1 -0
- package/src/scss/pages/page_checkout_delivery-new.scss +4 -0
- package/src/sitemap.html +2 -0
- package/build/js/page/bloomreach-widget/complete-your-project-widget.js +0 -1100
- package/src/js/page/bloomreach-widget/complete-your-project-widget.js +0 -1100
package/package.json
CHANGED
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
<span class="loading-button__loader d-none">
|
|
16
16
|
{{> loader modifier=loaderModifier}}
|
|
17
17
|
</span>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
{{#if successIcon}}
|
|
21
|
+
<span class="icon button__icon button__icon--success d-none">
|
|
22
|
+
<i class="{{successIcon}}"></i>
|
|
23
|
+
</span>
|
|
24
|
+
{{/if}}
|
|
18
25
|
{{else}}
|
|
19
26
|
{{#if icon}}
|
|
20
27
|
<i class="{{icon}}"></i>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div class="complete-widget">
|
|
2
|
+
<h3 class="complete-widget__title text-center">
|
|
3
|
+
{{#if title}}{{title}}{{else}}Complete your project{{/if}}
|
|
4
|
+
</h3>
|
|
5
|
+
|
|
6
|
+
<div class="complete-widget__content" data-complete-widget-content>
|
|
7
|
+
<div class="complete-widget__wrapper">
|
|
8
|
+
{{> bloomreach/complete-card-skeleton}}
|
|
9
|
+
|
|
10
|
+
<div class="complete-widget__divider">
|
|
11
|
+
<i class="fal fa-plus"></i>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
{{> bloomreach/complete-card-skeleton}}
|
|
15
|
+
{{> bloomreach/complete-card-skeleton}}
|
|
16
|
+
{{> bloomreach/complete-card-skeleton}}
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
{{> bloomreach/complete-summary-skeleton}}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
3
|
-
{{#if
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div class="complete-widget__wrapper">
|
|
8
|
-
{{> bloomreach/complete-card-skeleton}}
|
|
9
|
-
|
|
10
|
-
<div class="complete-widget__divider">
|
|
11
|
-
<i class="fal fa-plus"></i>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
{{> bloomreach/complete-card-skeleton}}
|
|
15
|
-
{{> bloomreach/complete-card-skeleton}}
|
|
16
|
-
{{> bloomreach/complete-card-skeleton}}
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
{{> bloomreach/complete-summary-skeleton}}
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
1
|
+
<div
|
|
2
|
+
data-complete-widget
|
|
3
|
+
{{#if context}}data-mock-key="{{context}}"{{/if}}
|
|
4
|
+
>
|
|
5
|
+
{{> bloomreach/complete-your-project-skeleton}}
|
|
6
|
+
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="why-not-add-card why-not-add-card--skeleton ssc">
|
|
1
|
+
<div class="why-not-add-card-wrapper why-not-add-card--skeleton ssc">
|
|
2
2
|
<div class="ssc-square why-not-add-card__image"></div>
|
|
3
3
|
|
|
4
4
|
<div class="ssc-line why-not-add-card__skeleton-title"></div>
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
<div class="ssc-line why-not-add-card__skeleton-delivery"></div>
|
|
12
12
|
|
|
13
13
|
<div class="ssc-square why-not-add-card__skeleton-cta"></div>
|
|
14
|
-
</div>
|
|
14
|
+
</div>
|
|
@@ -1,73 +1,92 @@
|
|
|
1
|
-
<div class="why-not-add-card
|
|
2
|
-
{{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<div class="why-not-add-card-wrapper">
|
|
2
|
+
<div class="why-not-add-card" data-product-code="{{code}}">
|
|
3
|
+
{{#if showBadge}}
|
|
4
|
+
{{#if badge.text}}
|
|
5
|
+
<div
|
|
6
|
+
class="why-not-add-card__badge"
|
|
7
|
+
style="background-color: {{badge.color}}; color: {{badge.textColor}};"
|
|
8
|
+
>
|
|
9
|
+
{{badge.text}}
|
|
10
|
+
</div>
|
|
11
|
+
{{/if}}
|
|
12
|
+
{{/if}}
|
|
13
|
+
{{#if image.url}}
|
|
14
|
+
<img
|
|
15
|
+
class="why-not-add-card__image"
|
|
16
|
+
src="{{image.url}}"
|
|
17
|
+
alt="{{image.altText}}"
|
|
18
|
+
>
|
|
19
|
+
{{/if}}
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
<div class="why-not-add-card__content">
|
|
22
|
+
<a href="{{url}}" target="_blank" class="why-not-add-card__title">
|
|
23
|
+
{{name}}
|
|
24
|
+
</a>
|
|
14
25
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
{{> reviews-rating
|
|
27
|
+
externalAverageRating=externalAverageRating
|
|
28
|
+
externalReviewCount=externalReviewCount
|
|
29
|
+
}}
|
|
19
30
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
<div class="why-not-add-card__bottom">
|
|
32
|
+
<div class="why-not-add-card__price-wrap">
|
|
33
|
+
<div class="why-not-add-card__price {{#if wasPriceFormatted}}why-not-add-card__price--sale{{/if}}">
|
|
34
|
+
{{#if wasPriceFormatted}}
|
|
35
|
+
<span class="why-not-add-card__was-price">
|
|
36
|
+
{{#if switch-vat}}
|
|
37
|
+
<span class="including-vat-inherit">{{incVatWasPriceFormatted}}</span>
|
|
27
38
|
<span class="excluding-vat-inherit">{{excVatWasPriceFormatted}}</span>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
{{else}}
|
|
40
|
+
{{wasPriceFormatted}}
|
|
41
|
+
{{/if}}
|
|
42
|
+
</span>
|
|
32
43
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
<span class="why-not-add-card__sale-price">
|
|
45
|
+
{{#if switch-vat}}
|
|
46
|
+
<span class="including-vat-inherit">{{incVatFormattedValue}}</span>
|
|
36
47
|
<span class="excluding-vat-inherit">{{excVatFormattedValue}}</span>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
{{else}}
|
|
49
|
+
{{price.formattedValue}}
|
|
50
|
+
{{/if}}
|
|
51
|
+
</span>
|
|
52
|
+
{{else}}
|
|
53
|
+
<span class="why-not-add-card__regular-price">
|
|
54
|
+
{{#if switch-vat}}
|
|
55
|
+
<span class="including-vat-inherit">{{incVatFormattedValue}}</span>
|
|
45
56
|
<span class="excluding-vat-inherit">{{excVatFormattedValue}}</span>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
{{else}}
|
|
58
|
+
{{price.formattedValue}}
|
|
59
|
+
{{/if}}
|
|
60
|
+
</span>
|
|
61
|
+
{{/if}}
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
{{#if switch-vat}}
|
|
65
|
+
<div class="why-not-add-card__vat-label">
|
|
66
|
+
<span class="including-vat-inherit">Inc.VAT</span>
|
|
67
|
+
<span class="excluding-vat-inherit">Exc.VAT</span>
|
|
68
|
+
</div>
|
|
50
69
|
{{/if}}
|
|
51
|
-
</div>
|
|
52
70
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<span class="including-vat-inherit">Inc.VAT</span>
|
|
56
|
-
<span class="excluding-vat-inherit">Exc.VAT</span>
|
|
57
|
-
</div>
|
|
58
|
-
{{/if}}
|
|
71
|
+
<div class="why-not-add-card__delivery">Excluding delivery</div>
|
|
72
|
+
</div>
|
|
59
73
|
|
|
60
|
-
|
|
74
|
+
{{> button
|
|
75
|
+
type="button"
|
|
76
|
+
action=true
|
|
77
|
+
icon="fas fa-shopping-basket"
|
|
78
|
+
successIcon="fas fa-check"
|
|
79
|
+
showLoader=true
|
|
80
|
+
loaderModifier="why-not-add-card__loader"
|
|
81
|
+
modification="why-not-add-card__cta"
|
|
82
|
+
}}
|
|
61
83
|
</div>
|
|
62
|
-
|
|
63
|
-
{{> button
|
|
64
|
-
type="button"
|
|
65
|
-
action=true
|
|
66
|
-
icon="fas fa-shopping-basket"
|
|
67
|
-
showLoader=true
|
|
68
|
-
loaderModifier="why-not-add-card__loader"
|
|
69
|
-
modification="why-not-add-card__cta"
|
|
70
|
-
}}
|
|
71
84
|
</div>
|
|
72
85
|
</div>
|
|
73
|
-
|
|
86
|
+
{{#if addToCartError}}
|
|
87
|
+
<div class="why-not-add-card__error d-none">
|
|
88
|
+
<i class="icon fas fa-times-circle fa-w-16"></i>
|
|
89
|
+
<span data-add-to-cart-error>{{addToCartError}}</span>
|
|
90
|
+
</div>
|
|
91
|
+
{{/if}}
|
|
92
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<div class="why-not-add {{#if isSingleProduct}}why-not-add--single{{/if}}" data-why-not-add>
|
|
1
|
+
<div class="why-not-add {{modifier}} {{#if isSingleProduct}}why-not-add--single{{/if}}" data-why-not-add>
|
|
2
2
|
<div class="why-not-add__header">
|
|
3
|
-
<h3 class="why-not-add__title">
|
|
3
|
+
<h3 class="why-not-add__title">{{title}}</h3>
|
|
4
4
|
|
|
5
5
|
{{#unless isSingleProduct}}
|
|
6
6
|
<div class="why-not-add__arrows">
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
{{#unless isSingleProduct}}
|
|
39
39
|
<div class="why-not-add__pagination" data-why-not-add-pagination></div>
|
|
40
40
|
{{/unless}}
|
|
41
|
-
</div>
|
|
41
|
+
</div>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div class="calendar__row">
|
|
29
29
|
<div class="calendar__row_days">
|
|
30
30
|
{{/if}}
|
|
31
|
-
<span class="calendar__cell calendar__cell_cnt{{#if isInactive}} calendar__cell_inactive{{/if}}{{#if ../premium}}{{#if (eq day '1')}} calendar__cell_inactive{{/if}}{{#unless isInactive}}{{#if (eq day '2')}} calendar__cell_highlight calendar-premium-day{{/if}}{{/unless}}{{else}}{{#if (eq day '1')}}{{#unless isInactive}} calendar__cell_highlight calendar-rapid-day{{/unless}}{{/if}}{{/if}}">
|
|
31
|
+
<span class="calendar__cell calendar__cell_cnt{{#if isInactive}} calendar__cell_inactive{{/if}}{{#if ../premium}}{{#if (eq day '1')}} calendar__cell_inactive{{/if}}{{#unless isInactive}}{{#if (eq day '2')}} calendar__cell_highlight calendar-premium-day{{/if}}{{/unless}}{{else}}{{#unless ../noRapid}}{{#if (eq day '1')}}{{#unless isInactive}} calendar__cell_highlight calendar-rapid-day{{/unless}}{{/if}}{{/unless}}{{/if}}">
|
|
32
32
|
{{#if ../premium}}
|
|
33
33
|
{{#if (eq day '2')}}
|
|
34
34
|
{{#unless isInactive}}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
{{day}}
|
|
42
42
|
{{/if}}
|
|
43
43
|
{{else}}
|
|
44
|
-
{{#if (eq day '1')}}
|
|
44
|
+
{{#if (and (eq day '1') (not ../noRapid))}}
|
|
45
45
|
{{#unless isInactive}}
|
|
46
46
|
{{day}}
|
|
47
47
|
<span class="calendar-cell-label">Rapid</span>
|
|
@@ -77,22 +77,27 @@
|
|
|
77
77
|
</div>
|
|
78
78
|
</div>
|
|
79
79
|
<div class="delivery-time">
|
|
80
|
-
|
|
80
|
+
{{#if premium}}
|
|
81
|
+
<div class="delivery-time__premium-hint">
|
|
81
82
|
<span class="icon-wrap icon-wrap--large">
|
|
82
|
-
{{#if premium}}
|
|
83
83
|
<img src="./img/premium-delivery.svg" class="icon" alt="Premium delivery">
|
|
84
|
-
{{else}}
|
|
85
|
-
<i class="fas fa-shipping-fast icon"></i>
|
|
86
|
-
{{/if}}
|
|
87
84
|
</span>
|
|
88
85
|
<p class="description">
|
|
89
|
-
{{#if premium}}
|
|
90
86
|
Select tomorrow’s day on the calendar to get Premium delivery.
|
|
91
|
-
{{else}}
|
|
92
|
-
Select todays’ day on the calendar to get Rapid delivery.
|
|
93
|
-
{{/if}}
|
|
94
87
|
</p>
|
|
95
|
-
|
|
88
|
+
</div>
|
|
89
|
+
{{else}}
|
|
90
|
+
{{#unless noRapid}}
|
|
91
|
+
<div class="delivery-time__rapid-hint">
|
|
92
|
+
<span class="icon-wrap icon-wrap--large">
|
|
93
|
+
<i class="fas fa-shipping-fast icon"></i>
|
|
94
|
+
</span>
|
|
95
|
+
<p class="description">
|
|
96
|
+
Select todays’ day on the calendar to get Rapid delivery.
|
|
97
|
+
</p>
|
|
98
|
+
</div>
|
|
99
|
+
{{/unless}}
|
|
100
|
+
{{/if}}
|
|
96
101
|
{{> delivery-types
|
|
97
102
|
title=titleDelivery
|
|
98
103
|
subtitle=subtitleDelivery
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div class="delivery-block__heavy-banners-wrapper">
|
|
2
|
+
<div class="delivery-block__heavy-banners-header">
|
|
3
|
+
<h4 class="delivery-block__heavy-banners-title">Big & Bulky delivery information</h4>
|
|
4
|
+
<a href="https://www.wickes.co.uk/termsAndConditions" class="delivery-block__heavy-banners-terms delivery-block__heavy-banners-terms--desktop">Terms & Conditions</a>
|
|
5
|
+
</div>
|
|
6
|
+
<p class="delivery-block__heavy-banners-description">
|
|
7
|
+
We will not be able to deliver your order if any of the below apply to your delivery address:
|
|
8
|
+
</p>
|
|
9
|
+
<div class="delivery-block__heavy-banners">
|
|
10
|
+
{{#each @root.heavyBannerImages}}
|
|
11
|
+
<img loading="lazy" title="{{this.title}}" src="{{this.src}}" alt="{{this.alt}}">
|
|
12
|
+
{{/each}}
|
|
13
|
+
</div>
|
|
14
|
+
<div class="delivery-block__heavy-banners-contact">
|
|
15
|
+
<span class="delivery-block__heavy-banners-contact-icon">
|
|
16
|
+
<i class="far fa-info-circle"></i>
|
|
17
|
+
</span>
|
|
18
|
+
<span>If you have any questions, please contact us on <a href="tel:03301234123">0330 123 4123</a></span>
|
|
19
|
+
</div>
|
|
20
|
+
<a href="https://www.wickes.co.uk/termsAndConditions" class="delivery-block__heavy-banners-terms delivery-block__heavy-banners-terms--mobile">Terms & Conditions</a>
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"heavyBannerImages": [
|
|
3
|
+
{
|
|
4
|
+
"title": "Traffic access issues",
|
|
5
|
+
"src": "./img/emulation/traffic-access-issues.png",
|
|
6
|
+
"alt": "Traffic access issues"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"title": "Low trees",
|
|
10
|
+
"src": "./img/emulation/low-trees.png",
|
|
11
|
+
"alt": "Low trees"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"title": "Overhead power cables",
|
|
15
|
+
"src": "./img/emulation/overhead-power-cables.png",
|
|
16
|
+
"alt": "Overhead power cables"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"title": "Parked vehicles in the delivery path",
|
|
20
|
+
"src": "./img/emulation/parked-vehicles.png",
|
|
21
|
+
"alt": "Parked vehicles in the delivery path"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"title": "Walls or fences in the delivery path",
|
|
25
|
+
"src": "./img/emulation/walls-or-fences.png",
|
|
26
|
+
"alt": "Walls or fences in the delivery path"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
const cartSliderHTML = '<div class="custom-slider just-added d-none"></div>';
|
|
2
2
|
|
|
3
|
+
function waitUntilVisible($element, callback) {
|
|
4
|
+
if (!$element.length) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const element = $element[0];
|
|
9
|
+
const rect = element.getBoundingClientRect();
|
|
10
|
+
|
|
11
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
12
|
+
callback();
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const observer = new ResizeObserver(function (entries) {
|
|
17
|
+
const { width, height } = entries[0].contentRect;
|
|
18
|
+
|
|
19
|
+
if (width > 0 && height > 0) {
|
|
20
|
+
observer.disconnect();
|
|
21
|
+
callback();
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
observer.observe(element);
|
|
26
|
+
}
|
|
27
|
+
|
|
3
28
|
createPopupSlider({
|
|
4
29
|
type: 'cart',
|
|
5
30
|
sliderSelector: '.custom-slider.just-added',
|
|
@@ -15,16 +40,28 @@ createPopupSlider({
|
|
|
15
40
|
$('body').append(cartSliderHTML);
|
|
16
41
|
}
|
|
17
42
|
|
|
18
|
-
const
|
|
43
|
+
const $slider = $('.custom-slider.just-added').last();
|
|
44
|
+
const htmlContent = event.detail.cartPopupHtml || event.detail.html;
|
|
19
45
|
|
|
20
46
|
if (htmlContent) {
|
|
21
|
-
$
|
|
47
|
+
$slider.append(htmlContent);
|
|
22
48
|
}
|
|
23
49
|
|
|
50
|
+
const $sliderWrap = $slider.find('.custom-slider__wrap').last();
|
|
51
|
+
const dontForgetPayload = event.detail.recommendationWidget;
|
|
52
|
+
|
|
24
53
|
showSlider();
|
|
25
54
|
|
|
26
|
-
if ($
|
|
27
|
-
$(
|
|
55
|
+
if ($sliderWrap.length && Wick.BloomreachWidget?.hasRecommendations(dontForgetPayload)) {
|
|
56
|
+
waitUntilVisible($slider, function () {
|
|
57
|
+
Wick.BloomreachWidget.init('dontForget', dontForgetPayload, {
|
|
58
|
+
container: $sliderWrap,
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if ($sliderWrap.length) {
|
|
64
|
+
$sliderWrap.on(
|
|
28
65
|
'scroll',
|
|
29
66
|
_.debounce(() => handleScroll(el.sliderWrap), 100)
|
|
30
67
|
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var Wick = window.Wick || {};
|
|
2
|
+
|
|
3
|
+
$(document).ready(function () {
|
|
4
|
+
const $container = $('[data-complete-widget]');
|
|
5
|
+
|
|
6
|
+
if (!$container.length) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
window.setTimeout(function () {
|
|
11
|
+
const mockDataKey = $container.data('mock-key');
|
|
12
|
+
const payloadData = Wick.FEMock.dataBloomreach[mockDataKey];
|
|
13
|
+
|
|
14
|
+
Wick.BloomreachWidget.init('completeYourProject', payloadData);
|
|
15
|
+
}, 3000);
|
|
16
|
+
});
|
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var Wick = window.Wick || {};
|
|
2
|
+
|
|
3
|
+
import { getNextCartAddScenario, dispatchCartScenario } from './just-added-scenarios-emulation';
|
|
4
|
+
|
|
5
|
+
function getCartMock() {
|
|
6
|
+
const cartMockKey = $('.pdp__main').data('cart-mock-key') || 'cartPDP';
|
|
7
|
+
|
|
8
|
+
return Wick.FEMock[cartMockKey];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function simulateHybrisSendingHtml(event) {
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
|
|
14
|
+
const scenario = getNextCartAddScenario();
|
|
15
|
+
const cartMock = getCartMock();
|
|
16
|
+
|
|
17
|
+
dispatchCartScenario(cartMock, scenario);
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
function bindResolveEvent(events) {
|
|
10
21
|
$(window).on(events.join(' '), function ({ detail: { resolve } }) {
|
|
11
|
-
setTimeout(()
|
|
22
|
+
setTimeout(function () {
|
|
12
23
|
resolve();
|
|
13
24
|
}, 200);
|
|
14
25
|
});
|
|
15
26
|
}
|
|
16
27
|
|
|
17
28
|
$(document).ready(function () {
|
|
18
|
-
$(
|
|
29
|
+
$(document)
|
|
30
|
+
.off('click.customSliderEmulation', '.btn-add-to-basket')
|
|
31
|
+
.on('click.customSliderEmulation', '.btn-add-to-basket', simulateHybrisSendingHtml);
|
|
19
32
|
|
|
20
33
|
bindResolveEvent([
|
|
21
34
|
'CLOSE_JUST_ADDED',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var Wick = window.Wick || {};
|
|
2
|
+
|
|
3
|
+
let shouldFailNext = false;
|
|
4
|
+
|
|
5
|
+
const RESPONSE_MESSAGES = {
|
|
6
|
+
success: {
|
|
7
|
+
messageType: 'success',
|
|
8
|
+
messageText: 'Item added to cart',
|
|
9
|
+
},
|
|
10
|
+
error: {
|
|
11
|
+
messageType: 'error',
|
|
12
|
+
messageText: 'Product has not been added to basket',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function bindDontForgetAddToCartEvent() {
|
|
17
|
+
$(window)
|
|
18
|
+
.off('addToCart.dontForgetEmulation')
|
|
19
|
+
.on('addToCart.dontForgetEmulation', function ({ detail = {} }) {
|
|
20
|
+
const { payload, resolve } = detail;
|
|
21
|
+
|
|
22
|
+
if (!payload || payload.doNotShowAddedProductPopup !== true) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
shouldFailNext = !shouldFailNext;
|
|
27
|
+
|
|
28
|
+
window.setTimeout(function () {
|
|
29
|
+
resolve(shouldFailNext ? RESPONSE_MESSAGES.error : RESPONSE_MESSAGES.success);
|
|
30
|
+
}, 2000);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
$(document).ready(function () {
|
|
35
|
+
bindDontForgetAddToCartEvent();
|
|
36
|
+
});
|