wickes-css2 2.111.0-develop.1 → 2.111.0-develop.2

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.
Files changed (87) hide show
  1. package/Readme.md +1 -1
  2. package/build/css/category-main.css +1 -1
  3. package/build/css/components/global-search.css +1 -1
  4. package/build/css/homepage-main.css +1 -1
  5. package/build/css/kitchen-plp-main.css +1 -1
  6. package/build/css/main.css +1 -1
  7. package/build/css/my-account-main-v2.css +1 -1
  8. package/build/css/my-account-main.css +1 -1
  9. package/build/css/pdp-main-before-combine.css +1 -1
  10. package/build/css/pdp-main-non-critical.css +1 -1
  11. package/build/css/pdp-main.css +1 -1
  12. package/build/css/plp-main.css +1 -1
  13. package/build/css/store-locator-main.css +1 -1
  14. package/build/js/basket.min.js +2 -2
  15. package/build/js/bundle.min.js +1 -1
  16. package/build/js/checkout.min.js +2 -2
  17. package/build/js/emulation.min.js +95 -10
  18. package/build/js/general.bundle.min.js +1 -1
  19. package/build/js/gift-cards.min.js +1 -1
  20. package/build/js/merged-checkout.min.js +2 -2
  21. package/build/js/mini-basket-slider.min.js +1 -1
  22. package/build/js/page/basket-v2.js +11 -18
  23. package/build/js/page/components/discounts.js +15 -8
  24. package/build/js/page/components/mini-basket-slider.js +18 -24
  25. package/build/js/page/components/voucher.js +56 -2
  26. package/build/js/pdp.bundle.min.js +1 -1
  27. package/build/js/plp.bundle.min.js +1 -1
  28. package/build/js/project-list.min.js +1 -1
  29. package/package.json +1 -1
  30. package/src/components/cart-voucher.hbs +4 -4
  31. package/src/components/checkout-voucher-remove-modal.hbs +16 -0
  32. package/src/components/mini-basket/mini-basket-order-item.hbs +4 -4
  33. package/src/components/tradepro-discount-banner.hbs +8 -0
  34. package/src/components/wismo-payment.hbs +50 -7
  35. package/src/data/data_delivery-address-v2.json +6 -6
  36. package/src/data/data_discounts.json +6 -6
  37. package/src/data/data_shopping-cart-v2.json +32 -11
  38. package/src/data/data_shopping-cart-with-energy.json +12 -12
  39. package/src/data/data_wismo.json +2 -1
  40. package/src/js/components/general/switchVat.js +9 -7
  41. package/src/js/components/general/tradepro-discount-banner.js +69 -0
  42. package/src/js/emulation/basket-data.js +11 -1
  43. package/src/js/emulation/checkout-data.js +3 -0
  44. package/src/js/emulation/mini-basket-data.js +68 -0
  45. package/src/js/emulation/tradepro-discount-banner-emulation.js +13 -0
  46. package/src/js/page/basket-v2.js +11 -18
  47. package/src/js/page/components/discounts.js +15 -8
  48. package/src/js/page/components/mini-basket-slider.js +18 -24
  49. package/src/js/page/components/voucher.js +56 -2
  50. package/src/layouts/checkout.hbs +1 -0
  51. package/src/page_basket-energy-efficiency.html +4 -0
  52. package/src/page_checkout_confirmation-new-marketing-consent-error.html +7 -0
  53. package/src/page_checkout_confirmation-new-marketing-consent.html +4 -0
  54. package/src/page_checkout_delivery-address-v2.html +4 -0
  55. package/src/page_checkout_delivery-details-v2-asm.html +7 -1
  56. package/src/page_checkout_delivery-details-v2-calendar-message.html +4 -0
  57. package/src/page_checkout_delivery-details-v2-oos.html +4 -0
  58. package/src/page_checkout_delivery-details-v2-wisdom-not-available.html +4 -0
  59. package/src/page_checkout_delivery-details-v2-wisdom.html +4 -0
  60. package/src/page_checkout_delivery-details-with-loader-v2.html +4 -0
  61. package/src/page_checkout_delivery-details_guest-new.html +4 -0
  62. package/src/page_checkout_delivery_address-asm-new.html +4 -0
  63. package/src/page_checkout_merge-basket-v2.html +6 -3
  64. package/src/page_checkout_merge-basket-vat-v2.html +6 -1
  65. package/src/page_checkout_merge-basket-with-energy.html +4 -0
  66. package/src/page_checkout_next-day-delivery-details.html +4 -0
  67. package/src/page_checkout_payment-details-v2-asm.html +4 -0
  68. package/src/page_checkout_payment-details-v2.html +4 -0
  69. package/src/page_checkout_payment-details_guest-click-collect-icon.html +4 -0
  70. package/src/page_checkout_payment-details_guest-with-checkout-journey.html +7 -0
  71. package/src/page_checkout_payment-details_login-with-checkout-journey.html +7 -0
  72. package/src/page_checkout_payment-details_with-card-loader.html +4 -0
  73. package/src/page_checkout_payment-details_with-loader-v2.html +4 -0
  74. package/src/page_checkout_rapid-delivery-details.html +4 -0
  75. package/src/page_empty-basket-instore.html +4 -0
  76. package/src/page_homepage-with-global-search-v2-vat.html +1 -0
  77. package/src/page_instore_progress_bar.html +4 -0
  78. package/src/page_product-details-with-global-search-v2.html +1 -0
  79. package/src/page_shopping-cart-registered-v2.html +4 -0
  80. package/src/page_shopping-cart-v2-vat.html +6 -0
  81. package/src/page_shopping-cart-v2.html +5 -2
  82. package/src/page_shopping-cart-v3-instore.html +4 -0
  83. package/src/scss/components/_checkout-voucher-remove-modal.scss +108 -0
  84. package/src/scss/components/_tradepro-discount-banner.scss +78 -0
  85. package/src/scss/components/global-search.scss +11 -0
  86. package/src/scss/globals/_global-components.scss +1 -0
  87. package/src/scss/main.scss +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wickes-css2",
