wickes-css2 2.103.0-RG-599-place-order-with-gift-card-spinner.2 → 2.103.0-develop.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.
Files changed (124) hide show
  1. package/Readme.md +2 -1
  2. package/build/css/category-main.css +1 -1
  3. package/build/css/components/card-product-banner.css +1 -1
  4. package/build/css/components/checkout-payment-details-v2.css +1 -1
  5. package/build/css/homepage-main.css +1 -1
  6. package/build/css/kitchen-plp-main.css +1 -1
  7. package/build/css/main.css +1 -1
  8. package/build/css/my-account-main-v2.css +1 -1
  9. package/build/css/my-account-main.css +1 -1
  10. package/build/css/pages/page_checkout_delivery-new.css +1 -1
  11. package/build/css/pages/page_products-list-combined.css +1 -1
  12. package/build/css/pages/page_products-list.css +1 -1
  13. package/build/css/pdp-main-before-combine.css +1 -1
  14. package/build/css/pdp-main-non-critical.css +1 -1
  15. package/build/css/pdp-main.css +1 -1
  16. package/build/css/plp-main.css +1 -1
  17. package/build/css/store-locator-main.css +1 -1
  18. package/build/js/account-members.min.js +1 -1
  19. package/build/js/add-project-list-id.min.js +1 -1
  20. package/build/js/address-book.min.js +1 -1
  21. package/build/js/basket.min.js +2 -2
  22. package/build/js/bundle.min.js +1 -1
  23. package/build/js/change-password.min.js +1 -1
  24. package/build/js/checkout.min.js +2 -2
  25. package/build/js/emulation.min.js +1024 -278
  26. package/build/js/general.bundle.min.js +1 -1
  27. package/build/js/merged-checkout.min.js +2 -2
  28. package/build/js/mini-basket-slider.min.js +1 -0
  29. package/build/js/page/basket/basket-update-cart-action.js +60 -0
  30. package/build/js/page/basket/basket-update-cart.js +29 -0
  31. package/build/js/page/basket/basket-utils.js +50 -0
  32. package/build/js/page/basket/mini-basket-total.js +97 -0
  33. package/build/js/page/basket/quantity-change-handler.js +56 -0
  34. package/build/js/page/basket/update-quantity-operation.js +37 -0
  35. package/build/js/page/basket/update-quantity.js +65 -0
  36. package/build/js/page/basket-v2.js +138 -244
  37. package/build/js/page/components/discounts.js +6 -6
  38. package/build/js/page/components/mini-basket-slider.js +562 -0
  39. package/build/js/page/components/order-summary.js +25 -42
  40. package/build/js/page/plp-cards-v2.js +15 -6
  41. package/build/js/page/plp-load-more.js +1 -1
  42. package/build/js/page/utils/validation.js +1 -46
  43. package/build/js/pdp.bundle.min.js +1 -1
  44. package/build/js/personal-details.min.js +1 -1
  45. package/build/js/plp.bundle.min.js +1 -1
  46. package/build/js/project-list.min.js +1 -44
  47. package/build/js/quiz.min.js +1 -1
  48. package/build/js/track-my-order.min.js +1 -1
  49. package/package.json +2 -2
  50. package/src/components/card_product_v2.hbs +10 -5
  51. package/src/components/card_sponsor_banner.hbs +8 -0
  52. package/src/components/card_sponsor_product.hbs +6 -0
  53. package/src/components/checkout-payment-details-v2.hbs +2 -3
  54. package/src/components/injected-content.hbs +1 -1
  55. package/src/components/mini-basket/mini-basket-empty.hbs +3 -13
  56. package/src/components/mini-basket/mini-basket-order-item.hbs +73 -0
  57. package/src/components/mini-basket/mini-basket.hbs +32 -13
  58. package/src/components/mini-basket/product-item.hbs +37 -16
  59. package/src/data/data_confirmation-summary.json +4 -2
  60. package/src/data/data_mini-basket.json +4 -80
  61. package/src/data/data_search-results_v2.json +56 -141
  62. package/src/elements/form-row.hbs +1 -1
  63. package/src/elements/input.hbs +2 -31
  64. package/src/js/components/banner-placement-manager.js +258 -0
  65. package/src/js/components/general/cart-slider.js +3 -0
  66. package/src/js/components/general/create-popup-slider.js +5 -2
  67. package/src/js/components/general/notification.js +1 -2
  68. package/src/js/components/toggle-password-visibility.js +58 -0
  69. package/src/js/emulation/banner-placement-manager.js +53 -0
  70. package/src/js/emulation/checkout-payment-details.js +14 -23
  71. package/src/js/emulation/custom-slider-emulation.js +4 -10
  72. package/src/js/emulation/forms.js +2 -7
  73. package/src/js/emulation/mini-basket-data.js +949 -0
  74. package/src/js/page/basket/basket-update-cart-action.js +60 -0
  75. package/src/js/page/basket/basket-update-cart.js +29 -0
  76. package/src/js/page/basket/basket-utils.js +50 -0
  77. package/src/js/page/basket/mini-basket-total.js +97 -0
  78. package/src/js/page/basket/quantity-change-handler.js +56 -0
  79. package/src/js/page/basket/update-quantity-operation.js +37 -0
  80. package/src/js/page/basket/update-quantity.js +65 -0
  81. package/src/js/page/basket-v2.js +138 -244
  82. package/src/js/page/components/discounts.js +6 -6
  83. package/src/js/page/components/mini-basket-slider.js +562 -0
  84. package/src/js/page/components/order-summary.js +25 -42
  85. package/src/js/page/plp-cards-v2.js +15 -6
  86. package/src/js/page/plp-load-more.js +1 -1
  87. package/src/js/page/utils/validation.js +1 -46
  88. package/src/layouts/base.hbs +0 -6
  89. package/src/layouts/checkout.hbs +5 -1
  90. package/src/page_my-account_change-password.html +0 -1
  91. package/src/page_payment-details-with-gift-card.html +4 -7
  92. package/src/page_plp_v2.html +16 -6
  93. package/src/page_search-results.html +12 -2
  94. package/src/partials/scripts.hbs +1 -0
  95. package/src/scss/components/_custom-slider.scss +125 -3
  96. package/src/scss/components/_popover-mini-basket.scss +0 -4
  97. package/src/scss/components/card-product-banner.scss +91 -3
  98. package/src/scss/components/checkout-payment-details-v2.scss +0 -2
  99. package/src/scss/pages/page_checkout_delivery-new.scss +0 -26
  100. package/src/scss/pages/page_products-list-combined.scss +11 -0
  101. package/src/scss/pages/page_products-list.scss +8 -0
  102. package/build/img/giftcard.svg +0 -28
  103. package/build/js/gift-cards.min.js +0 -1
  104. package/build/js/page/components/gift-cards.js +0 -877
  105. package/build/js/page/components/toggle-password-visibility.js +0 -22
  106. package/build/js/page/utils/gift-cards-utils.js +0 -144
  107. package/build/js/page/utils/input-handling.js +0 -92
  108. package/build/js/page/utils/show-hide-input.js +0 -28
  109. package/build/js/toggle-password-visibility.min.js +0 -1
  110. package/src/components/gift-cards-hint.hbs +0 -9
  111. package/src/components/gift-cards.hbs +0 -90
  112. package/src/components/giftcard-chip.hbs +0 -23
  113. package/src/components/giftcard-summary.hbs +0 -6
  114. package/src/img/giftcard.svg +0 -28
  115. package/src/js/components/general/mini-basket-slider.js +0 -8
  116. package/src/js/components/product-banner.js +0 -148
  117. package/src/js/emulation/checkout-data.js +0 -35
  118. package/src/js/emulation/gift-cards.js +0 -201
  119. package/src/js/page/components/gift-cards.js +0 -877
  120. package/src/js/page/components/toggle-password-visibility.js +0 -22
  121. package/src/js/page/utils/gift-cards-utils.js +0 -144
  122. package/src/js/page/utils/input-handling.js +0 -92
  123. package/src/js/page/utils/show-hide-input.js +0 -28
  124. package/src/scss/components/_gift-cards.scss +0 -361
@@ -303,6 +303,60 @@ Wick.Autocomplete = (function(){
303
303
  init();
304
304
  })();
305
305
 