3
- "version": "2.111.0-develop.1",
3
+ "version": "2.111.0-develop.2",
4
4
  "description": "CSS and JS and page templates in use by Wickes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,13 +1,13 @@
1
1
  <li>
2
- {{#ifCond switch-vat '&&' textExcVat}}
2
+ {{#ifCond switch-vat '&&' displayDescriptionExclusiveVat}}
3
3
  <span class="including-vat">
4
- {{{text}}}
4
+ {{{displayDescription}}}
5
5
  </span>
6
6
  <span class="excluding-vat d-none">
7
- {{{textExcVat}}}
7
+ {{{displayDescriptionExclusiveVat}}}
8
8
  </span>
9
9
  {{else}}
10
- {{{text}}}
10
+ {{{displayDescription}}}
11
11
  {{/ifCond}}
12
12
  {{#if isDeletable}}
13
13
  <span class="icon checkout-widget__voucher-remove">
@@ -0,0 +1,16 @@
1
+ {{#extend "modal" classMod="voucher-remove-modal" title=title showCloseBtn=true backdrop=true}}
2
+ {{#content "header"}}
3
+ <i class="{{headerIcon}} info-icon"></i>
4
+ {{/content}}
5
+ {{#content "sections"}}
6
+ {{#extend "modal-body-section"}}
7
+ {{#content "body"}}
8
+ <p class="description">{{{description}}}</p>
9
+ <div class="voucher-remove-modal__actions">
10
+ <button class="btn btn_full btn-primary" data-dismiss="modal">Cancel</button>
11
+ <button class="btn btn_full btn-secondary btn-continue" data-action="confirm-voucher-remove">Yes, continue</button>
12
+ </div>
13
+ {{/content}}
14
+ {{/extend}}
15
+ {{/content}}
16
+ {{/extend}}
@@ -47,24 +47,24 @@
47
47
  <i class="fal fa-plus quantity-cta-icon"></i>
48
48
  </button>
49
49
  </div>
50
- {{#if (eq item.basePrice.value 0)}}
50
+ {{#if (eq item.displayBasePrice.value 0)}}
51
51
  <span class="order-item__value product-card__price-value">FREE</span>
52
52
  {{else}}
53
53
  {{#if (isToggleVatAvailable)}}
54
54
  <div class="price including-vat-inherit">
55
55
  <span class="product-card__price-value">
56
- <span class="order-item__value">{{item.basePrice.formattedValue}}</span>
56
+ <span class="order-item__value">{{item.displayBasePrice.formattedValue}}</span>
57
57
  <span class="inc">Inc.VAT</span>
58
58
  </span>
59
59
  </div>
60
60
  <div class="price excluding-vat-inherit">
61
61
  <span class="product-card__price-value">
62
- <span class="order-item__value">{{item.basePriceExcVat.formattedValue}}</span>
62
+ <span class="order-item__value">{{item.displayBasePriceExclusiveVat.formattedValue}}</span>
63
63
  <span class="inc">Exc.VAT</span>
64
64
  </span>
65
65
  </div>
66
66
  {{else}}
67
- <span class="price product-card__price-value">{{item.basePrice.formattedValue}}</span>
67
+ <span class="price product-card__price-value">{{item.displayBasePrice.formattedValue}}</span>
68
68
  {{/if}}
69
69
  {{/if}}
70
70
  </div>
@@ -0,0 +1,8 @@
1
+ <div class="tradepro-discount-banner">
2
+ <span class="tradepro-discount-banner__content">
3
+ Your TradePro discount is already applied to all prices
4
+ </span>
5
+ <span class="icon notification__close notification__close_white notification__close_stripbanner">
6
+ <span class="fas fa-times"></span>
7
+ </span>
8
+ </div>
@@ -4,7 +4,14 @@
4
4
  {{#each wismo-order-payment-klarna.items}}
5
5
  <div class="wrap-item">
6
6
  <div class="wrap-item__name">{{{name}}}</div>
7
- <div class="wrap-item__value">{{{value}}}</div>
7
+ <div class="wrap-item__value">
8
+ {{#ifCond ../switch-vat '&&' valueExcVat}}
9
+ <span class="including-vat">{{{value}}}</span>
10
+ <span class="excluding-vat d-none">{{{valueExcVat}}}</span>
11
+ {{else}}
12
+ {{{value}}}
13
+ {{/ifCond}}
14
+ </div>
8
15
  </div>
9
16
  {{/each}}
10
17
  {{else if payment-apple}}
@@ -12,7 +19,12 @@
12
19
  <div class="wrap-item">
13
20
  <div class="wrap-item__name">{{{name}}}</div>
14
21
  <div class="wrap-item__value">
15
- {{{value}}}
22
+ {{#ifCond ../switch-vat '&&' valueExcVat}}
23
+ <span class="including-vat">{{{value}}}</span>
24
+ <span class="excluding-vat d-none">{{{valueExcVat}}}</span>
25
+ {{else}}
26
+ {{{value}}}
27
+ {{/ifCond}}
16
28
  <p class="pt-3">{{additional-value}}</p>
17
29
  </div>
18
30
  </div>
@@ -22,7 +34,12 @@
22
34
  <div class="wrap-item">
23
35
  <div class="wrap-item__name">{{{name}}}</div>
24
36
  <div class="wrap-item__value">
25
- {{{value}}}
37
+ {{#ifCond ../switch-vat '&&' valueExcVat}}
38
+ <span class="including-vat">{{{value}}}</span>
39
+ <span class="excluding-vat d-none">{{{valueExcVat}}}</span>
40
+ {{else}}
41
+ {{{value}}}
42
+ {{/ifCond}}
26
43
  <p class="pt-3">{{additional-value}}</p>
27
44
  </div>
28
45
  </div>
@@ -32,7 +49,12 @@
32
49
  <div class="wrap-item">
33
50
  <div class="wrap-item__name">{{{name}}}</div>
34
51
  <div class="wrap-item__value">
35
- {{{value}}}
52
+ {{#ifCond ../switch-vat '&&' valueExcVat}}
53
+ <span class="including-vat">{{{value}}}</span>
54
+ <span class="excluding-vat d-none">{{{valueExcVat}}}</span>
55
+ {{else}}
56
+ {{{value}}}
57
+ {{/ifCond}}
36
58
  <p class="pt-3">{{additional-value}}</p>
37
59
  </div>
38
60
  </div>
@@ -49,7 +71,14 @@
49
71
  {{else}}
50
72
  <div class="wrap-item">
51
73
  <div class="wrap-item__name">{{{this.name}}}</div>
52
- <div class="wrap-item__value">{{{this.value}}}</div>
74
+ <div class="wrap-item__value">
75
+ {{#ifCond ../switch-vat '&&' this.valueExcVat}}
76
+ <span class="including-vat">{{{this.value}}}</span>
77
+ <span class="excluding-vat d-none">{{{this.valueExcVat}}}</span>
78
+ {{else}}
79
+ {{{this.value}}}
80
+ {{/ifCond}}
81
+ </div>
53
82
  </div>
54
83
  {{/if}}
55
84
  {{/each}}
@@ -57,14 +86,28 @@
57
86
  {{#each wismo-order-payment-clearpay.items}}
58
87
  <div class="wrap-item">
59
88
  <div class="wrap-item__name">{{{name}}}</div>
60
- <div class="wrap-item__value">{{{value}}}</div>
89
+ <div class="wrap-item__value">
90
+ {{#ifCond ../switch-vat '&&' valueExcVat}}
91
+ <span class="including-vat">{{{value}}}</span>
92
+ <span class="excluding-vat d-none">{{{valueExcVat}}}</span>
93
+ {{else}}
94
+ {{{value}}}
95
+ {{/ifCond}}
96
+ </div>
61
97
  </div>
62
98
  {{/each}}
63
99
  {{else}}
64
100
  {{#each wismo-order-payment.items}}
65
101
  <div class="wrap-item">
66
102
  <div class="wrap-item__name">{{{name}}}</div>
67
- <div class="wrap-item__value">{{{value}}}</div>
103
+ <div class="wrap-item__value">
104
+ {{#ifCond ../switch-vat '&&' valueExcVat}}
105
+ <span class="including-vat">{{{value}}}</span>
106
+ <span class="excluding-vat d-none">{{{valueExcVat}}}</span>
107
+ {{else}}
108
+ {{{value}}}
109
+ {{/ifCond}}
110
+ </div>
68
111
  </div>
69
112
  {{/each}}
70
113
  {{/if}}
@@ -29,24 +29,24 @@
29
29
  ],
30
30
  "discounts": [
31
31
  {
32
- "text": "Voucher abcd applies and giving 20% off",
32
+ "displayDescription": "Voucher abcd applies and giving 20% off",
33
33
  "isDeletable": true
34
34
  },
35
35
  {
36
- "text": "Voucher 20% off",
36
+ "displayDescription": "Voucher 20% off",
37
37
  "isDeletable": true
38
38
  },
39
39
  {
40
- "text": "Buy 4 for 3"
40
+ "displayDescription": "Buy 4 for 3"
41
41
  },
42
42
  {
43
- "text": "Online only offer"
43
+ "displayDescription": "Online only offer"
44
44
  },
45
45
  {
46
- "text": "2 for £35"
46
+ "displayDescription": "2 for £35"
47
47
  },
48
48
  {
49
- "text": "Offer price equivalent to £17.50 per item"
49
+ "displayDescription": "Offer price equivalent to £17.50 per item"
50
50
  }
51
51
  ],
52
52
  "total": {
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "discounts": [
3
3
  {
4
- "text": "Voucher abcd applies and giving 20% off",
4
+ "displayDescription": "Voucher abcd applies and giving 20% off",
5
5
  "isDeletable": true
6
6
  },
7
7
  {
8
- "text": "Voucher 20% off",
8
+ "displayDescription": "Voucher 20% off",
9
9
  "isDeletable": true
10
10
  },
11
11
  {
12
- "text": "Buy 4 for 3"
12
+ "displayDescription": "Buy 4 for 3"
13
13
  },
14
14
  {
15
- "text": "Online only offer"
15
+ "displayDescription": "Online only offer"
16
16
  },
17
17
  {
18
- "text": "2 for £35"
18
+ "displayDescription": "2 for £35"
19
19
  },
20
20
  {
21
- "text": "Offer price equivalent to £17.50 per item"
21
+ "displayDescription": "Offer price equivalent to £17.50 per item"
22
22
  }
23
23
  ]
24
24
  }
@@ -44,31 +44,52 @@
44
44
  ],
45
45
  "discounts": [
46
46
  {
47
- "text": "Voucher abcd applies and giving 20% off",
48
- "textExcVat": "Voucher abcd applies and giving 18% off",
47
+ "displayDescription": "Voucher abcd applies and giving 20% off",
48
+ "displayDescriptionExclusiveVat": "Voucher abcd applies and giving 18% off",
49
49
  "isDeletable": true
50
50
  },
51
51
  {
52
- "text": "Voucher 20% off",
53
- "textExcVat": "Voucher 18% off",
52
+ "displayDescription": "Voucher 20% off",
53
+ "displayDescriptionExclusiveVat": "Voucher 18% off",
54
54
  "isDeletable": true
55
55
  },
56
56
  {
57
- "text": "Buy 4 for 3",
58
- "textExcVat": "Buy 5 for 3"
57
+ "displayDescription": "Buy 4 for 3",
58
+ "displayDescriptionExclusiveVat": "Buy 5 for 3"
59
59
  },
60
60
  {
61
- "text": "Online only offer"
61
+ "displayDescription": "Online only offer"
62
62
  },
63
63
  {
64
- "text": "2 for £35",
65
- "textExcVat": "2 for £30"
64
+ "displayDescription": "2 for £35",
65
+ "displayDescriptionExclusiveVat": "2 for £30"
66
66
  },
67
67
  {
68
- "text": "Offer price equivalent to £17.50 per item",
69
- "textExcVat": "Offer price equivalent to £15.50 per item"
68
+ "displayDescription": "Offer price equivalent to £17.50 per item",
69
+ "displayDescriptionExclusiveVat": "Offer price equivalent to £15.50 per item"
70
70
  }
71
71
  ],
72
+ "voucher-remove-popup": {
73
+ "title": "Remove {coupon name} discount?",
74
+ "headerIcon": "fas fa-exclamation-circle",
75
+ "description": "Are you sure you want to remove your {coupon name} discount from this order? The total cost of your order will increase.",
76
+ "actions": {
77
+ "mod": "actions",
78
+ "buttons": [
79
+ {
80
+ "title": "Cancel",
81
+ "isPrimary": true,
82
+ "close-modal": true
83
+ },
84
+ {
85
+ "mod": "btn-continue",
86
+ "data-action": "confirm-voucher-remove",
87
+ "title": "Yes, continue",
88
+ "isSecondary": true
89
+ }
90
+ ]
91
+ }
92
+ },
72
93
  "total": {
73
94
  "title": "Total:",
74
95
  "value": "£430.95"
@@ -42,24 +42,24 @@
42
42
  ],
43
43
  "discounts": [
44
44
  {
45
- "text": "Voucher abcd applies and giving 20% off",
45
+ "displayDescription": "Voucher abcd applies and giving 20% off",
46
46
  "isDeletable": true
47
47
  },
48
48
  {
49
- "text": "Voucher 20% off",
49
+ "displayDescription": "Voucher 20% off",
50
50
  "isDeletable": true
51
51
  },
52
52
  {
53
- "text": "Buy 4 for 3"
53
+ "displayDescription": "Buy 4 for 3"
54
54
  },
55
55
  {
56
- "text": "Online only offer"
56
+ "displayDescription": "Online only offer"
57
57
  },
58
58
  {
59
- "text": "2 for £35"
59
+ "displayDescription": "2 for £35"
60
60
  },
61
61
  {
62
- "text": "Offer price equivalent to £17.50 per item"
62
+ "displayDescription": "Offer price equivalent to £17.50 per item"
63
63
  }
64
64
  ],
65
65
  "total": {
@@ -749,24 +749,24 @@
749
749
  ],
750
750
  "discounts": [
751
751
  {
752
- "text": "Voucher abcd applies and giving 20% off",
752
+ "displayDescription": "Voucher abcd applies and giving 20% off",
753
753
  "isDeletable": true
754
754
  },
755
755
  {
756
- "text": "Voucher 20% off",
756
+ "displayDescription": "Voucher 20% off",
757
757
  "isDeletable": true
758
758
  },
759
759
  {
760
- "text": "Buy 4 for 3"
760
+ "displayDescription": "Buy 4 for 3"
761
761
  },
762
762
  {
763
- "text": "Online only offer"
763
+ "displayDescription": "Online only offer"
764
764
  },
765
765
  {
766
- "text": "2 for £35"
766
+ "displayDescription": "2 for £35"
767
767
  },
768
768
  {
769
- "text": "Offer price equivalent to £17.50 per item"
769
+ "displayDescription": "Offer price equivalent to £17.50 per item"
770
770
  }
771
771
  ],
772
772
  "total": {
@@ -68,7 +68,8 @@
68
68
  },
69
69
  {
70
70
  "name": "Voucher:",
71
- "value": "-"
71
+ "value": "<div>Wickes TradePro 10% Saving</div><div>20% off <br> Discount applied at checkout</div><div>Buy 3 get 1 free</div><div>Buy 2 for £30 <br>Not Available for Mix &amp; Match</div><div>Buy 2 get 1 free <br>Not Available for Mix &amp; Match</div><div>Buy any Product_103178 or 542003 with any Product_543265 or 148268 &amp; save up to £6.5</div>",
72
+ "valueExcVat": "<div>Wickes TradePro 10% Saving</div><div>20% off <br> Discount applied at checkout</div><div>Buy 3 get 1 free</div><div>Buy 2 for £25 <br>Not Available for Mix &amp; Match</div><div>Buy 2 get 1 free <br>Not Available for Mix &amp; Match</div><div>Buy any Product_103178 or 542003 with any Product_543265 or 148268 &amp; save up to £5.42</div>"
72
73
  }
73
74
  ]
74
75
  },
@@ -61,6 +61,14 @@ Wick.VatToggle = {
61
61
  return !!Wick.VatToggle.getCookie(Wick.VatToggle.VAT_COOKIE);
62
62
  },
63
63
 
64
+ isActive: function () {
65
+ if (Wick.VatToggle.getSwitcherState() !== null) {
66
+ return Wick.VatToggle.getSwitcherState();
67
+ } else {
68
+ return Wick.VatToggle.isOn();
69
+ }
70
+ },
71
+
64
72
  toggleDisplayClass: function () {
65
73
  const includingVatEl = Wick.VatToggle.el.includingVat;
66
74
  const excludingVat = Wick.VatToggle.el.excludingVat;
@@ -74,14 +82,8 @@ Wick.VatToggle = {
74
82
  const excludingVatEl = Wick.VatToggle.el.excludingVat;
75
83
  const hiddenClassName = Wick.VatToggle.HIDDEN_CLASS_NAME;
76
84
 
77
- let vatState = null;
78
-
79
85
  // check switcher state for web or cookie for app
80
- if (Wick.VatToggle.getSwitcherState() !== null) {
81
- vatState = Wick.VatToggle.getSwitcherState();
82
- } else {
83
- vatState = Wick.VatToggle.isOn();
84
- }
86
+ const vatState = Wick.VatToggle.isActive();
85
87
 
86
88
  if (vatState) {
87
89
  $(includingVatEl).addClass(hiddenClassName);
@@ -0,0 +1,69 @@
1
+ var Wick = Wick || {};
2
+
3
+ Wick.TradeProDiscountBanner = {
4
+ COOKIE_NAME: 'showTradeProPricingBanner',
5
+ BANNER_HTML: `
6
+ <div class="tradepro-discount-banner">
7
+ <span class="tradepro-discount-banner__content">
8
+ Your TradePro discount is already applied to all prices
9
+ </span>
10
+ <span class="icon notification__close notification__close_white notification__close_stripbanner">
11
+ <span class="fas fa-times"></span>
12
+ </span>
13
+ </div>`,
14
+ getCookie: function (cookieName) {
15
+ var cookie = decodeURIComponent(document.cookie)
16
+ .split(';')
17
+ .map(function (c) {
18
+ return c.trim();
19
+ })
20
+ .find(function (c) {
21
+ return c.startsWith(cookieName + '=');
22
+ });
23
+
24
+ return cookie ? cookie.replace(cookieName + '=', '') : '';
25
+ },
26
+ isOn: function () {
27
+ return (
28
+ Wick.TradeProDiscountBanner.getCookie(Wick.TradeProDiscountBanner.COOKIE_NAME) ===
29
+ 'true'
30
+ );
31
+ },
32
+ turnOff: function () {
33
+ Wick.TradeProDiscountBanner.setCookie(Wick.TradeProDiscountBanner.COOKIE_NAME, 'false');
34
+ },
35
+ setCookie: function (cookieName, value) {
36
+ document.cookie =
37
+ cookieName + '=' + encodeURIComponent(value) + ';domain=.wickes.co.uk;path=/';
38
+ },
39
+ onClose: function (e) {
40
+ e.stopPropagation();
41
+ $('.tradepro-discount-banner').remove();
42
+ $('.global-search--has-tradepro-banner').removeClass('global-search--has-tradepro-banner');
43
+ Wick.TradeProDiscountBanner.turnOff();
44
+ },
45
+ bindEvents: function () {
46
+ $(document).on(
47
+ 'click',
48
+ '.tradepro-discount-banner .notification__close',
49
+ Wick.TradeProDiscountBanner.onClose
50
+ );
51
+ },
52
+ init: function () {
53
+ Wick.TradeProDiscountBanner.bindEvents();
54
+ var $globalSearch = $('.header-global-search__content.global-search');
55
+
56
+ if ($globalSearch.length && !$globalSearch.find('.tradepro-discount-banner').length) {
57
+ $globalSearch.prepend(Wick.TradeProDiscountBanner.BANNER_HTML);
58
+ $globalSearch.addClass('global-search--has-tradepro-banner');
59
+ }
60
+ },
61
+ };
62
+
63
+ $(function () {
64
+ if (!Wick.TradeProDiscountBanner.isOn()) {
65
+ return;
66
+ }
67
+
68
+ Wick.TradeProDiscountBanner.init();
69
+ });
@@ -20,6 +20,9 @@ Wick.BasketData = (function () {
20
20
  promotionsInfo: [
21
21
  {
22
22
  description: 'Spend over £10 and get £2 fixed discount',
23
+ displayDescription: 'Spend over £10 and get £2 fixed discount',
24
+ displayDescriptionExclusiveVat:
25
+ 'Spend over £10 and get £1.67 fixed discount (ex. VAT)',
23
26
  usedCouponCode: 'RT_02',
24
27
  },
25
28
  ],
@@ -949,7 +952,14 @@ Wick.BasketData = (function () {
949
952
  potentialProductPromotions: [],
950
953
  appliedProductPromotions: [],
951
954
  appliedOrderPromotions: [],
952
- promotionsInfo: null,
955
+ promotionsInfo: [
956
+ {
957
+ description: 'Spend over £10 and get £2 fixed discount',
958
+ displayDescription: 'Spend over £10 and get £2 fixed discount',
959
+ displayDescriptionExclusiveVat:
960
+ 'Spend over £10 and get £1.67 fixed discount (ex. VAT)',
961
+ },
962
+ ],
953
963
  clickAndCollectOnly: false,
954
964
  deliveryItemsQuantity: 1,
955
965
  pickupItemsQuantity: 2,
@@ -19,6 +19,9 @@ Wick.CheckoutData = (function () {
19
19
  promotionsInfo: [
20
20
  {
21
21
  description: 'Spend over £10 and get £2 fixed discount',
22
+ displayDescription: 'Spend over £10 and get £2 fixed discount',
23
+ displayDescriptionExclusiveVat:
24
+ 'Spend over £10 and get £1.67 fixed discount (ex. VAT)',
22
25
  usedCouponCode: 'RT_02',
23
26
  },
24
27
  ],
@@ -460,6 +460,18 @@ Wick.MiniBasketData = (function () {
460
460
  currencyIso: 'GBP',
461
461
  formattedPriceWithoutCurrencySymbol: '10',
462
462
  },
463
+ displayBasePrice: {
464
+ value: 90.0,
465
+ formattedValue: '£90.00',
466
+ currencyIso: 'GBP',
467
+ formattedPriceWithoutCurrencySymbol: '90.00',
468
+ },
469
+ displayBasePriceExclusiveVat: {
470
+ value: 75.0,
471
+ formattedValue: '£75.00',
472
+ currencyIso: 'GBP',
473
+ formattedPriceWithoutCurrencySymbol: '75.00',
474
+ },
463
475
  product: {
464
476
  code: '221100',
465
477
  name: 'Blue Circle Ready To Use Postcrete - 20kg',
@@ -547,6 +559,18 @@ Wick.MiniBasketData = (function () {
547
559
  currencyIso: 'GBP',
548
560
  formattedPriceWithoutCurrencySymbol: '9',
549
561
  },
562
+ displayBasePrice: {
563
+ value: 8.1,
564
+ formattedValue: '£8.10',
565
+ currencyIso: 'GBP',
566
+ formattedPriceWithoutCurrencySymbol: '8.10',
567
+ },
568
+ displayBasePriceExclusiveVat: {
569
+ value: 6.75,
570
+ formattedValue: '£6.75',
571
+ currencyIso: 'GBP',
572
+ formattedPriceWithoutCurrencySymbol: '6.75',
573
+ },
550
574
  product: {
551
575
  code: '109450',
552
576
  name: 'Knauf Insulation Space Standard Top Up 170mm Loft Roll - 6.47m²',
@@ -633,6 +657,18 @@ Wick.MiniBasketData = (function () {
633
657
  currencyIso: 'GBP',
634
658
  formattedPriceWithoutCurrencySymbol: '8',
635
659
  },
660
+ displayBasePrice: {
661
+ value: 22.5,
662
+ formattedValue: '£22.50',
663
+ currencyIso: 'GBP',
664
+ formattedPriceWithoutCurrencySymbol: '22.50',
665
+ },
666
+ displayBasePriceExclusiveVat: {
667
+ value: 18.75,
668
+ formattedValue: '£18.75',
669
+ currencyIso: 'GBP',
670
+ formattedPriceWithoutCurrencySymbol: '18.75',
671
+ },
636
672
  product: {
637
673
  code: '123143',
638
674
  name: '6 Wickes General Purpose Claw test',
@@ -816,6 +852,9 @@ Wick.MiniBasketData = (function () {
816
852
  potentialProductPromotions: [
817
853
  {
818
854
  description: 'Buy more to qualify for our buy 3 get 1 free offer',
855
+ displayDescription: 'Buy more to qualify for our buy 3 get 1 free offer',
856
+ displayDescriptionExclusiveVat:
857
+ 'Buy more to qualify for our buy 3 get 1 free offer',
819
858
  promotionData: {
820
859
  code: 'TD_ProductBOGOFPromotionPotential',
821
860
  title: null,
@@ -840,6 +879,10 @@ Wick.MiniBasketData = (function () {
840
879
  {
841
880
  description:
842
881
  'These item qualify for our buy 3 get 1 free offer - You have saved £36.00',
882
+ displayDescription:
883
+ 'These item qualify for our buy 3 get 1 free offer - You have saved £36.00',
884
+ displayDescriptionExclusiveVat:
885
+ 'These item qualify for our buy 3 get 1 free offer - You have saved £30.00 Exc.VAT',
843
886
  promotionData: {
844
887
  code: 'TD_ProductBOGOFPromotion',
845
888
  title: null,
@@ -868,6 +911,7 @@ Wick.MiniBasketData = (function () {
868
911
  promotionsInfo: [
869
912
  {
870
913
  description: 'Buy 3 get 1 free',
914
+ displayDescription: 'Buy 3 get 1 free',
871
915
  usedCouponCode: '',
872
916
  },
873
917
  ],
@@ -900,6 +944,18 @@ Wick.MiniBasketData = (function () {
900
944
  currencyIso: 'GBP',
901
945
  formattedPriceWithoutCurrencySymbol: '18',
902
946
  },
947
+ displayBasePrice: {
948
+ value: 14.4,
949
+ formattedValue: '£14.40',
950
+ currencyIso: 'GBP',
951
+ formattedPriceWithoutCurrencySymbol: '14.40',
952
+ },
953
+ displayBasePriceExclusiveVat: {
954
+ value: 12.0,
955
+ formattedValue: '£12.00',
956
+ currencyIso: 'GBP',
957
+ formattedPriceWithoutCurrencySymbol: '12.00',
958
+ },
903
959
  product: {
904
960
  code: '109450',
905
961
  name: 'Knauf Insulation Space Standard Top Up 170mm Loft Roll - 6.47m²',
@@ -986,6 +1042,18 @@ Wick.MiniBasketData = (function () {
986
1042
  currencyIso: 'GBP',
987
1043
  formattedPriceWithoutCurrencySymbol: '24',
988
1044
  },
1045
+ displayBasePrice: {
1046
+ value: 22.5,
1047
+ formattedValue: '£22.50',
1048
+ currencyIso: 'GBP',
1049
+ formattedPriceWithoutCurrencySymbol: '22.50',
1050
+ },
1051
+ displayBasePriceExclusiveVat: {
1052
+ value: 18.75,
1053
+ formattedValue: '£18.75',
1054
+ currencyIso: 'GBP',
1055
+ formattedPriceWithoutCurrencySymbol: '18.75',
1056
+ },
989
1057
  product: {
990
1058
  code: '109451',
991
1059
  name: 'Knauf Insulation Super Top Up 200mm Loft Roll - 5.61m²',