306
+ // Simulate prompt for input
307
+ function getInputs() {
308
+ const productBannerPositions = prompt("Enter Product Banner Positions:", "2") || "";
309
+ const sponsorProductPositions = prompt("Enter Sponsor Product Positions (comma-separated):", "6,7,8") || "";
310
+ const sponsorBannerPositions = prompt("Enter Sponsor Banner Positions:", "10") || "";
311
+
312
+ return {
313
+ productBannerPositions: productBannerPositions ? productBannerPositions.split(",").map(Number) : [],
314
+ sponsorProductPositions: sponsorProductPositions ? sponsorProductPositions.split(",").map(Number) : [],
315
+ sponsorBannerPositions: sponsorBannerPositions ? sponsorBannerPositions.split(",").map(Number) : [],
316
+ };
317
+ }
318
+
319
+ function getPositionAttr() {
320
+ const isMobile = Wick.BannerPlacementManager.isMobileResolution();
321
+ return isMobile
322
+ ? 'data-mobile-position'
323
+ : 'data-desktop-position';
324
+ }
325
+
326
+ function updatePositions(inputs) {
327
+ const productBannerElements = document.querySelectorAll(".card-product-banner");
328
+ productBannerElements.forEach((el, index) => {
329
+ if (inputs.productBannerPositions[index] !== undefined) {
330
+ el.setAttribute(getPositionAttr(), inputs.productBannerPositions[index]);
331
+ }
332
+ });
333
+
334
+ const sponsorProductElements = document.querySelectorAll(".card-sponsor-product");
335
+ sponsorProductElements.forEach((el, index) => {
336
+ if (inputs.sponsorProductPositions[index] !== undefined) {
337
+ el.setAttribute(getPositionAttr(), inputs.sponsorProductPositions[index]);
338
+ }
339
+ });
340
+
341
+ const sponsorBannerElements = document.querySelectorAll(".card-sponsor-banner");
342
+ sponsorBannerElements.forEach((el, index) => {
343
+ if (inputs.sponsorBannerPositions[index] !== undefined) {
344
+ el.setAttribute(getPositionAttr(), inputs.sponsorBannerPositions[index]);
345
+ }
346
+ });
347
+ }
348
+
349
+ function init() {
350
+ const inputs = getInputs();
351
+ updatePositions(inputs);
352
+ }
353
+
354
+ $(document).ready(function () {
355
+ if ($('.retail-media .products-list.products-list-v2').length) {
356
+ setTimeout(() => init(), 100)
357
+ }
358
+ });
359
+
306
360
  var Wick = Wick || {};
307
361
  Wick.BasketData = (function () {
308
362
  return {
@@ -3428,42 +3482,6 @@ Wick.checkLocalEnv = (function () {
3428
3482
  }
3429
3483
  })();
3430
3484
 
3431
- var Wick = Wick || {};
3432
- Wick.CheckoutData = (function () {
3433
- return {
3434
- //TODO: update after BE confirmation
3435
- successGiftCardData: {
3436
- "subTotal": "£100.00",
3437
- "deliveryCost": "£4.00",
3438
- "freeDelivery": false,
3439
- "clickAndCollectCost": "FREE",
3440
- "totalForDelivery": "£69.00",
3441
- "totalForClickAndCollect": "FREE",
3442
- "total": "£0.00",
3443
- "vat": "£11.17",
3444
- "deliveryOrder": true,
3445
- "clickAndCollectOrder": false,
3446
- "discountTotal": "£2.00",
3447
- "giftCardApplied": "-£100.00",
3448
- "discounts": [
3449
- "Spend over £10 and get £2 fixed discount"
3450
- ],
3451
- "promotionsInfo": [
3452
- {
3453
- "description": "Spend over £10 and get £2 fixed discount",
3454
- "usedCouponCode": "RT_02"
3455
- }
3456
- ],
3457
- "subTotalWithDeliveryCost": "£69.00",
3458
- "net": false,
3459
- "subtotalWithDeliveryAndDiscounts": "£67.00",
3460
- "discountAmounts": [],
3461
- "goodsTotalWithoutDiscount": "£65.00",
3462
- "charityPrice": ""
3463
- },
3464
- }
3465
- })();
3466
-
3467
3485
  var Wick = Wick || {};
3468
3486
  Wick.DeliveryDetails = (function () {
3469
3487
  var $page = $('.page_checkout-delivery-details');
@@ -3504,33 +3522,24 @@ var Wick = Wick || {};
3504
3522
 
3505
3523
  Wick.PaymentDetails = (function () {
3506
3524
  var $btnEnterDetails = $('.btn-enter-details'),
3525
+ $form = $btnEnterDetails.parents('form'),
3507
3526
  isGuestPage = $('.page_checkout-payment-details_guest').length;
3508
3527
 
3509
3528
  function bindEvents () {
3510
- $btnEnterDetails.on('click', function (e) {
3511
- e.preventDefault();
3512
- var $scope = $(this).closest('form');
3513
- if (!$scope.length) $scope = $(this).closest('.billing-address');
3514
- if (!$scope.length) $scope = $('.billing-address');
3515
- var nameVal= ($scope.find('#card-name').val() || '').trim();
3516
- var finderVal= ($scope.find('#first-line-address').val() || '').trim();
3517
- var manualLine1= ($scope.find('#address-line-1').val() || '').trim();
3518
- var manualTown= ($scope.find('#town-city').val() || '').trim();
3519
- var manualPost= ($scope.find('#postcode_additional').val() || '').trim();
3520
- var addressFinderOk = finderVal.length > 0;
3521
- var addressManualOk = manualLine1 && manualTown && manualPost;
3522
-
3523
- if (nameVal && (addressFinderOk || addressManualOk)) {
3524
- var $details = $('.checkout-payment-details__card-details');
3525
- $details.removeClass('checkout-payment-details__card-details_hidden');
3526
- $('html, body').animate({ scrollTop: $details.offset().top - 15 }, 700);
3527
- return;
3528
- }
3529
-
3530
- var formEl = $scope.closest('form').get(0) || $scope.get(0);
3531
- if (formEl && Wick.Forms && Wick.Forms.showValidationErrors) {
3532
- Wick.Forms.showValidationErrors(formEl);
3529
+ $btnEnterDetails.on('click', function(){
3530
+ if ($form.find('#card-name').val().length &&
3531
+ $form.find('#first-line-address').val().length &&
3532
+ $form.find('#address-line-1').val().length &&
3533
+ $form.find('#town-city').val().length &&
3534
+ $form.find('#postcode_additional').val().length){
3535
+ $('.checkout-payment-details__card-details').removeClass('checkout-payment-details__card-details_hidden');
3536
+ $('html, body').animate({
3537
+ scrollTop: $('.checkout-payment-details__card-details').offset().top - 15
3538
+ }, 700);
3539
+ return false;
3533
3540
  }
3541
+ Wick.Forms.showValidationErrors($form[0]);
3542
+ return false;
3534
3543
  });
3535
3544
 
3536
3545
  $('.checkout-payment-details__card-details').on('submit', function(){
@@ -3741,24 +3750,18 @@ function simulateHybrisSendingHtml() {
3741
3750
  document.dispatchEvent(event);
3742
3751
  }
3743
3752
 
3744
- function initCloseJustAddedDiff() {
3745
- $(window).on('CLOSE_JUST_ADDED CLOSE_MINI_BASKET', function ({ detail: { resolve }}) {
3753
+ function bindResolveEvent(events) {
3754
+ $(window).on(events.join(' '), function ({ detail: { resolve } }) {
3746
3755
  setTimeout(() => {
3747
- return resolve();
3756
+ resolve();
3748
3757
  }, 200);
3749
3758
  });
3750
- };
3751
-
3752
- function simulateShowMiniBasket() {
3753
- const event = new CustomEvent('showMiniBasket', {});
3754
- document.dispatchEvent(event);
3755
3759
  }
3756
3760
 
3757
3761
  $(document).ready(function () {
3758
3762
  $('.btn-add-to-basket').on('click', simulateHybrisSendingHtml);
3759
- $('.header-minicart__btn').on('click', simulateShowMiniBasket);
3760
3763
 
3761
- initCloseJustAddedDiff();
3764
+ bindResolveEvent(['CLOSE_JUST_ADDED', 'CLOSE_MINI_BASKET', 'MINI_BASKET_CHECKOUT', 'MINI_BASKET_VIEW_BASKET']);
3762
3765
  });
3763
3766
 
3764
3767
  var Wick = Wick || {};
@@ -4067,16 +4070,11 @@ Wick.Forms = (function(){
4067
4070
 
4068
4071
  var showValidationErrors = function (form, errorMsg) {
4069
4072
  var $form = $(form);
4070
- var $rows = $form.find(fieldRow).not('[data-no-global-validation]');
4071
- if (!$rows.length) return;
4072
- $rows.find('.form-row__error').remove();
4073
-
4074
4073
  if (!$form.hasClass(formInvalid)) {
4075
- $form.addClass(formInvalid);
4074
+ $form.find('.form-row__error').remove();
4075
+ $form.addClass(formInvalid).find(fieldRow).append(validationError(errorMsg)).addClass(rowValidationError);
4076
4076
  }
4077
4077
 
4078
- $rows.append(validationError(errorMsg)).addClass(rowValidationError);
4079
-
4080
4078
  var $firstMsg = $form.find(fieldRow).first();
4081
4079
  if($firstMsg.length && !isElementInViewport($firstMsg)){
4082
4080
  var inModal = $firstMsg.closest('.modal').length,
@@ -4386,208 +4384,6 @@ $(document).ready(function () {
4386
4384
  Wick.GenerateProjectIdLocal.init();
4387
4385
  });
4388
4386
 
4389
- (function () {
4390
- if (!window.Wick) return;
4391
-
4392
- const M_OK = '0000000000000001';
4393
- const M_ZERO_BALANCE = '0000000000000000';
4394
- const M_NOT_RECOGNISED = '1111111111111111';
4395
- const M_LOCKED = '2222222222222222';
4396
- const M_MERCHANT_ISSUE = '3333333333333333';
4397
- const M_EXCHANGE = '4040404040404040';
4398
- const M_EXPIRED = '4444444444444444';
4399
- const M_INVALID = '5555555555555555';
4400
- const M_ADDED = '6666666666666666';
4401
- const M_CONFIG_PROBLEM = '9999999999999999';
4402
-
4403
- const M_PAY_ERR_101 = '7777777777777101';
4404
- const M_PAY_ERR_102 = '7777777777777102';
4405
- const M_PAY_ERR_103 = '7777777777777103';
4406
-
4407
- const PAY_ERROR_CARD_MAP = {
4408
- [M_PAY_ERR_101]: 101,
4409
- [M_PAY_ERR_102]: 102,
4410
- [M_PAY_ERR_103]: 103,
4411
- };
4412
-
4413
- const GIFT_CARDS_LIMIT = 3;
4414
- const BASE_ORDER_TOTAL = 300.00;
4415
-
4416
- let PAY_ERROR_CODE;
4417
-
4418
- const mock = {
4419
- orderTotal: BASE_ORDER_TOTAL,
4420
- giftCardTotal: 0.00,
4421
- giftCards: [],
4422
- };
4423
-
4424
- const toMasked = (num) => `************${String(num || '').slice(-5)}`;
4425
-
4426
- function recomputeTotalsAndOrder() {
4427
- mock.giftCardTotal = mock.giftCards.reduce((sum, c) => sum + Number(c.amountToRedeem || 0), 0);
4428
- const remaining = Math.max(0, BASE_ORDER_TOTAL - mock.giftCardTotal);
4429
- mock.orderTotal = Number(remaining.toFixed(2));
4430
- }
4431
-
4432
- function applyWithClamp(requestedAmount) {
4433
- const remaining = Math.max(0, BASE_ORDER_TOTAL - mock.giftCardTotal);
4434
- const applied = Math.min(Number(requestedAmount || 0), remaining);
4435
- return Number(applied.toFixed(2));
4436
- }
4437
-
4438
- function successPayload() {
4439
- return {
4440
- orderTotal: mock.orderTotal,
4441
- giftCardTotal: mock.giftCardTotal,
4442
- giftCards: mock.giftCards.slice()
4443
- };
4444
- }
4445
-
4446
- function getGiftCardErrorCode(giftCardNumber) {
4447
- switch (giftCardNumber) {
4448
- case M_NOT_RECOGNISED:
4449
- return 10;
4450
- case M_LOCKED:
4451
- return 16;
4452
- case M_MERCHANT_ISSUE:
4453
- return 20;
4454
- case M_EXCHANGE:
4455
- return 40;
4456
- case M_EXPIRED:
4457
- return 60;
4458
- case M_INVALID:
4459
- return 99;
4460
- case M_ADDED:
4461
- return 89;
4462
- case M_CONFIG_PROBLEM:
4463
- return -1;
4464
- default:
4465
- return null;
4466
- }
4467
- }
4468
-
4469
- function addGiftCardMock(giftCardNumber) {
4470
- const errorCode = getGiftCardErrorCode(giftCardNumber);
4471
-
4472
- let requested;
4473
- if (giftCardNumber === M_OK) {
4474
- requested = 123.45;
4475
- } else if (giftCardNumber === M_ZERO_BALANCE) {
4476
- requested = 0;
4477
- } else {
4478
- requested = 50.00;
4479
- }
4480
-
4481
- if (mock.giftCards.length >= GIFT_CARDS_LIMIT) {
4482
- return Promise.reject({ code: 20 });
4483
- }
4484
-
4485
- const beforeTotal = mock.giftCardTotal;
4486
- const applied = applyWithClamp(requested);
4487
-
4488
- mock.giftCards.push({
4489
- id: (Date.now() + Math.random()).toString(36),
4490
- maskedNumber: toMasked(giftCardNumber),
4491
- amountToRedeem: applied,
4492
- originalNumber: giftCardNumber,
4493
- });
4494
-
4495
- if (mock.giftCards.length === GIFT_CARDS_LIMIT) {
4496
- const leftover = Math.max(0, BASE_ORDER_TOTAL - (beforeTotal + applied));
4497
- if (leftover > 0) {
4498
- const last = mock.giftCards[mock.giftCards.length - 1];
4499
- last.amountToRedeem = Number((Number(last.amountToRedeem) + leftover).toFixed(2));
4500
- }
4501
- mock.giftCardTotal = BASE_ORDER_TOTAL;
4502
- mock.orderTotal = 0;
4503
- return Promise.resolve(successPayload());
4504
- }
4505
-
4506
- recomputeTotalsAndOrder();
4507
- return Promise.resolve(successPayload());
4508
- }
4509
-
4510
- function removeGiftCardMock(index) {
4511
- const beforeLen = mock.giftCards.length;
4512
- if (index < 0 || index >= beforeLen) return Promise.reject({ code: 20 });
4513
-
4514
- mock.giftCards.splice(index, 1);
4515
- recomputeTotalsAndOrder();
4516
- return Promise.resolve(successPayload());
4517
- }
4518
-
4519
- function anyPayErrorCardApplied() {
4520
- for (const gc of mock.giftCards) {
4521
- const code = PAY_ERROR_CARD_MAP[gc.originalNumber];
4522
- if (Number.isFinite(code)) return code;
4523
- }
4524
- return undefined;
4525
- }
4526
-
4527
- function initGiftCardMock() {
4528
- if (!$('.giftcard-row, .giftcard').length) return;
4529
-
4530
- $(window).off(Wick.GiftCard.ADD_GIFT_CARD);
4531
- $(window).off(Wick.GiftCard.REMOVE_GIFT_CARD);
4532
- $(window).off(Wick.GiftCard.PAY_WITH_GIFT_CARD);
4533
-
4534
- $(window).on(Wick.GiftCard.ADD_GIFT_CARD, function (e) {
4535
- const payload = (e.detail && e.detail.payload) || {};
4536
- const giftCardNumber = payload.giftCardNumber;
4537
- setTimeout(function () {
4538
- addGiftCardMock(giftCardNumber)
4539
- .then(function (p) { e.detail.resolve(Object.assign({ code: 0 }, p)); })
4540
- .catch(function (err) { e.detail.reject(err); });
4541
- }, 1000);
4542
- });
4543
-
4544
- $(window).on(Wick.GiftCard.REMOVE_GIFT_CARD, function (e) {
4545
- const payload = (e.detail && e.detail.payload) || {};
4546
- const index = Number(payload.index);
4547
- setTimeout(function () {
4548
- removeGiftCardMock(index)
4549
- .then(function (p) { e.detail.resolve(Object.assign({ code: 0 }, p)); })
4550
- .catch(function (err) { e.detail.reject(err); });
4551
- }, 1000);
4552
- });
4553
-
4554
- $(window).on(Wick.GiftCard.PAY_WITH_GIFT_CARD, function (e) {
4555
- setTimeout(function () {
4556
- const forcedErrorFromCard = anyPayErrorCardApplied();
4557
- if (Number.isFinite(forcedErrorFromCard)) {
4558
- return e.detail.reject({
4559
- errorCode: forcedErrorFromCard,
4560
- giftCards: mock.giftCards.slice(),
4561
- });
4562
- }
4563
-
4564
- if (Number(mock.orderTotal) === 0) {
4565
- e.detail.resolve({ url: 'page_checkout_confirmation-billie.html' });
4566
- } else {
4567
- const errorCode = Number.isFinite(PAY_ERROR_CODE) ? PAY_ERROR_CODE : undefined;
4568
- e.detail.reject({
4569
- errorCode,
4570
- giftCards: mock.giftCards.slice(),
4571
- });
4572
- }
4573
- }, 1000);
4574
- });
4575
- }
4576
-
4577
- $(document).ready(function () {
4578
- mock.giftCards = [];
4579
- recomputeTotalsAndOrder();
4580
-
4581
- Wick.GiftCard.init({
4582
- giftCardsLimit: GIFT_CARDS_LIMIT,
4583
- errorCode: PAY_ERROR_CODE,
4584
- giftCards: mock.giftCards.slice()
4585
- });
4586
- });
4587
-
4588
- $(document).ready(initGiftCardMock);
4589
- })();
4590
-
4591
4387
  const suggestions = [
4592
4388
  {
4593
4389
  value: 'lintel',
@@ -10002,6 +9798,956 @@ Wick.MainNavData = (function () {
10002
9798
  }
10003
9799
  })();
10004
9800
 
9801
+ var Wick = Wick || {};
9802
+ Wick.MiniBasketData = (function () {
9803
+ return {
9804
+ updateQuantity: {
9805
+ "statusCode": "lowStock",
9806
+ "quantityAdded": 71,
9807
+ "quantity": 0,
9808
+ "entry": {
9809
+ "entryNumber": 2,
9810
+ "quantity": 74,
9811
+ "basePrice": {
9812
+ "currencyIso": "GBP",
9813
+ "value": 5.0,
9814
+ "priceType": "BUY",
9815
+ "formattedValue": "£5.00",
9816
+ "minQuantity": null,
9817
+ "maxQuantity": null,
9818
+ "currencySymbol": "£",
9819
+ "wasPrice": null,
9820
+ "infoUom": null,
9821
+ "infoUomPrice": null,
9822
+ "singleVolumePrice": null,
9823
+ "vatRatePercentage": null,
9824
+ "sellingUomDescription": null,
9825
+ "formattedPriceWithoutCurrencySymbol": "5.00",
9826
+ "pricing": null
9827
+ },
9828
+ "basePriceExcVat": {
9829
+ "value": 4,
9830
+ "formattedValue": "£4",
9831
+ "currencyIso": "GBP",
9832
+ "formattedPriceWithoutCurrencySymbol": "4"
9833
+ },
9834
+ "totalPrice": {
9835
+ "currencyIso": "GBP",
9836
+ "value": 20.0,
9837
+ "priceType": "BUY",
9838
+ "formattedValue": "£20.00",
9839
+ "minQuantity": null,
9840
+ "maxQuantity": null,
9841
+ "currencySymbol": "£",
9842
+ "wasPrice": null,
9843
+ "infoUom": null,
9844
+ "infoUomPrice": null,
9845
+ "singleVolumePrice": null,
9846
+ "vatRatePercentage": null,
9847
+ "sellingUomDescription": null,
9848
+ "formattedPriceWithoutCurrencySymbol": "20.00",
9849
+ "pricing": null
9850
+ },
9851
+ "product": {
9852
+ "code": "221100",
9853
+ "name": "Blue Circle Ready To Use Postcrete - 20kg",
9854
+ "url": "/Blue-Circle-Ready-To-Use-Postcrete---20kg/p/221100",
9855
+ "purchasable": true,
9856
+ "stock": {
9857
+ "stockLevelStatus": {
9858
+ "code": "outOfStock",
9859
+ "type": "StockLevelStatus"
9860
+ },
9861
+ "stockLevel": 0,
9862
+ "stockThreshold": null,
9863
+ "makeUnavailable": false,
9864
+ "originalStockLevelStatus": {
9865
+ "code": "outOfStock",
9866
+ "type": "StockLevelStatus"
9867
+ },
9868
+ "exists": false,
9869
+ "stockMessage": null
9870
+ },
9871
+ "availableForPickup": true,
9872
+ "price": {
9873
+ "currencyIso": "GBP",
9874
+ "value": 5.0,
9875
+ "priceType": "BUY",
9876
+ "formattedValue": "£5.00",
9877
+ "minQuantity": null,
9878
+ "maxQuantity": null,
9879
+ "currencySymbol": "£",
9880
+ "wasPrice": null,
9881
+ "infoUom": "KG",
9882
+ "infoUomPrice": 0.25,
9883
+ "singleVolumePrice": null,
9884
+ "vatRatePercentage": 20.0,
9885
+ "sellingUomDescription": null,
9886
+ "formattedPriceWithoutCurrencySymbol": "5.00",
9887
+ "pricing": null
9888
+ },
9889
+ "images": [
9890
+ {
9891
+ "imageType": "PRIMARY",
9892
+ "format": "zoom",
9893
+ "url": "//media.wickes.co.uk/is/image/wickes/largeNormal/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_00",
9894
+ "altText": "Blue Circle Ready To Use Postcrete - 20kg",
9895
+ "galleryIndex": null,
9896
+ "width": null
9897
+ },
9898
+ {
9899
+ "imageType": "PRIMARY",
9900
+ "format": "product",
9901
+ "url": "//media.wickes.co.uk/is/image/wickes/normal/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_00",
9902
+ "altText": "Blue Circle Ready To Use Postcrete - 20kg",
9903
+ "galleryIndex": null,
9904
+ "width": null
9905
+ },
9906
+ {
9907
+ "imageType": "PRIMARY",
9908
+ "format": "thumbnail",
9909
+ "url": "//media.wickes.co.uk/is/image/wickes/thumbnail/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_00",
9910
+ "altText": "Blue Circle Ready To Use Postcrete - 20kg",
9911
+ "galleryIndex": null,
9912
+ "width": null
9913
+ },
9914
+ {
9915
+ "imageType": "PRIMARY",
9916
+ "format": "cartIcon",
9917
+ "url": "//media.wickes.co.uk/is/image/wickes/smallThumbnail/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_00",
9918
+ "altText": "Blue Circle Ready To Use Postcrete - 20kg",
9919
+ "galleryIndex": null,
9920
+ "width": null
9921
+ }
9922
+ ],
9923
+ "categories": [
9924
+ {
9925
+ "code": "1000208",
9926
+ "name": "Cement",
9927
+ "url": "/Products/Building-Materials/Cement+Aggregates/Cement/c/1000208",
9928
+ "description": null,
9929
+ "image": null,
9930
+ "parentCategoryName": null,
9931
+ "sequence": 0
9932
+ },
9933
+ {
9934
+ "code": "1000211",
9935
+ "name": "Concrete",
9936
+ "url": "/Products/Building-Materials/Cement+Aggregates/Concrete/c/1000211",
9937
+ "description": null,
9938
+ "image": null,
9939
+ "parentCategoryName": null,
9940
+ "sequence": 0
9941
+ }
9942
+ ],
9943
+ "baseOptions": [],
9944
+ "volumePrices": [],
9945
+ "configurable": false,
9946
+ "imageSetId": "B3182_221100_IS",
9947
+ "fulfilmentType": "STANDARD",
9948
+ "noScriptProductImageUrl": "//media.wickes.co.uk/is/image/wickes/largeNormal/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_00?defaultImage=wickes/2018-Wickes-Missing-Product-650x650",
9949
+ "sellOnly": false,
9950
+ "externalAverageRating": 4.9,
9951
+ "externalReviewCount": 4680,
9952
+ "coshhSheetUrl": "//media.wickes.co.uk/documents/wickes/B3182_221100_COSHH_0",
9953
+ "techSheetUrl": "//media.wickes.co.uk/documents/wickes/B3182_221100_TECH_0",
9954
+ "priceInclusiveVat": {
9955
+ "currencyIso": "GBP",
9956
+ "value": 5.0,
9957
+ "priceType": "BUY",
9958
+ "formattedValue": "£5.00",
9959
+ "minQuantity": null,
9960
+ "maxQuantity": null,
9961
+ "currencySymbol": "£",
9962
+ "wasPrice": null,
9963
+ "infoUom": "KG",
9964
+ "infoUomPrice": 0.25,
9965
+ "singleVolumePrice": null,
9966
+ "vatRatePercentage": 20.0,
9967
+ "sellingUomDescription": null,
9968
+ "formattedPriceWithoutCurrencySymbol": "5.00",
9969
+ "pricing": null
9970
+ },
9971
+ "priceExclusiveVat": {
9972
+ "currencyIso": "GBP",
9973
+ "value": 4.17,
9974
+ "priceType": "BUY",
9975
+ "formattedValue": "£4.17",
9976
+ "minQuantity": null,
9977
+ "maxQuantity": null,
9978
+ "currencySymbol": "£",
9979
+ "wasPrice": null,
9980
+ "infoUom": null,
9981
+ "infoUomPrice": null,
9982
+ "singleVolumePrice": null,
9983
+ "vatRatePercentage": null,
9984
+ "sellingUomDescription": null,
9985
+ "formattedPriceWithoutCurrencySymbol": "4.17",
9986
+ "pricing": null
9987
+ },
9988
+ "downStreamData": {
9989
+ "description": "Blue Circle Ready To Use Postcrete - 20kg",
9990
+ "fulfillmentType": "STANDARD",
9991
+ "swapCode": "",
9992
+ "productRanking": null,
9993
+ "order": null
9994
+ },
9995
+ "categoryPath": "Products/Building Materials/Cement & Aggregates/Cement",
9996
+ "hasDataSheets": true,
9997
+ "coshhSheetList": [
9998
+ {
9999
+ "code": "B3182_221100_COSHH_0",
10000
+ "description": null,
10001
+ "altText": null,
10002
+ "url": "//media.wickes.co.uk/documents/wickes/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_COSHH_0",
10003
+ "downloadUrl": "//media.wickes.co.uk/documents/wickes/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_COSHH_0",
10004
+ "size": null
10005
+ }
10006
+ ],
10007
+ "dopSheetList": [],
10008
+ "epdSheetList": [],
10009
+ "gilSheetList": [
10010
+ {
10011
+ "code": "B3182_221100_GIL_0",
10012
+ "description": null,
10013
+ "altText": null,
10014
+ "url": "//media.wickes.co.uk/documents/wickes/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_GIL_0",
10015
+ "downloadUrl": "//media.wickes.co.uk/documents/wickes/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_GIL_0",
10016
+ "size": null
10017
+ }
10018
+ ],
10019
+ "techSheetList": [
10020
+ {
10021
+ "code": "B3182_221100_TECH_0",
10022
+ "description": null,
10023
+ "altText": null,
10024
+ "url": "//media.wickes.co.uk/documents/wickes/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_TECH_0",
10025
+ "downloadUrl": "//media.wickes.co.uk/documents/wickes/Cement-Blue-Circle-Ready-To-Use-Postcrete-20kg~B3182_221100_TECH_0",
10026
+ "size": null
10027
+ }
10028
+ ],
10029
+ "fulfillmentAttributes": {
10030
+ "type": "STANDARD",
10031
+ "leadTimeDays": 1,
10032
+ "bigAndBulky": false,
10033
+ "supplierDelivered": false,
10034
+ "vision": false,
10035
+ "assumedAlwaysInStock": false,
10036
+ "webOnly": false,
10037
+ "treatAsFulfillmentTypeOnCheckout": null
10038
+ },
10039
+ "minOrderQuantity": 1,
10040
+ "gpid": "1000492390",
10041
+ "ean": "5018719100152",
10042
+ "isBaseProduct": false,
10043
+ "brandName": "Blue Circle",
10044
+ "scene7FlyoutViewerISCommand": "",
10045
+ "availableForShoppingList": false,
10046
+ "installationDetails": {
10047
+ "packCoverage": 0.0,
10048
+ "pricePerPack": 5.0,
10049
+ "pricePerPackInPence": 500,
10050
+ "pricePerSQM": 0.0,
10051
+ "width": 0.0,
10052
+ "length": 0.0,
10053
+ "material": "",
10054
+ "packQuantity": 0,
10055
+ "doesNotContainRequiredAttributes": null
10056
+ },
10057
+ "tileInstallationAvailable": false,
10058
+ "tileCalculationAvailable": false,
10059
+ "flooringInstallationAvailable": false,
10060
+ "flooringCalculationAvailable": false,
10061
+ "installationProduct": false,
10062
+ "availabilityRestriction": "NO_RESTRICTIONS",
10063
+ "availableForBigWinsCncOnly": false,
10064
+ "availableForBigWinsStockOnly": false
10065
+ },
10066
+ "updateable": true,
10067
+ "deliveryMode": null,
10068
+ "deliveryPointOfService": {
10069
+ "name": "8973",
10070
+ "displayName": null,
10071
+ "url": null,
10072
+ "description": "NDS Wickes Chadwell Heath",
10073
+ "openingHours": null,
10074
+ "storeContent": null,
10075
+ "features": {},
10076
+ "geoPoint": {
10077
+ "latitude": 51.566937,
10078
+ "longitude": 0.117506
10079
+ },
10080
+ "formattedDistance": null,
10081
+ "distanceKm": null,
10082
+ "mapIcon": null,
10083
+ "address": {
10084
+ "id": "10089029042199",
10085
+ "title": null,
10086
+ "titleCode": null,
10087
+ "firstName": null,
10088
+ "lastName": null,
10089
+ "companyName": "Wickes",
10090
+ "line1": "WICKES, 850 HIGH ROAD",
10091
+ "line2": "CHADWELL HEATH",
10092
+ "town": "ROMFORD",
10093
+ "region": null,
10094
+ "postalCode": "RM6 4HX",
10095
+ "phone": "020 8590 1116",
10096
+ "email": "",
10097
+ "country": {
10098
+ "isocode": "GB",
10099
+ "name": "United Kingdom"
10100
+ },
10101
+ "shippingAddress": false,
10102
+ "billingAddress": false,
10103
+ "defaultAddress": false,
10104
+ "visibleInAddressBook": true,
10105
+ "formattedAddress": "WICKES, 850 HIGH ROAD, CHADWELL HEATH, ROMFORD, RM6 4HX, United Kingdom",
10106
+ "contactAddress": false,
10107
+ "mobile": null,
10108
+ "fax": "123456",
10109
+ "regionString": null,
10110
+ "cardHolderName": null,
10111
+ "businessAddress": false,
10112
+ "createdTimestamp": null
10113
+ },
10114
+ "storeImages": [],
10115
+ "brand": "Wickes",
10116
+ "buyAndCollect": null,
10117
+ "loadingRestriction": null,
10118
+ "specificInfo": "",
10119
+ "satNavPostcode": null,
10120
+ "seoText": null,
10121
+ "productRanges": [],
10122
+ "metaTitle": null,
10123
+ "metaDescription": null,
10124
+ "h1": null
10125
+ },
10126
+ "entries": null,
10127
+ "configurationInfos": [],
10128
+ "statusSummaryMap": {},
10129
+ "entryGroupNumbers": [],
10130
+ "comments": [],
10131
+ "supportedActions": [
10132
+ "REMOVE"
10133
+ ],
10134
+ "taxValues": [
10135
+ {
10136
+ "code": "uk-vat-full",
10137
+ "value": 20.0,
10138
+ "appliedValue": 61.67,
10139
+ "absolute": false,
10140
+ "currencyIsoCode": "GBP"
10141
+ }
10142
+ ],
10143
+ "deliveryModeType": "PICKUP",
10144
+ "fulfilmentRouting": null,
10145
+ "collection": true,
10146
+ "charity": false,
10147
+ "leadTime": null,
10148
+ "leadTimeExtended": null,
10149
+ "itemTotalWithoutDiscount": {
10150
+ "currencyIso": "GBP",
10151
+ "value": 3700.0,
10152
+ "priceType": "BUY",
10153
+ "formattedValue": "£20.00",
10154
+ "minQuantity": null,
10155
+ "maxQuantity": null,
10156
+ "currencySymbol": "£",
10157
+ "wasPrice": null,
10158
+ "infoUom": null,
10159
+ "infoUomPrice": null,
10160
+ "singleVolumePrice": null,
10161
+ "vatRatePercentage": null,
10162
+ "sellingUomDescription": null,
10163
+ "formattedPriceWithoutCurrencySymbol": "20.00",
10164
+ "pricing": null
10165
+ },
10166
+ "itemTotalWithoutDiscountExcVat": {
10167
+ "value": 19,
10168
+ "formattedValue": "£19",
10169
+ "currencyIso": "GBP",
10170
+ "formattedPriceWithoutCurrencySymbol": "19"
10171
+ },
10172
+ "appliedPromotions": null,
10173
+ "tilingInstallationData": null,
10174
+ "flooringInstallationData": null,
10175
+ "alerts": null,
10176
+ "orderFulfilmentControls": {
10177
+ "availableForCollection": true,
10178
+ "availableForDelivery": true,
10179
+ "availableForWickesFulfilment": false
10180
+ },
10181
+ },
10182
+ "deliveryModeChanged": null,
10183
+ "cartCode": "663467017",
10184
+ "statusMessage": "accConfirmedMsgs",
10185
+ "entryGroupNumbers": null,
10186
+ "message": "The Basket quantity of <a href=\"/Blue-Circle-Ready-To-Use-Postcrete---20kg/p/221100\" style=\"text-decoration: underline\">Blue Circle Ready To Use Postcrete - 20kg</a> has been reduced to 74 from 100 due to insufficient stock."
10187
+ },
10188
+ initialCartState: {
10189
+ "code": "696252001",
10190
+ "subTotal": {"value": 10.0, "formattedValue": "£10.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "10.00"},
10191
+ "totalTax": {"value": 3.17, "formattedValue": "£3.17", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "3.17"},
10192
+ "deliveryCost": {"value": 0.0, "formattedValue": "£0.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "0.00"},
10193
+ "charityPrice": {"value": 0.0, "formattedValue": "£0.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "0.00"},
10194
+ "totalDiscounts": {"value": 5.0, "formattedValue": "£5.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "5.00"},
10195
+ "totalPrice": {"value": 10.0, "formattedValue": "£10.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "10.00"},
10196
+ "potentialProductPromotions": [],
10197
+ "appliedProductPromotions": [],
10198
+ "appliedOrderPromotions": [],
10199
+ "promotionsInfo": null,
10200
+ "clickAndCollectOnly": true,
10201
+ "deliveryItemsQuantity": 1,
10202
+ "pickupItemsQuantity": 2,
10203
+ "freeDelivery": false,
10204
+ "subtotalWithoutCharity": {"value": 10.0, "formattedValue": "£10.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "10.00"},
10205
+ "messageForFreeDelivery": null,
10206
+ "pickupOrderGroups": [
10207
+ {
10208
+ "entries": [
10209
+ {
10210
+ "entryNumber": 0,
10211
+ "quantity": 2,
10212
+ "basePrice": {
10213
+ "value": 100.0,
10214
+ "formattedValue": "£100",
10215
+ "currencyIso": "GBP",
10216
+ "formattedPriceWithoutCurrencySymbol": "100"
10217
+ },
10218
+ "basePriceExcVat": {
10219
+ "value": 10,
10220
+ "formattedValue": "10",
10221
+ "currencyIso": "GBP",
10222
+ "formattedPriceWithoutCurrencySymbol": "10"
10223
+ },
10224
+ "product": {
10225
+ "code": "221100",
10226
+ "name": "Blue Circle Ready To Use Postcrete - 20kg",
10227
+ "url": "/Blue-Circle-Ready-To-Use-Postcrete---20kg/p/221100",
10228
+ "minOrderQuantity": 0,
10229
+ "maxOrderQuantity": null,
10230
+ "fulfillmentAttributes": {
10231
+ "type": "STANDARD_STORE_DELIVERED",
10232
+ "leadTimeDays": 1,
10233
+ "supplierDelivered": false
10234
+ },
10235
+ "price": {
10236
+ "value": 100.0,
10237
+ "formattedValue": "£100",
10238
+ "currencyIso": "GBP",
10239
+ "formattedPriceWithoutCurrencySymbol": "100"
10240
+ },
10241
+ "categoryPath": "Products/Building Materials/Cement & Aggregates/Cement",
10242
+ "brandName": "Blue Circle",
10243
+ "categories": [
10244
+ {
10245
+ "code": "1000208",
10246
+ "name": "Cement"
10247
+ },
10248
+ {
10249
+ "code": "1000211",
10250
+ "name": "Concrete"
10251
+ }
10252
+ ],
10253
+ "image": {
10254
+ "url": "//media.wickes.co.uk/is/image/wickes/O0032_109450_00?$normal$",
10255
+ "altText": "Blue Circle Ready To Use Postcrete - 20kg"
10256
+ },
10257
+ "pricePerSqm": 0.0,
10258
+ "installationProduct": false
10259
+ },
10260
+ "updateable": true,
10261
+ "deliveryPointOfService": {
10262
+ "name": "8901",
10263
+ "description": "WX Test Store 12"
10264
+ },
10265
+ "charity": false,
10266
+ "itemTotalWithoutDiscount": {
10267
+ "value": 100.0,
10268
+ "formattedValue": "£100",
10269
+ "currencyIso": "GBP",
10270
+ "formattedPriceWithoutCurrencySymbol": "100"
10271
+ },
10272
+ "itemTotalWithoutDiscountExcVat": {
10273
+ "value": 99,
10274
+ "formattedValue": "£99",
10275
+ "currencyIso": "GBP",
10276
+ "formattedPriceWithoutCurrencySymbol": "99"
10277
+ },
10278
+ "orderFulfilmentControls": {
10279
+ "availableForDelivery": true,
10280
+ "availableForCollection": true,
10281
+ "availableForWickesFulfilment": false
10282
+ }
10283
+ }
10284
+ ],
10285
+ "quantity": 1,
10286
+ "totalPrice": {
10287
+ "value": 100.0,
10288
+ "formattedValue": "£100.00",
10289
+ "currencyIso": "GBP",
10290
+ "formattedPriceWithoutCurrencySymbol": "100.00"
10291
+ }
10292
+ },
10293
+ {
10294
+ "entries": [
10295
+ {
10296
+ "entryNumber": 1,
10297
+ "quantity": 2,
10298
+ "basePrice": {
10299
+ "value": 9.0,
10300
+ "formattedValue": "£9",
10301
+ "currencyIso": "GBP",
10302
+ "formattedPriceWithoutCurrencySymbol": "9"
10303
+ },
10304
+ "basePriceExcVat": {
10305
+ "value": 9,
10306
+ "formattedValue": "£9",
10307
+ "currencyIso": "GBP",
10308
+ "formattedPriceWithoutCurrencySymbol": "9"
10309
+ },
10310
+ "product": {
10311
+ "code": "109450",
10312
+ "name": "Knauf Insulation Space Standard Top Up 170mm Loft Roll - 6.47m²",
10313
+ "url": "/Knauf-Insulation-Space-Standard-Top-Up-170mm-Loft-Roll---6-47m%C2%B2/p/109450",
10314
+ "minOrderQuantity": 0,
10315
+ "maxOrderQuantity": null,
10316
+ "fulfillmentAttributes": {
10317
+ "type": "HOURLY_STANDARD",
10318
+ "leadTimeDays": 1,
10319
+ "supplierDelivered": false
10320
+ },
10321
+ "price": {
10322
+ "value": 8.0,
10323
+ "formattedValue": "£8",
10324
+ "currencyIso": "GBP",
10325
+ "formattedPriceWithoutCurrencySymbol": "8"
10326
+ },
10327
+ "categoryPath": "Products/Building Materials/Insulation/Loft Insulation",
10328
+ "brandName": "Knauf Insulation",
10329
+ "categories": [
10330
+ {
10331
+ "code": "1000270",
10332
+ "name": "Loft Insulation"
10333
+ }
10334
+ ],
10335
+ "image": {
10336
+ "url": "//media.wickes.co.uk/is/image/wickes/O0032_109450_00?$normal$",
10337
+ "altText": "Knauf Insulation Space Standard Top Up 170mm Loft Roll - 6.47m²"
10338
+ },
10339
+ "pricePerSqm": 0.0,
10340
+ "installationProduct": false
10341
+ },
10342
+ "updateable": true,
10343
+ "deliveryPointOfService": {
10344
+ "name": "8397",
10345
+ "description": "WATFORD"
10346
+ },
10347
+ "charity": false,
10348
+ "itemTotalWithoutDiscount": {
10349
+ "value": 8.0,
10350
+ "formattedValue": "£8",
10351
+ "currencyIso": "GBP",
10352
+ "formattedPriceWithoutCurrencySymbol": "8"
10353
+ },
10354
+ "itemTotalWithoutDiscountExcVat": {
10355
+ "value": 23,
10356
+ "formattedValue": "£23",
10357
+ "currencyIso": "GBP",
10358
+ "formattedPriceWithoutCurrencySymbol": "23"
10359
+ },
10360
+ "orderFulfilmentControls": {
10361
+ "availableForDelivery": true,
10362
+ "availableForCollection": true,
10363
+ "availableForWickesFulfilment": false
10364
+ }
10365
+ },
10366
+ ],
10367
+ "quantity": 2,
10368
+ "totalPrice": {
10369
+ "value": 40.5,
10370
+ "formattedValue": "£40.50",
10371
+ "currencyIso": "GBP",
10372
+ "formattedPriceWithoutCurrencySymbol": "40.50"
10373
+ }
10374
+ },
10375
+ ],
10376
+ "deliveryOrderGroups": [
10377
+ {
10378
+ "entries": [
10379
+ {
10380
+ "entryNumber": 4,
10381
+ "quantity": 1,
10382
+ "basePrice": {
10383
+ "value": 25.0,
10384
+ "formattedValue": "£25",
10385
+ "currencyIso": "GBP",
10386
+ "formattedPriceWithoutCurrencySymbol": "25"
10387
+ },
10388
+ "basePriceExcVat": {
10389
+ "value": 8,
10390
+ "formattedValue": "£8",
10391
+ "currencyIso": "GBP",
10392
+ "formattedPriceWithoutCurrencySymbol": "8"
10393
+ },
10394
+ "product": {
10395
+ "code": "123143",
10396
+ "name": "6 Wickes General Purpose Claw test",
10397
+ "url": "/Knauf-Insulation-Super-Top-Up-200mm-Loft-Roll---5-61m%C2%B2/p/109451",
10398
+ "minOrderQuantity": 0,
10399
+ "maxOrderQuantity": null,
10400
+ "fulfillmentAttributes": {
10401
+ "type": "STANDARD",
10402
+ "leadTimeDays": 1,
10403
+ "supplierDelivered": false
10404
+ },
10405
+ "price": {
10406
+ "value": 25.0,
10407
+ "formattedValue": "£25",
10408
+ "currencyIso": "GBP",
10409
+ "formattedPriceWithoutCurrencySymbol": "25"
10410
+ },
10411
+ "categoryPath": "Products/Building Materials/Insulation/Loft Insulation",
10412
+ "brandName": "Knauf Insulation",
10413
+ "categories": [
10414
+ {
10415
+ "code": "1000270",
10416
+ "name": "Loft Insulation"
10417
+ }
10418
+ ],
10419
+ "image": {
10420
+ "url": "//media.wickes.co.uk/is/image/wickes/O0032_109451_00?$normal$",
10421
+ "altText": "Knauf Insulation Super Top Up 200mm Loft Roll - 5.61m²"
10422
+ },
10423
+ "pricePerSqm": 0.0,
10424
+ "installationProduct": false
10425
+ },
10426
+ "updateable": true,
10427
+ "deliveryPointOfService": null,
10428
+ "charity": false,
10429
+ "itemTotalWithoutDiscount": {
10430
+ "value": 25.0,
10431
+ "formattedValue": "£25",
10432
+ "currencyIso": "GBP",
10433
+ "formattedPriceWithoutCurrencySymbol": "25"
10434
+ },
10435
+ "itemTotalWithoutDiscountExcVat": {
10436
+ "value": 24,
10437
+ "formattedValue": "£24",
10438
+ "currencyIso": "GBP",
10439
+ "formattedPriceWithoutCurrencySymbol": "24"
10440
+ },
10441
+ "orderFulfilmentControls": {
10442
+ "availableForDelivery": true,
10443
+ "availableForCollection": true,
10444
+ "availableForWickesFulfilment": false
10445
+ }
10446
+ }
10447
+ ],
10448
+ "quantity": null,
10449
+ "totalPrice": {
10450
+ "value": 25.0,
10451
+ "formattedValue": "£25.00",
10452
+ "currencyIso": "GBP",
10453
+ "formattedPriceWithoutCurrencySymbol": "25.00"
10454
+ }
10455
+ }
10456
+ ],
10457
+ "paymentInfos": {"payPalEnabled": true, "payPalPaymentInfo": {"id": 123, "payer": "John.doe123@gmail.com"}},
10458
+ "payPalEnabled": true,
10459
+ "deliveryAddress": null,
10460
+ "pickupUniqueItemsNumber": 3,
10461
+ "deliveryUniqueItemsNumber": 1,
10462
+ "totalUnitCount": 3,
10463
+ "orderType": "CC"
10464
+ },
10465
+ initialCartEmptyState: {
10466
+ "code": "696252001",
10467
+ "subTotal": {"value": 10.0, "formattedValue": "£10.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "10.00"},
10468
+ "totalTax": {"value": 3.17, "formattedValue": "£3.17", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "3.17"},
10469
+ "deliveryCost": {"value": 0.0, "formattedValue": "£0.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "0.00"},
10470
+ "charityPrice": {"value": 0.0, "formattedValue": "£0.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "0.00"},
10471
+ "totalDiscounts": {"value": 5.0, "formattedValue": "£5.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "5.00"},
10472
+ "totalPrice": {"value": 10.0, "formattedValue": "£10.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "10.00"},
10473
+ "potentialProductPromotions": [],
10474
+ "appliedProductPromotions": [],
10475
+ "appliedOrderPromotions": [],
10476
+ "promotionsInfo": null,
10477
+ "clickAndCollectOnly": true,
10478
+ "deliveryItemsQuantity": 1,
10479
+ "pickupItemsQuantity": 2,
10480
+ "freeDelivery": false,
10481
+ "subtotalWithoutCharity": {"value": 10.0, "formattedValue": "£10.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "10.00"},
10482
+ "messageForFreeDelivery": null,
10483
+ "pickupOrderGroups": [],
10484
+ "deliveryOrderGroups": [],
10485
+ "paymentInfos": {"payPalEnabled": true, "payPalPaymentInfo": {"id": 123, "payer": "John.doe123@gmail.com"}},
10486
+ "payPalEnabled": true,
10487
+ "deliveryAddress": null,
10488
+ "pickupUniqueItemsNumber": 3,
10489
+ "deliveryUniqueItemsNumber": 1,
10490
+ "totalUnitCount": 4,
10491
+ "orderType": "CC"
10492
+ },
10493
+ updateCart: {
10494
+ "code": "696252002",
10495
+ "subTotal": {"value": 19.0, "formattedValue": "£19.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "19.00"},
10496
+ "totalTax": {"value": 3.17, "formattedValue": "£3.17", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "3.17"},
10497
+ "deliveryCost": {"value": 1.1, "formattedValue": "£1.10", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "1.10"},
10498
+ "charityPrice": {"value": 0.0, "formattedValue": "£0.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "0.00"},
10499
+ "totalDiscounts": {"value": 5.0, "formattedValue": "£5.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "5.00"},
10500
+ "totalPrice": {"value": 19.0, "formattedValue": "£19.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "19.00"},
10501
+ "potentialProductPromotions": [
10502
+ {
10503
+ "description": "Buy more to qualify for our buy 3 get 1 free offer",
10504
+ "promotionData": {
10505
+ "code": "TD_ProductBOGOFPromotionPotential",
10506
+ "title": null,
10507
+ "startDate": null,
10508
+ "endDate": null,
10509
+ "description": "Buy 3 get 1 free"
10510
+ },
10511
+ "consumedEntries": [
10512
+ {
10513
+ "orderEntryNumber": 1,
10514
+ "quantity": 4
10515
+ },
10516
+ {
10517
+ "orderEntryNumber": 2,
10518
+ "quantity": 1
10519
+ }
10520
+ ],
10521
+ "usedCouponCode": null
10522
+ }
10523
+ ],
10524
+ "appliedProductPromotions": [
10525
+ {
10526
+ "description": "These item qualify for our buy 3 get 1 free offer - You have saved £36.00",
10527
+ "promotionData": {
10528
+ "code": "TD_ProductBOGOFPromotion",
10529
+ "title": null,
10530
+ "startDate": null,
10531
+ "endDate": null,
10532
+ "description": "Buy 3 get 1 free"
10533
+ },
10534
+ "consumedEntries": [
10535
+ {
10536
+ "orderEntryNumber": 1,
10537
+ "quantity": 2
10538
+ },
10539
+ {
10540
+ "orderEntryNumber": 2,
10541
+ "quantity": 1
10542
+ },
10543
+ {
10544
+ "orderEntryNumber": 1,
10545
+ "quantity": 5
10546
+ }
10547
+ ],
10548
+ "usedCouponCode": null
10549
+ }
10550
+ ],
10551
+ "appliedOrderPromotions": [],
10552
+ "promotionsInfo": [
10553
+ {
10554
+ "description": "Buy 3 get 1 free",
10555
+ "usedCouponCode": ""
10556
+ }
10557
+ ],
10558
+ "clickAndCollectOnly": false,
10559
+ "deliveryItemsQuantity": 1,
10560
+ "pickupItemsQuantity": 2,
10561
+ "freeDelivery": true,
10562
+ "subtotalWithoutCharity": {"value": 19.0, "formattedValue": "£19.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "19.00"},
10563
+ "messageForFreeDelivery": "Free delivery<i class=\"icon fas fa-check\"></i>",
10564
+ "pickupOrderGroups": [
10565
+ {
10566
+ "entries": [
10567
+ {
10568
+ "entryNumber": 1,
10569
+ "quantity": 2,
10570
+ "basePrice": {
10571
+ "value": 16.0,
10572
+ "formattedValue": "£16",
10573
+ "currencyIso": "GBP",
10574
+ "formattedPriceWithoutCurrencySymbol": "16"
10575
+ },
10576
+ "basePriceExcVat": {
10577
+ "value": 18,
10578
+ "formattedValue": "£18",
10579
+ "currencyIso": "GBP",
10580
+ "formattedPriceWithoutCurrencySymbol": "18"
10581
+ },
10582
+ "product": {
10583
+ "code": "109450",
10584
+ "name": "Knauf Insulation Space Standard Top Up 170mm Loft Roll - 6.47m²",
10585
+ "url": "/Knauf-Insulation-Space-Standard-Top-Up-170mm-Loft-Roll---6-47m%C2%B2/p/109450",
10586
+ "minOrderQuantity": 0,
10587
+ "maxOrderQuantity": null,
10588
+ "fulfillmentAttributes": {
10589
+ "type": "HOURLY_STANDARD",
10590
+ "leadTimeDays": 1,
10591
+ "supplierDelivered": false
10592
+ },
10593
+ "price": {
10594
+ "value": 24.0,
10595
+ "formattedValue": "£24",
10596
+ "currencyIso": "GBP",
10597
+ "formattedPriceWithoutCurrencySymbol": "24"
10598
+ },
10599
+ "categoryPath": "Products/Building Materials/Insulation/Loft Insulation",
10600
+ "brandName": "Knauf Insulation",
10601
+ "categories": [
10602
+ {
10603
+ "code": "1000270",
10604
+ "name": "Loft Insulation"
10605
+ }
10606
+ ],
10607
+ "image": {
10608
+ "url": "//media.wickes.co.uk/is/image/wickes/O0032_109450_00?$normal$",
10609
+ "altText": "Knauf Insulation Space Standard Top Up 170mm Loft Roll - 6.47m²"
10610
+ },
10611
+ "pricePerSqm": 0.0,
10612
+ "installationProduct": false
10613
+ },
10614
+ "updateable": true,
10615
+ "deliveryPointOfService": {
10616
+ "name": "8397",
10617
+ "description": "WATFORD"
10618
+ },
10619
+ "charity": false,
10620
+ "itemTotalWithoutDiscount": {
10621
+ "value": 24.0,
10622
+ "formattedValue": "£24",
10623
+ "currencyIso": "GBP",
10624
+ "formattedPriceWithoutCurrencySymbol": "24"
10625
+ },
10626
+ "itemTotalWithoutDiscountExcVat": {
10627
+ "value": 23,
10628
+ "formattedValue": "£23",
10629
+ "currencyIso": "GBP",
10630
+ "formattedPriceWithoutCurrencySymbol": "23"
10631
+ },
10632
+ "orderFulfilmentControls": {
10633
+ "availableForDelivery": true,
10634
+ "availableForCollection": true,
10635
+ "availableForWickesFulfilment": false
10636
+ }
10637
+ }
10638
+ ],
10639
+ "quantity": 1,
10640
+ "totalPrice": {
10641
+ "value": 40.5,
10642
+ "formattedValue": "£40.50",
10643
+ "currencyIso": "GBP",
10644
+ "formattedPriceWithoutCurrencySymbol": "40.50"
10645
+ }
10646
+ }
10647
+ ],
10648
+ "deliveryOrderGroups": [
10649
+ {
10650
+ "entries": [
10651
+ {
10652
+ "entryNumber": 3,
10653
+ "quantity": 3,
10654
+ "basePrice": {
10655
+ "value": 25.0,
10656
+ "formattedValue": "£25",
10657
+ "currencyIso": "GBP",
10658
+ "formattedPriceWithoutCurrencySymbol": "25"
10659
+ },
10660
+ "basePriceExcVat": {
10661
+ "value": 24,
10662
+ "formattedValue": "£24",
10663
+ "currencyIso": "GBP",
10664
+ "formattedPriceWithoutCurrencySymbol": "24"
10665
+ },
10666
+ "product": {
10667
+ "code": "109451",
10668
+ "name": "Knauf Insulation Super Top Up 200mm Loft Roll - 5.61m²",
10669
+ "url": "/Knauf-Insulation-Super-Top-Up-200mm-Loft-Roll---5-61m%C2%B2/p/109451",
10670
+ "minOrderQuantity": 0,
10671
+ "maxOrderQuantity": null,
10672
+ "fulfillmentAttributes": {
10673
+ "type": "STANDARD",
10674
+ "leadTimeDays": 1,
10675
+ "supplierDelivered": false
10676
+ },
10677
+ "price": {
10678
+ "value": 25.0,
10679
+ "formattedValue": "£25",
10680
+ "currencyIso": "GBP",
10681
+ "formattedPriceWithoutCurrencySymbol": "25"
10682
+ },
10683
+ "categoryPath": "Products/Building Materials/Insulation/Loft Insulation",
10684
+ "brandName": "Knauf Insulation",
10685
+ "categories": [
10686
+ {
10687
+ "code": "1000270",
10688
+ "name": "Loft Insulation"
10689
+ }
10690
+ ],
10691
+ "image": {
10692
+ "url": "//media.wickes.co.uk/is/image/wickes/O0032_109451_00?$normal$",
10693
+ "altText": "Knauf Insulation Super Top Up 200mm Loft Roll - 5.61m²"
10694
+ },
10695
+ "pricePerSqm": {
10696
+ "value": 17,
10697
+ "formattedValue": "£17",
10698
+ "currencyIso": "GBP",
10699
+ "formattedPriceWithoutCurrencySymbol": "17"
10700
+ },
10701
+ "pricePerSqmExcVat": {
10702
+ "value": 16,
10703
+ "formattedValue": "£16",
10704
+ "currencyIso": "GBP",
10705
+ "formattedPriceWithoutCurrencySymbol": "16"
10706
+ },
10707
+ "installationProduct": true
10708
+ },
10709
+ "updateable": true,
10710
+ "deliveryPointOfService": null,
10711
+ "charity": false,
10712
+ "itemTotalWithoutDiscount": {
10713
+ "value": 25.0,
10714
+ "formattedValue": "£25",
10715
+ "currencyIso": "GBP",
10716
+ "formattedPriceWithoutCurrencySymbol": "25"
10717
+ },
10718
+ "itemTotalWithoutDiscountExcVat": {
10719
+ "value": 24,
10720
+ "formattedValue": "£24",
10721
+ "currencyIso": "GBP",
10722
+ "formattedPriceWithoutCurrencySymbol": "24"
10723
+ },
10724
+ "orderFulfilmentControls": {
10725
+ "availableForDelivery": true,
10726
+ "availableForCollection": true,
10727
+ "availableForWickesFulfilment": false
10728
+ }
10729
+ },
10730
+ ],
10731
+ "quantity": null,
10732
+ "totalPrice": {
10733
+ "value": 25.0,
10734
+ "formattedValue": "£25.00",
10735
+ "currencyIso": "GBP",
10736
+ "formattedPriceWithoutCurrencySymbol": "25.00"
10737
+ }
10738
+ }
10739
+ ],
10740
+ "paymentInfos": {"payPalEnabled": true, "payPalPaymentInfo": {"id": 123, "payer": "John.doe123@gmail.com"}},
10741
+ "payPalEnabled": true,
10742
+ "deliveryAddress": null,
10743
+ "pickupUniqueItemsNumber": 3,
10744
+ "deliveryUniqueItemsNumber": 1,
10745
+ "totalUnitCount": 2,
10746
+ "orderType": "CC"
10747
+ },
10748
+ }
10749
+ })();
10750
+
10005
10751
  var Wick = Wick || {};
10006
10752
  Wick.ShoppingCart = (function(){
10007
10753
  var $btn = $('.header-minicart__switcher');