1<!doctype html> 2<html class="no-js" lang="en"> 3<!-- Meta Pixel Code -->
4<script>
vendor: 399 bytes, lines 4-13
4 5!function(f,b,e,v,n,t,s) 6{if(f.fbq)return;n=f.fbq=function(){n.callMethod? 7n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 8if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 9n.queue=[];t=b.createElement(e);t.async=!0; 10t.src=v;s=b.getElementsByTagName(e)[0]; 11s.parentNode.insertBefore(t,s)}(window, document,'script', 12'https://connect.facebook.net/en_US/fbevents.js'); 13fbq('init', '
13636781517844804
vendor: 30 bytes, lines 13-14
13'); 14fbq('track', 'PageView');
15</script>
15 16<noscript><img height="1" width="1" style="display:none" 17src="https://www.facebook.com/tr?id=636781517844804&ev=PageView&noscript=1" 18/></noscript> 19<!-- End Meta Pixel Code --> 20 <!-- Google tag (gtag.js) event -->
21<script> 22 gtag('event', 'conversion_event_purchase_1', { 23 // <event_parameters> 24 }); 25</script>
25 26 27<head> 28 29 30 31 32 33 34 35 36<!-- LAYOUTHUB-HELPER --> 37 38<!-- GA4 script tags -->
39<script async src="https://www.googletagmanager.com/gtag/js?id="></script>
vendor: 1 bytes, line 39
39
40<script> 41 window.dataLayer = window.dataLayer || []; 42 function gtag() { dataLayer.push(arguments); } 43 gtag('js', new Date()); 44 gtag('config', '', { groups: 'layouthub' }); 45</script>
45 46<!-- End GA4 script tags --> 47 48<!-- GA4 Snippet -->
49<script> 50 window.addEventListener('load', () => { 51 // fallback for gtag when not initialized 52 if (typeof window.gtag !== 'function') { 53 window.gtag = (str1, str2, obj) => { 54 } 55 } 56 // Poll queued events from pixel localStorage and forward to GA 57 const STORAGE_KEY = 'LH_STORAGE_KEY'; 58 const INTERVAL = 2000; 59 async function flushQueuedEvents() { 60 try { 61 const raw = window.localStorage.getItem(STORAGE_KEY); 62 if (!raw) return; 63 const events = JSON.parse(raw); 64 if (!Array.isArray(events) || events.length === 0) return; 65 for (const ev of events) { 66 if (!ev || !ev.name) continue; 67 const params = ev.params || {}; 68 // attach template tag 69 params.lh_template_event = "search"; 70 gtag('event', ev.name, Object.assign({ app_event: 'layouthub', send_to: 'layouthub' }, params)); 71 } 72 // Clear only if all sent 73 window.localStorage.removeItem(STORAGE_KEY); 74 } catch (e) { 75 // swallow to avoid breaking page 76 } 77 } 78 flushQueuedEvents(); 79 setInterval(flushQueuedEvents, INTERVAL); 80 }) 81</script>
81 82<!-- End GA4 Snippet --><!-- END LAYOUTHUB-HELPER --> 83 84 85 86 87 88 89 90 91<!-- LAYOUTHUB-V2-HEADER --> 92 93 94<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Assistant:wght@regular;500;600;700&display=swap" onload="this.onload=null;this.rel='stylesheet'"><noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Assistant:wght@regular;500;600;700&display=swap"></noscript> 95<style> 96 97 :root{ --lh-other-sale-price-color: #d82727; 98--lh-other-sale-bg-color: #d82727; 99--lh-other-sale-text-color: #ffffff; 100--lh-other-sold-out-bg-color: #adadad; 101--lh-other-sold-out-text-color: #ffffff; 102--lh-other-tag-1-bg-color: #008c62; 103--lh-other-tag-1-text-color: #ffffff; 104--lh-other-tag-2-bg-color: #405de6; 105--lh-other-tag-2-text-color: #ffffff; 106--lh-h1-font-family: Assistant; 107--lh-h1-font-size: 52px; 108--lh-h1-font-weight: 400; 109--lh-h1-line-height: 1.3; 110--lh-h1-letter-spacing: 0.6px; 111--lh-h1-text-transform: inherit; 112--lh-h1-font-style: normal; 113--lh-h2-font-family: Assistant; 114--lh-h2-font-size: 40px; 115--lh-h2-font-weight: 400; 116--lh-h2-line-height: 1.3; 117--lh-h2-letter-spacing: 0.6px; 118--lh-h2-text-transform: inherit; 119--lh-h2-font-style: normal; 120--lh-h3-font-family: Assistant; 121--lh-h3-font-size: 24px;
122--lh-h3-font-weight: 400; 123--lh-h3-line-height: 1.3; 124--lh-h3-letter-spacing: 0.6px; 125--lh-h3-text-transform: inherit; 126--lh-h3-font-style: normal; 127--lh-h4-font-family: Assistant; 128--lh-h4-font-size: 18px; 129--lh-h4-font-weight: 400; 130--lh-h4-line-height: 1.3; 131--lh-h4-letter-spacing: 0.6px; 132--lh-h4-text-transform: inherit; 133--lh-h4-font-style: normal; 134--lh-h5-font-family: Assistant; 135--lh-h5-font-size: 15px; 136--lh-h5-font-weight: 400; 137--lh-h5-line-height: 1.3; 138--lh-h5-letter-spacing: 0.6px; 139--lh-h5-text-transform: inherit; 140--lh-h5-font-style: normal; 141--lh-p-font-family: Assistant; 142--lh-p-font-size: 16px; 143--lh-p-font-weight: 400; 144--lh-p-line-height: 1.8; 145--lh-p-letter-spacing: 0.6px; 146--lh-p-text-transform: inherit; 147--lh-p-font-style: normal; 148--lh-p2-font-family: Assistant; 149--lh-p2-font-size: 13.2px; 150--lh-p2-font-weight: 400; 151--lh-p2-line-height: 1.82; 152--lh-p2-letter-spacing: 0.6px; 153--lh-p2-text-transform: inherit; 154--lh-p2-font-style: normal; 155--lh-p3-font-family: Assistant; 156--lh-p3-font-size: 18px; 157--lh-p3-font-weight: 400; 158--lh-p3-line-height: 1.8; 159--lh-p3-letter-spacing: 0.6px; 160--lh-p3-text-transform: inherit; 161--lh-p3-font-style: normal; 162--lh-btn-font-size: 15px; 163--lh-btn-font-weight: 400; 164--lh-btn-letter-spacing: 1px; 165--lh-btn-text-transform: normal; 166--lh-btn-height: 45px; 167--lh-btn-padding: 30px; 168--lh-btn-border-radius: 0px; 169--lh-btn-transition-hover: 150ms; 170--lh-btn-pr-border-width: 1px; 171--lh-btn-pr-shadow-x: 0px; 172--lh-btn-pr-shadow-y: 0px; 173--lh-btn-pr-shadow-blur: 0px; 174--lh-btn-pr-shadow-transparent: 0%; 175--lh-btn-se-border-width: 1px; 176--lh-btn-se-shadow-x: 0px; 177--lh-btn-se-shadow-y: 0px; 178--lh-btn-se-shadow-blur: 0px; 179--lh-btn-se-shadow-transparent: 0%; 180--lh-btn-te-underline: underline; 181--lh-btn-te-underline-offset: 5px; } 182 @media (min-width: 768px) and (max-width: 1023px) { :root{ --lh-h1-font-size: 44px; 183--lh-h1-line-height: 1.3; 184--lh-h1-letter-spacing: 0.6px; 185--lh-h2-font-size: 34px; 186--lh-h2-line-height: 1.3; 187--lh-h3-font-size: 22px; 188--lh-h3-line-height: 1.3; 189--lh-h5-font-size: 15px; 190--lh-btn-font-size: 15px; 191--lh-btn-height: 45px; 192--lh-btn-padding: 30px; 193--lh-btn-pr-border-width: 1px; 194--lh-btn-se-border-width: 1px; }} 195 @media (max-width: 767px) { :root{ --lh-h1-font-size: 40px; 196--lh-h2-font-size: 30px; 197--lh-h3-font-size: 20px; 198--lh-h4-font-size: 18px; 199--lh-h5-font-size: 15px; 200--lh-btn-font-size: 15px; 201--lh-btn-height: 45px; 202--lh-btn-padding: 30px; 203--lh-btn-pr-border-width: 1px; 204--lh-btn-se-border-width: 1px; }} 205 206 .lh-scheme-1 { 207 --lh-text-color: #5b5b5b; 208 --lh-heading-color: #121212; 209 --lh-background-color: #ffffff; 210 --lh-btn-pr-background-color: #121212; 211 --lh-btn-pr-label-color: #ffffff; 212 --lh-btn-pr-border-color: #121212; 213 --lh-btn-se-background-color: #ececec; 214 --lh-btn-se-label-color: #121212; 215 --lh-btn-se-border-color: #ececec; 216 --lh-btn-te-label-color: #121212; 217 218 --lh-btn-pr-background-hover: color-mix(in srgb, var(--lh-btn-pr-background-color), white 10%); 219 --lh-btn-pr-label-hover: color-mix(in srgb, var(--lh-btn-pr-label-color), black 0%); 220 --lh-btn-pr-border-hover: color-mix(in srgb, var(--lh-btn-pr-border-color), black 0%); 221 222 --lh-btn-se-background-hover: color-mix(in srgb, var(--lh-btn-se-background-color), white 10%); 223 --lh-btn-se-label-hover: color-mix(in srgb, var(--lh-btn-se-label-color), black 0%); 224 --lh-btn-se-border-hover: color-mix(in srgb, var(--lh-btn-se-border-color), black 0%); 225 226 --lh-btn-te-label-hover: color-mix(in srgb, var(--lh-btn-te-label-color), white 25%); 227 228 --color-scheme-text: #5b5b5b; 229 --color-scheme-bg: #ffffff; 230 --color-scheme-text-50: #f2f2f2; 231--color-scheme-text-100: #e6e6e6; 232--color-scheme-text-200: #cccccc; 233--color-scheme-text-300: #b3b3b3; 234--color-scheme-text-400: #999999; 235--color-scheme-text-500: #808080; 236--color-scheme-text-600: #666666; 237--color-scheme-text-700: #4d4d4d; 238--color-scheme-text-800: #333333; 239--color-scheme-text-900: #1a1a1a; 240--color-scheme-text-950: #0d0d0d; 241 } 242 243 .lh-scheme-2 {
244 --lh-text-color: #5b5b5b5; 245 --lh-heading-color: #121212; 246 --lh-background-color: #f5f5f5; 247 --lh-btn-pr-background-color: #121212; 248 --lh-btn-pr-label-color: #ffffff; 249 --lh-btn-pr-border-color: #121212; 250 --lh-btn-se-background-color: #d8d8d8; 251 --lh-btn-se-label-color: #121212; 252 --lh-btn-se-border-color: #d8d8d8; 253 --lh-btn-te-label-color: #121212; 254 255 --lh-btn-pr-background-hover: color-mix(in srgb, var(--lh-btn-pr-background-color), white 10%); 256 --lh-btn-pr-label-hover: color-mix(in srgb, var(--lh-btn-pr-label-color), black 0%); 257 --lh-btn-pr-border-hover: color-mix(in srgb, var(--lh-btn-pr-border-color), black 0%); 258 259 --lh-btn-se-background-hover: color-mix(in srgb, var(--lh-btn-se-background-color), black 10%); 260 --lh-btn-se-label-hover: color-mix(in srgb, var(--lh-btn-se-label-color), black 0%); 261 --lh-btn-se-border-hover: color-mix(in srgb, var(--lh-btn-se-border-color), black 0%); 262 263 --lh-btn-te-label-hover: color-mix(in srgb, var(--lh-btn-te-label-color), white 25%); 264 265 --color-scheme-text: #5b5b5b5; 266 --color-scheme-bg: #f5f5f5; 267 --color-scheme-text-50: #f2f2f2; 268--color-scheme-text-100: #e6e6e6; 269--color-scheme-text-200: #cccccc; 270--color-scheme-text-300: #b3b3b3; 271--color-scheme-text-400: #999999; 272--color-scheme-text-500: #808080; 273--color-scheme-text-600: #666666; 274--color-scheme-text-700: #4d4d4d; 275--color-scheme-text-800: #333333; 276--color-scheme-text-900: #1a1a1a; 277--color-scheme-text-950: #0d0d0d; 278 } 279 280 .lh-scheme-3 { 281 --lh-text-color: #ffffff; 282 --lh-heading-color: #ffffff; 283 --lh-background-color: #121212; 284 --lh-btn-pr-background-color: #ffffff; 285 --lh-btn-pr-label-color: #121212; 286 --lh-btn-pr-border-color: #ffffff; 287 --lh-btn-se-background-color: #ffffff00; 288 --lh-btn-se-label-color: #ffffff; 289 --lh-btn-se-border-color: #ffffff; 290 --lh-btn-te-label-color: #ffffff; 291 292 --lh-btn-pr-background-hover: color-mix(in srgb, var(--lh-btn-pr-background-color), black 10%); 293 --lh-btn-pr-label-hover: color-mix(in srgb, var(--lh-btn-pr-label-color), black 0%); 294 --lh-btn-pr-border-hover: color-mix(in srgb, var(--lh-btn-pr-border-color), black 0%); 295 296 --lh-btn-se-background-hover: color-mix(in srgb, var(--lh-btn-se-background-color), white 100%); 297 --lh-btn-se-label-hover: color-mix(in srgb, var(--lh-btn-se-label-color), black 100%); 298 --lh-btn-se-border-hover: color-mix(in srgb, var(--lh-btn-se-border-color), black 0%); 299 300 --lh-btn-te-label-hover: color-mix(in srgb, var(--lh-btn-te-label-color), black 25%); 301 302 --color-scheme-text: #ffffff; 303 --color-scheme-bg: #121212; 304 --color-scheme-text-50: #f2f2f2; 305--color-scheme-text-100: #e6e6e6; 306--color-scheme-text-200: #cccccc; 307--color-scheme-text-300: #b3b3b3; 308--color-scheme-text-400: #999999; 309--color-scheme-text-500: #808080; 310--color-scheme-text-600: #666666; 311--color-scheme-text-700: #4d4d4d; 312--color-scheme-text-800: #333333; 313--color-scheme-text-900: #1a1a1a; 314--color-scheme-text-950: #0d0d0d; 315 } 316 317 .lh-h1 { 318 font-family: var(--lh-h1-font-family); 319 font-size: var(--lh-h1-font-size); 320 font-weight: var(--lh-h1-font-weight); 321 line-height: var(--lh-h1-line-height); 322 letter-spacing: var(--lh-h1-letter-spacing); 323 text-transform: var(--lh-h1-text-transform); 324 font-style: var(--lh-h1-font-style); 325 color: var(--lh-heading-color); 326 } 327 .lh-h2 { 328 font-family: var(--lh-h2-font-family); 329 font-size: var(--lh-h2-font-size); 330 font-weight: var(--lh-h2-font-weight); 331 line-height: var(--lh-h2-line-height); 332 letter-spacing: var(--lh-h2-letter-spacing); 333 text-transform: var(--lh-h2-text-transform); 334 font-style: var(--lh-h2-font-style); 335 color: var(--lh-heading-color); 336 } 337 .lh-h3 { 338 font-family: var(--lh-h3-font-family); 339 font-size: var(--lh-h3-font-size);
340 font-weight: var(--lh-h3-font-weight); 341 line-height: var(--lh-h3-line-height); 342 letter-spacing: var(--lh-h3-letter-spacing); 343 text-transform: var(--lh-h3-text-transform); 344 font-style: var(--lh-h3-font-style); 345 color: var(--lh-heading-color); 346 } 347 .lh-h4 { 348 font-family: var(--lh-h4-font-family); 349 font-size: var(--lh-h4-font-size); 350 font-weight: var(--lh-h4-font-weight); 351 line-height: var(--lh-h4-line-height); 352 letter-spacing: var(--lh-h4-letter-spacing); 353 text-transform: var(--lh-h4-text-transform); 354 font-style: var(--lh-h4-font-style); 355 color: var(--lh-heading-color); 356 } 357 .lh-h5 { 358 font-family: var(--lh-h5-font-family); 359 font-size: var(--lh-h5-font-size); 360 font-weight: var(--lh-h5-font-weight); 361 line-height: var(--lh-h5-line-height); 362 letter-spacing: var(--lh-h5-letter-spacing); 363 text-transform: var(--lh-h5-text-transform); 364 font-style: var(--lh-h5-font-style); 365 color: var(--lh-heading-color); 366 } 367 .lh-p { 368 font-family: var(--lh-p-font-family); 369 font-size: var(--lh-p-font-size); 370 font-weight: var(--lh-p-font-weight); 371 line-height: var(--lh-p-line-height); 372 letter-spacing: var(--lh-p-letter-spacing); 373 text-transform: var(--lh-p-text-transform); 374 font-style: var(--lh-p-font-style); 375 color: var(--lh-text-color); 376 } 377 .lh-p2 { 378 font-family: var(--lh-p2-font-family); 379 font-size: var(--lh-p2-font-size); 380 font-weight: var(--lh-p2-font-weight); 381 line-height: var(--lh-p2-line-height); 382 letter-spacing: var(--lh-p2-letter-spacing); 383 text-transform: var(--lh-p2-text-transform); 384 font-style: var(--lh-p2-font-style); 385 color: var(--lh-text-color); 386 } 387 .lh-p3 { 388 font-family: var(--lh-p3-font-family); 389 font-size: var(--lh-p3-font-size); 390 font-weight: var(--lh-p3-font-weight); 391 line-height: var(--lh-p3-line-height); 392 letter-spacing: var(--lh-p3-letter-spacing); 393 text-transform: var(--lh-p3-text-transform); 394 font-style: var(--lh-p3-font-style); 395 color: var(--lh-text-color); 396 } 397.lh-btn-pr, .lh-btn-se, .lh-btn-te { 398 display: flex; 399 align-items: center; 400 justify-content:center; 401 font-family: var(--lh-p-font-family); 402 font-size: var(--lh-btn-font-size); 403 font-weight: var(--lh-btn-font-weight); 404 text-transform: var(--lh-btn-text-transform); 405 letter-spacing: var(--lh-btn-letter-spacing); 406 line-height: 1.5; 407 font-style: var(--lh-p-font-style); 408 transition: all ease-in var(--lh-btn-transition-hover, 0ms); 409 } 410.lh-btn-pr { 411 cursor: pointer; 412 color: var(--lh-btn-pr-label-color); 413 414 height: var(--lh-btn-height); 415 padding: 0px var(--lh-btn-padding); 416 border-radius: var(--lh-btn-border-radius); 417 outline: var(--lh-btn-pr-border-width) solid var(--lh-btn-pr-border-color); 418 outline-offset: calc(var(--lh-btn-pr-border-width) * -1); 419 background: var(--lh-btn-pr-background-color); 420 box-shadow: var(--lh-btn-pr-shadow-x) var(--lh-btn-pr-shadow-y) var(--lh-btn-pr-shadow-blur) rgba(0, 0, 0, var(--lh-btn-pr-shadow-transparent)); 421 422 } 423.lh-btn-pr:hover { 424 color: var(--lh-btn-pr-label-hover); 425 426 background: var(--lh-btn-pr-background-hover); 427 border-color: var(--lh-btn-pr-border-hover); 428 429 } 430.lh-btn-se { 431 cursor: pointer; 432 color: var(--lh-btn-se-label-color); 433 434 height: var(--lh-btn-height); 435 padding: 0px var(--lh-btn-padding); 436 border-radius: var(--lh-btn-border-radius); 437 outline: var(--lh-btn-se-border-width) solid var(--lh-btn-se-border-color); 438 outline-offset: calc(var(--lh-btn-se-border-width) * -1); 439 background: var(--lh-btn-se-background-color); 440 box-shadow: var(--lh-btn-se-shadow-x) var(--lh-btn-se-shadow-y) var(--lh-btn-se-shadow-blur) rgba(0, 0, 0, var(--lh-btn-se-shadow-transparent)); 441 442 } 443.lh-btn-se:hover { 444 color: var(--lh-btn-se-label-hover); 445 446 background: var(--lh-btn-se-background-hover); 447 border-color: var(--lh-btn-se-border-hover); 448 449 } 450.lh-btn-te { 451 cursor: pointer; 452 color: var(--lh-btn-te-label-color); 453 454 text-decoration: var(--lh-btn-te-underline); 455 text-underline-offset: var(--lh-btn-te-underline-offset); 456 position: relative; 457 458 } 459.lh-btn-te:hover { 460 color: var(--lh-btn-te-label-hover); 461 462 } 463 .lh-sections, .lh-section { 464 display: block; 465 width: 100%; 466} 467.lh-container { 468 width: 100%; 469 padding-top: var(--lh-container-padding-top, var(--lh-container-padding, 4rem)); 470 padding-bottom: var(--lh-container-padding-bottom, var(--lh-container-padding, 4rem)); 471 padding-right: var(--lh-container-padding, 1rem); 472 padding-left: var(--lh-container-padding, 1rem); 473 max-width: var(--lh-container-width, 1140px); 474 margin-right: auto; 475 margin-left: auto; 476} 477.lh-image-picture { 478 aspect-ratio: var(--lh-image-ratio, auto); 479 display: block; 480 overflow: hidden; 481} 482 483.lh-image-picture img { 484 width: 100%; 485 height: 100%; 486 object-fit: var(--lh-image-fit, cover); 487 object-position: var(--lh-image-position, 50% 50%); 488 vertical-align: middle; 489} 490@media (min-width: 993px) { 491 .lh-image-picture[data-ratio="default"] img { 492 height: auto; 493 } 494} 495@media (min-width: 750px) and (max-width: 992px) { 496 .lh-image-picture { 497 aspect-ratio: var(--lh-image-ratio-ta, var(--lh-image-ratio, auto)); 498 } 499 .lh-image-picture img { 500 object-fit: var(--lh-image-fit-ta, var(--lh-image-fit,cover)); 501 object-position: var(--lh-image-position-ta, var(--lh-image-position,50% 50%)); 502 } 503 .lh-image-picture[data-ratio-ta="default"] img { 504 height: auto; 505 } 506} 507@media (max-width: 749px) { 508 .lh-image-picture { 509 aspect-ratio: var(--lh-image-ratio-mo, var(--lh-image-ratio, auto)); 510 } 511 .lh-image-picture img { 512 object-fit: var(--lh-image-fit-mo, var(--lh-image-fit,cover)); 513 object-position: var(--lh-image-position-mo, var(--lh-image-position,50% 50%)); 514 } 515 .lh-image-picture[data-ratio-mo="default"] img { 516 height: auto; 517 } 518} 519 520 </style> 521 522 523 524 525<!-- END LAYOUTHUB-V2-HEADER --> 526 <!-- Added by AVADA Joy --> 527 528 <!-- /Added by AVADA Joy --> 529 530<!-- Google Tag Manager -->
531<script>
vendor: 327 bytes, lines 531-535
531(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 532new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 533j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 534'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 535})(window,document,'script','dataLayer','
535GTM-KR2TFW7
vendor: 3 bytes, line 535
535');
535</script>
535 536<!-- End Google Tag Manager --><!--Content in content_for_header --> 537<!--LayoutHub-Embed--><meta name="layouthub" /><link rel="stylesheet" href="https://fonts.googleapis.com/css?display=swap&family=Bebas+Neue:100,200,300,400,500,600,700,800,900" /><link rel="stylesheet" type="text/css" href="data:text/css;base64,Ym9keSBpbnB1dCxib2R5IHRleHRhcmVhLGJvZHkgYnV0dG9uLGJvZHkgc2VsZWN0IHtmb250LWZhbWlseTogaW5oZXJpdDt9W2RhdGEtbGF5b3V0aHViPSJzZWN0aW9uIl0sIFtkYXRhLWxheW91dGh1Yj0ic2VjdGlvbiJdICoge3BhZGRpbmc6IDBweDttYXJnaW4tdG9wOiAwcHg7bWFyZ2luLWJvdHRvbTogMHB4O306cm9vdHstLWxoLWZvbnQtc2l6ZTogMTRweCAhaW1wb3J0YW50Oy0tbGgtY29sb3I6ICNmZGRhM2YgIWltcG9ydGFudDstLWxoLWNvbG9yLXJnYjogMjUzLCAyMTgsIDYzICFpbXBvcnRhbnQ7fWJvZHkgc2VjdGlvbltkYXRhLWxheW91dGh1Yj0ic2VjdGlvbiJdIHtjb2xvcjogIzdBN0E3QTtmb250LXNpemU6IDE0cHggIWltcG9ydGFudDt9W2RhdGEtbGF5b3V0aHViPSJzZWN0aW9uIl0gaDEsIFtkYXRhLWxheW91dGh1Yj0ic2VjdGlvbiJdIGgyLCBbZGF0YS1sYXlvdXRodWI9InNlY3Rpb24iXSBoMywgW2RhdGEtbGF5b3V0aHViPSJzZWN0aW9uIl0gaDQsIFtkYXRhLWxheW91dGh1Yj0ic2VjdGlvbiJdIGg1IHtjb2xvcjogIzFBMUExQjt9c2VjdGlvbltkYXRhLWxheW91dGh1Yj0ic2VjdGlvbiJdIGFueXtmb250LWZhbWlseTogJ0JlYmFzIE5ldWUnICFpbXBvcnRhbnR9IGltZy5saC1sYXp5Om5vdChbc3JjXSkge3Zpc2liaWxpdHk6IGhpZGRlbjt9" media="all"> 538<!--LH--><!--/LayoutHub-Embed--><meta charset="utf-8"> 539 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 540 <meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height, minimum-scale=1.0, user-scalable=0"> 541 <meta name="theme-color" content="#fad018"> 542 543 <!-- Network optimisations --> 544<link rel="preconnect" href="//cdn.shopify.com" crossorigin> 545<link rel="preconnect" href="//fonts.shopifycdn.com" crossorigin> 546<link rel="preconnect" href="https://monorail-edge.shopifysvc.com"> 547 548<link rel="preload" as="style" href="//www.roosters.co.uk/cdn/shop/t/3/assets/theme-critical.css?enable_css_minification=1&v=79095844255657536391645973999"><link rel="preload" as="script" href="//www.roosters.co.uk/cdn/shop/t/3/assets/scrollreveal.min.js?v=163720458850474464051645974000"><link rel="preload" href="//www.roosters.co.uk/cdn/fonts/muli/muli_n4.e949947cfff05efcc994b2e2db40359a04fa9a92.woff2" as="font" type="font/woff2" crossorigin> 549<link rel="preload" href="//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.7760ed7a63e536050f64bb0607ff70ce07a480bd.woff2" as="font" type="font/woff2" crossorigin> 550<link rel="preload" href="//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.7760ed7a63e536050f64bb0607ff70ce07a480bd.woff2" as="font" type="font/woff2" crossorigin> 551<link rel="preload" href="//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.7760ed7a63e536050f64bb0607ff70ce07a480bd.woff2" as="font" type="font/woff2" crossorigin> 552<link rel="canonical" href="https://www.roosters.co.uk/search"> 553 <link rel="shortcut icon" href="//www.roosters.co.uk/cdn/shop/files/Rooster_s_Halftone_Circular_Logo_32x32.png?v=1645618431" type="image/png"> 554 555 556 <!-- Title and description ================================================== --><title>Search 557– RoostersBrewingCo</title><meta name="description" content="Originators & Purveyors of Craft Pale Ales & IPAs. An award-winning family-owned (and run) craft brewery founded in Harrogate, North Yorkshire, in 1993. With their Brewery Taproom situated in Hornbeam Park, Harrogate, Rooster's provides a large range of craft ales that define them as a modern classic brewery."><!-- /snippets/social-meta-tags.liquid --> 558 559 560 561 562<meta property="og:site_name" content="RoostersBrewingCo"> 563<meta property="og:url" content="https://www.roosters.co.uk/search"> 564<meta property="og:title" content="Search"> 565<meta property="og:type" content="website"> 566<meta property="og:description" content="Originators & Purveyors of Craft Pale Ales & IPAs. An award-winning family-owned (and run) craft brewery founded in Harrogate, North Yorkshire, in 1993. With their Brewery Taproom situated in Hornbeam Park, Harrogate, Rooster's provides a large range of craft ales that define them as a modern classic brewery."> 567 568<meta property="og:image" content="http://www.roosters.co.uk/cdn/shop/files/Rooster_s_Brew_Co._Logo_Harrogate_bd8721d6-ac06-4925-975d-0e5f54fac30d_1200x1200.png?v=1754661288"> 569<meta property="og:image:secure_url" content="https://www.roosters.co.uk/cdn/shop/files/Rooster_s_Brew_Co._Logo_Harrogate_bd8721d6-ac06-4925-975d-0e5f54fac30d_1200x1200.png?v=1754661288"> 570 571 572 <meta name="twitter:site" content="@RoostersBrewCo"> 573 574<meta name="twitter:card" content="summary_large_image"> 575<meta name="twitter:title" content="Search"> 576<meta name="twitter:description" content="Originators & Purveyors of Craft Pale Ales & IPAs. An award-winning family-owned (and run) craft brewery founded in Harrogate, North Yorkshire, in 1993. With their Brewery Taproom situated in Hornbeam Park, Harrogate, Rooster's provides a large range of craft ales that define them as a modern classic brewery."> 577 578 <!-- JS before CSSOM =================================================== --> 579
579<script type="text/javascript"> 580 theme = {}; 581 theme.t = {}; 582 theme.t.add_to_cart = 'Add to Cart'; 583 theme.t.sold_out = 'Sold Out'; 584 theme.t.unavailable = 'Unavailable'; 585 theme.money_format = '£{{amount}}'; 586 theme.map = {}; 587 theme.map_settings_url="//www.roosters.co.uk/cdn/shop/t/3/assets/map_settings.min.js?v=55973849163231613841645973991"; 588 theme.cart_type = 'notification'; 589 theme.cart_ajax = true; 590 theme.routes = { 591 rootUrl: "/", 592 rootUrlSlash: "/", 593 cartUrl: "/cart", 594 cartAddUrl: "/cart/add", 595 cartChangeUrl: "/cart/change" 596 }; 597 theme.assets = { 598 plyr: "//www.roosters.co.uk/cdn/shop/t/3/assets/plyr.min.js?v=4209607025050129391645974002", 599 masonry: "//www.roosters.co.uk/cdn/shop/t/3/assets/masonry.min.js?v=52946867241060388171645973994", 600 photoswipe: "//www.roosters.co.uk/cdn/shop/t/3/assets/photoswipe.min.js?v=25365026511866153621645973997", 601 fecha: "//www.roosters.co.uk/cdn/shop/t/3/assets/fecha.min.js?v=77892649025288305351645974013" 602 }; 603 </script>
603 604 605 <style id="fontsupporttest">@font-face{font-family:"font";src:url("https://")}</style> 606
606<script type="text/javascript"> 607 function supportsFontFace() { 608 function blacklist() { 609 var match = /(WebKit|windows phone.+trident)\/(\d+)/i.exec(navigator.userAgent); 610 return match && parseInt(match[2], 10) < (match[1] == 'WebKit' ? 533 : 6); 611 } 612 function hasFontFaceSrc() { 613 var style = document.getElementById('fontsupporttest'); 614 var sheet = style.sheet || style.styleSheet; 615 var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; 616 return /src/i.test(cssText); 617 } 618 return !blacklist() && hasFontFaceSrc(); 619 } 620 document.documentElement.classList.replace('no-js', 'js'); 621 if (window.matchMedia("(pointer: coarse)").matches) {document.documentElement.classList.add('touchevents')} else {document.documentElement.classList.add('no-touchevents')} 622 if (supportsFontFace()) {document.documentElement.classList.add('fontface')} 623 </script>
623 624
624<script src="//www.roosters.co.uk/cdn/shop/t/3/assets/jquery.min.js?v=115860211936397945481645974003" defer="defer"></script>
624 625
625<script src="//www.roosters.co.uk/cdn/shop/t/3/assets/vendor.min.js?v=91934266268907694051645974014" defer="defer"></script>
625 626
626<script src="//www.roosters.co.uk/cdn/shop/t/3/assets/ajax-cart.js?v=51580153416589594931645974022" defer="defer"></script>
626 627 628 <!-- CSS ================================================== --> 629 630<style data-shopify> 631 632 633 634 635 636:root { 637 --color--brand: #fad018; 638 --color--brand-dark: #f3c705; 639 --color--brand-light: #fbd531; 640 641 --color--accent: #f0f0f0; 642 --color--accent-dark: #e3e3e3; 643 644 --color--link: #fdeeae; 645 --color--link-dark: #766103; 646 647 --color--text: #212121; 648 --color--text-light: rgba(33, 33, 33, 0.7); 649 --color--text-lighter: rgba(33, 33, 33, 0.5); 650 --color--text-lightest: rgba(33, 33, 33, 0.2); 651 --color--text-bg: rgba(33, 33, 33, 0.1); 652 653 --color--text-bg: rgba(33, 33, 33, 0.1); 654 655 --color--headings: #212121; 656 --color--alt-text: #666666; 657 --color--btn: #111111; 658 659 --color--product-bg: rgba(0,0,0,0); 660 --color--product-sale: #c00000; 661 662 --color--drawer-bg: #f0f0f0; 663 664 --color--bg: #FFFFFF; 665 --color--bg-alpha: rgba(255, 255, 255, 0.8); 666 --color--bg-light: #ffffff; 667 --color--bg-dark: #f2f2f2; 668 669 --font--size-base: 15; 670 --font--line-base: 30; 671 672 --font--size-h1: 34; 673 --font--size-h2: 26; 674 --font--size-h3: 20; 675 --font--size-h4: 19; 676 --font--size-h5: 16; 677 --font--size-h6: 15; 678 679 --font--body: Muli, sans-serif; 680 --font--body-style: normal; 681 --font--body-weight: 400; 682 683 --font--title: Oswald, sans-serif; 684 --font--title-weight: 400; 685 --font--title-style: normal; 686 --font--title-space: 1px; 687 --font--title-transform: uppercase; 688 --font--title-border: 1; 689 --font--title-border-size: 3px; 690 691 --font--nav: Oswald, sans-serif; 692 --font--nav-weight: 400; 693 --font--nav-style: normal; 694 --font--nav-space: 1px; 695 --font--nav-transform: uppercase; 696 --font--nav-size: 16px; 697 698 --font--button: Oswald, sans-serif; 699 --font--button-weight: 400; 700 --font--button-style: normal; 701 --font--button-space: 1px; 702 --font--button-transform: uppercase; 703 --font--button-size: 13px; 704 --font--button-mobile-size: 12px; 705 706 --font--icon-url: //www.roosters.co.uk/cdn/shop/t/3/assets/sb-icons.eot?v=69961381625854386191645973994; 707} 708</style> 709 <style>@font-face { 710 font-family: Muli; 711 font-weight: 400; 712 font-style: normal; 713 font-display: swap; 714 src: url("//www.roosters.co.uk/cdn/fonts/muli/muli_n4.e949947cfff05efcc994b2e2db40359a04fa9a92.woff2") format("woff2"), 715 url("//www.roosters.co.uk/cdn/fonts/muli/muli_n4.35355e4a0c27c9bc94d9af3f9bcb586d8229277a.woff") format("woff"); 716} 717 718@font-face { 719 font-family: Oswald; 720 font-weight: 400; 721 font-style: normal; 722 font-display: swap; 723 src: url("//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.7760ed7a63e536050f64bb0607ff70ce07a480bd.woff2") format("woff2"), 724 url("//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.ae5e497f60fc686568afe76e9ff1872693c533e9.woff") format("woff"); 725} 726 727@font-face { 728 font-family: Oswald; 729 font-weight: 400; 730 font-style: normal; 731 font-display: swap; 732 src: url("//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.7760ed7a63e536050f64bb0607ff70ce07a480bd.woff2") format("woff2"), 733 url("//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.ae5e497f60fc686568afe76e9ff1872693c533e9.woff") format("woff"); 734} 735 736@font-face { 737 font-family: Oswald; 738 font-weight: 400; 739 font-style: normal; 740 font-display: swap; 741 src: url("//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.7760ed7a63e536050f64bb0607ff70ce07a480bd.woff2") format("woff2"), 742 url("//www.roosters.co.uk/cdn/fonts/oswald/oswald_n4.ae5e497f60fc686568afe76e9ff1872693c533e9.woff") format("woff"); 743} 744 745@font-face { 746 font-family: Muli; 747 font-weight: 700; 748 font-style: normal; 749 font-display: swap; 750 src: url("//www.roosters.co.uk/cdn/fonts/muli/muli_n7.c8c44d0404947d89610714223e630c4cbe005587.woff2") format("woff2"), 751 url("//www.roosters.co.uk/cdn/fonts/muli/muli_n7.4cbcffea6175d46b4d67e9408244a5b38c2ac568.woff") format("woff"); 752} 753 754@font-face { 755 font-family: Muli; 756 font-weight: 400; 757 font-style: italic; 758 font-display: swap; 759 src: url("//www.roosters.co.uk/cdn/fonts/muli/muli_i4.c0a1ea800bab5884ab82e4eb25a6bd25121bd08c.woff2") format("woff2"), 760 url("//www.roosters.co.uk/cdn/fonts/muli/muli_i4.a6c39b1b31d876de7f99b3646461aa87120de6ed.woff") format("woff"); 761} 762 763@font-face { 764 font-family: Muli; 765 font-weight: 700; 766 font-style: italic; 767 font-display: swap; 768 src: url("//www.roosters.co.uk/cdn/fonts/muli/muli_i7.34eedbf231efa20bd065d55f6f71485730632c7b.woff2") format("woff2"), 769 url("//www.roosters.co.uk/cdn/fonts/muli/muli_i7.2b4df846821493e68344d0b0212997d071bf38b7.woff") format("woff"); 770} 771 772</style> 773 774<link rel="stylesheet" href="//www.roosters.co.uk/cdn/shop/t/3/assets/theme-critical.css?enable_css_minification=1&v=79095844255657536391645973999"> 775 776<link rel="preload" href="//www.roosters.co.uk/cdn/shop/t/3/assets/theme.css?enable_css_minification=1&v=123199139011178213691647340174" as="style" onload="this.onload=null;this.rel='stylesheet'"> 777<noscript><link rel="stylesheet" href="//www.roosters.co.uk/cdn/shop/t/3/assets/theme.css?enable_css_minification=1&v=123199139011178213691647340174"></noscript>
778<script> 779 /*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */ 780 (function(w){"use strict";if(!w.loadCSS){w.loadCSS=function(){}}var rp=loadCSS.relpreload={};rp.support=(function(){var ret;try{ret=w.document.createElement("link").relList.supports("preload")}catch(e){ret=false}return function(){return ret}})();rp.bindMediaToggle=function(link){var finalMedia=link.media||"all";function enableStylesheet(){if(link.addEventListener){link.removeEventListener("load",enableStylesheet)}else if(link.attachEvent){link.detachEvent("onload",enableStylesheet)}link.setAttribute("onload",null);link.media=finalMedia}if(link.addEventListener){link.addEventListener("load",enableStylesheet)}else if(link.attachEvent){link.attachEvent("onload",enableStylesheet)}setTimeout(function(){link.rel="stylesheet";link.media="only x"});setTimeout(enableStylesheet,3000)};rp.poly=function(){if(rp.support()){return}var links=w.document.getElementsByTagName("link");for(var i=0;i<links.length;i+=1){var link=links[i];if(link.rel==="preload"&&link.getAttribute("as")==="style"&&!link.getAttribute("data-loadcss")){link.setAttribute("data-loadcss",true);rp.bindMediaToggle(link)}}};if(!rp.support()){rp.poly();var run=w.setInterval(rp.poly,500);if(w.addEventListener){w.addEventListener("load",function(){rp.poly();w.clearInterval(run)})}else if(w.attachEvent){w.attachEvent("onload",function(){rp.poly();w.clearInterval(run)})}}if(typeof exports!=="undefined"){exports.loadCSS=loadCSS}else{w.loadCSS=loadCSS}}(typeof global!=="undefined"?global:this)); 781</script>
781 782 783 <!-- JS after CSSOM=================================================== --> 784
784<script src="//www.roosters.co.uk/cdn/shop/t/3/assets/theme.js?v=55846675196246547061671208561" defer="defer"></script>
784 785
785<script src="//www.roosters.co.uk/cdn/shop/t/3/assets/custom.js?v=152733329445290166911645974001" defer="defer"></script>
785 786 787 788 789 790
790<script src="//www.roosters.co.uk/cdn/shop/t/3/assets/scrollreveal.min.js?v=163720458850474464051645974000"></script>
790 791 792 793 794 <!-- Header hook for plugins ================================================== --> 795
795<script>window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.start');</script>
795<meta name="google-site-verification" content="JZuDaOQRhiPVrKDo1sbAfTVNgA-Bflxr0d0UnW58sT4"> 796<meta name="facebook-domain-verification" content="t1c0pkhxew7rv56lzznu9qzkc1y4un"> 797<meta id="shopify-digital-wallet" name="shopify-digital-wallet" content="/62856757501/digital_wallets/dialog"> 798<link rel="ucp" href="/.well-known/ucp" version="2026-08-25">
798<script async="async" src="/checkouts/internal/preloads.js?locale=en-GB"></script>
798 799<link rel="preconnect" href="https://shop.app" crossorigin="anonymous">
800<script async="async" src="https://shop.app/checkouts/internal/preloads.js?locale=en-GB&shop_id=62856757501" crossorigin="anonymous"></script>
vendor: 1 bytes, line 800
800
801<script id="apple-pay-shop-capabilities" type="application/json">{"shopId":62856757501,"countryCode":"GB","currencyCode":"GBP","merchantCapabilities":["supports3DS"],"merchantId":"gid:\/\/shopify\/Shop\/62856757501","merchantName":"RoostersBrewingCo","requiredBillingContactFields":["postalAddress","email"],"requiredShippingContactFields":["postalAddress","email"],"shippingType":"shipping","supportedNetworks":["visa","maestro","masterCard","amex"],"total":{"type":"pending","label":"RoostersBrewingCo","amount":"1.00"},"shopifyPaymentsEnabled":true,"supportsSubscriptions":true}</script>
vendor: 1 bytes, line 801
801
802<script id="shopify-features" type="application/json">{"accessToken":"5b357be0c5d958dfa1048488bdc31c36","betas":["rich-media-storefront-analytics"],"domain":"www.roosters.co.uk","predictiveSearch":true,"shopId":62856757501,"locale":"en"}</script>
vendor: 1 bytes, line 802
802
803<script>var Shopify = Shopify || {}; 804Shopify.shop = "roostersbrewingco.myshopify.com"; 805Shopify.locale = "en"; 806Shopify.currency = {"active":"GBP","rate":"1.0"}; 807Shopify.country = "GB"; 808Shopify.theme = {"name":"Venue","id":131089924349,"schema_name":"Venue","schema_version":"6.0.1","theme_store_id":836,"role":"main"}; 809Shopify.theme.handle = "null"; 810Shopify.theme.style = {"id":null,"handle":null}; 811Shopify.cdnHost = "www.roosters.co.uk/cdn"; 812Shopify.routes = Shopify.routes || {}; 813Shopify.routes.root = "/"; 814Shopify.shopJsCdnBaseUrl = "https://cdn.shopify.com/shopifycloud/shop-js"; 815Shopify.SignInWithShop = Shopify.SignInWithShop || {}; 816Shopify.SignInWithShop.User = Shopify.SignInWithShop.User || {}; 817Shopify.SignInWithShop.User.recognized = false;</script>
vendor: 1 bytes, line 817
817
818<script type="module">!function(o){(o.Shopify=o.Shopify||{}).modules=!0}(window);</script>
vendor: 1 bytes, line 818
818
819<script>!function(o){function n(){var o=[];function n(){o.push(Array.prototype.slice.apply(arguments))}return n.q=o,n}var t=o.Shopify=o.Shopify||{};t.loadFeatures=n(),t.autoloadFeatures=n()}(window);</script>
vendor: 1 bytes, line 819
819
820<script> 821 window.ShopifyPay = window.ShopifyPay || {}; 822 window.ShopifyPay.apiHost = "shop.app\/pay"; 823 window.ShopifyPay.redirectState = null; 824</script>
vendor: 1 bytes, line 824
824
825<script> 826 window.Shopify = window.Shopify || {}; 827 window.Shopify.SignInWithShop = window.Shopify.SignInWithShop || {}; 828 window.Shopify.SignInWithShop.assetMetrics = { sampleRate: 0.25 }; 829 window.Shopify.SignInWithShop.eligible = true; 830</script>
vendor: 1 bytes, line 830
830
831<script id="shop-js-analytics" type="application/json">{"pageType":"search"}</script>
vendor: 1 bytes, line 831
831
832<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"></script>
vendor: 1 bytes, line 832
832
833<script type="module"> 834 await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"); 835 836 window.Shopify.SignInWithShop?.initShopCartSync?.({"fedCMEnabled":true,"windoidEnabled":true}); 837 838</script>
vendor: 1 bytes, line 838
838
839<script> 840 window.Shopify = window.Shopify || {}; 841 if (!window.Shopify.featureAssets) window.Shopify.featureAssets = {}; 842 window.Shopify.featureAssets['shop-js'] = {"avatar":["modules/v2/loader.avatar.en.esm.js"],"checkout-modal":["modules/v2/loader.checkout-modal.en.esm.js"],"init-customer-accounts-sign-up":["modules/v2/loader.init-customer-accounts-sign-up.en.esm.js"],"init-customer-accounts":["modules/v2/loader.init-customer-accounts.en.esm.js"],"init-fed-cm":["modules/v2/loader.init-fed-cm.en.esm.js"],"init-shop-cart-sync":["modules/v2/loader.init-shop-cart-sync.en.esm.js"],"init-shop-email-lookup-coordinator":["modules/v2/loader.init-shop-email-lookup-coordinator.en.esm.js"],"init-shop-for-new-customer-accounts":["modules/v2/loader.init-shop-for-new-customer-accounts.en.esm.js"],"init-shop-user-recognition":["modules/v2/loader.init-shop-user-recognition.en.esm.js"],"init-windoid":["modules/v2/loader.init-windoid.en.esm.js"],"lead-capture":["modules/v2/loader.lead-capture.en.esm.js"],"listener":["modules/v2/loader.listener.en.esm.js"],"pay-button":["modules/v2/loader.pay-button.en.esm.js"],"payment-terms":["modules/v2/loader.payment-terms.en.esm.js"],"shop-button":["modules/v2/loader.shop-button.en.esm.js"],"shop-cart-sync":["modules/v2/loader.shop-cart-sync.en.esm.js"],"shop-cash-offers":["modules/v2/loader.shop-cash-offers.en.esm.js"],"shop-follow-button":["modules/v2/loader.shop-follow-button.en.esm.js"],"shop-login-button":["modules/v2/loader.shop-login-button.en.esm.js"],"shop-login":["modules/v2/loader.shop-login.en.esm.js"],"shop-toast-manager":["modules/v2/loader.shop-toast-manager.en.esm.js"],"shop-user-recognition":["modules/v2/loader.shop-user-recognition.en.esm.js"]}; 843</script>
vendor: 1 bytes, line 843
843
844<script>(function() { 845 var isLoaded = false; 846 function asyncLoad() { 847 if (isLoaded) return; 848 isLoaded = true; 849 var urls = ["https:\/\/cookie-bar.conversionbear.com\/script?app=cookie_consent\u0026shop=roostersbrewingco.myshopify.com","https:\/\/app.dinosell.com\/assets\/dinosell.min.js?shop=roostersbrewingco.myshopify.com","\/\/cdn.shopify.com\/proxy\/cc49a8a9e93aca74be17ce23d1665c214ef3fb6ecdfe9945fd2d73d4b4cd5b78\/dev.giftkart.app\/scripts.js?shop=roostersbrewingco.myshopify.com\u0026sp-cache-control=cHVibGljLCBtYXgtYWdlPTkwMA","https:\/\/chimpstatic.com\/mcjs-connected\/js\/users\/4c15160fdb5251dd0327b4120\/d520e7b5d81eb43a92892234b.js?shop=roostersbrewingco.myshopify.com","https:\/\/cdn-app.sealsubscriptions.com\/shopify\/public\/js\/sealsubscriptions.js?shop=roostersbrewingco.myshopify.com","https:\/\/evey-files.s3.amazonaws.com\/js\/online_store.js?shop=roostersbrewingco.myshopify.com"]; 850 for (var i = 0; i < urls.length; i++) { 851 var s = document.createElement('script'); 852 s.type = 'text/javascript'; 853 s.async = true; 854 s.src = urls[i]; 855 var x = document.getElementsByTagName('script')[0]; 856 x.parentNode.insertBefore(s, x); 857 } 858 }; 859 if(window.attachEvent) { 860 window.attachEvent('onload', asyncLoad); 861 } else { 862 window.addEventListener('load', asyncLoad, false); 863 } 864})();</script>
vendor: 1 bytes, line 864
864
865<script id="__st">var __st={"a":62856757501,"offset":3600,"reqid":"011d48bb-1a60-4088-a7aa-55c8982b1782-1790945085","pageurl":"www.roosters.co.uk\/search","u":"dc50ca2d01cc","p":"searchresults"};</script>
vendor: 1 bytes, line 865
865
866<script>window.ShopifyPaypalV4VisibilityTracking = true;</script>
vendor: 1 bytes, line 866
866
867<script id="captcha-bootstrap">!function(){'use strict';const t='contact',e='account',n='new_comment',o=[[t,t],['blogs',n],['comments',n],[t,'customer']],c=[[e,'customer_login'],[e,'guest_login'],[e,'recover_customer_password'],[e,'create_customer']],r=t=>t.map((([t,e])=>`form[action*='/${t}']:not([data-nocaptcha='true']) input[name='form_type'][value='${e}']`)).join(','),a=t=>()=>t?[...document.querySelectorAll(t)].map((t=>t.form)):[];function s(){const t=[...o],e=r(t);return a(e)}const i='password',u='form_key',d=['recaptcha-v3-token','g-recaptcha-response','h-captcha-response',i],f=()=>{try{return window.sessionStorage}catch{return}},m='__shopify_v',_=t=>t.elements[u];function p(t,e,n=!1){try{const o=window.sessionStorage,c=JSON.parse(o.getItem(e)),{data:r}=function(t){const{data:e,action:n}=t;return t[m]||n?{data:e,action:n}:{data:t,action:n}}(c);for(const[e,n]of Object.entries(r))t.elements[e]&&(t.elements[e].value=n);n&&o.removeItem(e)}catch(o){console.error('form repopulation failed',{error:o})}}const l='form_type',E='cptcha';function T(t){t.dataset[E]=!0}const w=window,h=w.document,L='Shopify',v='ce_forms',y='captcha';let A=!1;((t,e)=>{const n=(g='f06e6c50-85a8-45c8-87d0-21a2b65856fe',I='https://cdn.shopify.com/shopifycloud/storefront-forms-hcaptcha/ce_storefront_forms_captcha_hcaptcha.v1.5.3.iife.js',D={infoText:'Protected by hCaptcha',privacyText:'Privacy',termsText:'Terms'},(t,e,n)=>{const o=w[L][v],c=o.bindForm;if(c)return c(t,g,e,D).then(n);var r;o.q.push([[t,g,e,D],n]),r=I,A||(h.body.append(Object.assign(h.createElement('script'),{id:'captcha-provider',async:!0,src:r})),A=!0)});var g,I,D;w[L]=w[L]||{},w[L][v]=w[L][v]||{},w[L][v].q=[],w[L][y]=w[L][y]||{},w[L][y].protect=function(t,e){n(t,void 0,e),T(t)},Object.freeze(w[L][y]),function(t,e,n,w,h,L){const[v,y,A,g]=function(t,e,n){const i=e?o:[],u=t?c:[],d=[...i,...u],f=r(d),m=r(i),_=r(d.filter((([t,e])=>n.includes(e))));return[a(f),a(m),a(_),s()]}(w,h,L),I=t=>{const e=t.target;return e instanceof HTMLFormElement?e:e&&e.form},D=t=>v().includes(t);t.addEventListener('submit',(t=>{const e=I(t);if(!e)return;const n=D(e)&&!e.dataset.hcaptchaBound&&!e.dataset.recaptchaBound,o=_(e),c=g().includes(e)&&(!o||!o.value);(n||c)&&t.preventDefault(),c&&!n&&(function(t){try{if(!f())return;!function(t){const e=f();if(!e)return;const n=_(t);if(!n)return;const o=n.value;o&&e.removeItem(o)}(t);const e=Array.from(Array(32),(()=>Math.random().toString(36)[2])).join('');!function(t,e){_(t)||t.append(Object.assign(document.createElement('input'),{type:'hidden',name:u})),t.elements[u].value=e}(t,e),function(t,e){const n=f();if(!n)return;const o=[...t.querySelectorAll(`input[type='${i}']`)].map((({name:t})=>t)),c=[...d,...o],r={};for(const[a,s]of new FormData(t).entries())c.includes(a)||(r[a]=s);n.setItem(e,JSON.stringify({[m]:1,action:t.action,data:r}))}(t,e)}catch(e){console.error('failed to persist form',e)}}(e),e.submit())}));const S=(t,e)=>{t&&!t.dataset[E]&&(n(t,e.some((e=>e===t))),T(t))};for(const o of['focusin','change'])t.addEventListener(o,(t=>{const e=I(t);D(e)&&S(e,y())}));const B=e.get('form_key'),M=e.get(l),P=B&&M;t.addEventListener('DOMContentLoaded',(()=>{const t=y();if(P)for(const e of t)e.elements[l].value===M&&p(e,B);[...new Set([...A(),...v().filter((t=>'true'===t.dataset.shopifyCaptcha))])].forEach((e=>S(e,t)))}))}(h,new URLSearchParams(w.location.search),n,t,e,['guest_login'])})(!0,!0)}();</script>
vendor: 1 bytes, line 867
867
868<script integrity="sha256-JjoPp5ZfB1sSAs5SQaol1x1GgvveM+BgmRzyDexInEQ=" data-source-attribution="shopify.loadfeatures" defer="defer" src="//www.roosters.co.uk/cdn/shopifycloud/storefront/assets/storefront/load_feature-1bd60354.js" crossorigin="anonymous"></script>
vendor: 1 bytes, line 868
868
869<script>(function () {var userAgent = navigator.userAgent;var platform = navigator.platform;var maxTouchPoints = navigator.maxTouchPoints || 0;var isIOS = /iPad|iPhone|iPod/.test(platform) || (platform === 'MacIntel' && maxTouchPoints > 1);var isMacSafari = platform.indexOf('Mac') === 0 && /Safari/.test(userAgent) && !/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Android/.test(userAgent);var isAppleSafari = isIOS || isMacSafari;if (isAppleSafari) {fetch('/sf_private_access_tokens' + location.search).catch(function () {});}function browserMajorVersion(pattern) {var match = userAgent.match(pattern);return match ? parseInt(match[1], 10) : null;}function shouldLoadAutosizesPolyfill() {if (!window.PerformanceObserver?.supportedEntryTypes?.includes('paint')) {return false;}var chromeVersion = browserMajorVersion(/Chrome\/(\d+)/);if (chromeVersion !== null) {return chromeVersion < 126;}var firefoxVersion = browserMajorVersion(/Firefox\/(\d+)/);if (firefoxVersion !== null) {return firefoxVersion < 150;}var safariVersion = isAppleSafari ? browserMajorVersion(/Version\/(\d+).*Safari\//) : null;if (safariVersion !== null) {return safariVersion < 27;}return true;}if (shouldLoadAutosizesPolyfill()) {var autosizesScript = document.createElement('script');autosizesScript.async = true;autosizesScript.crossOrigin = 'anonymous';autosizesScript.src = "//www.roosters.co.uk/cdn/shopifycloud/storefront/assets/storefront/autosizes-84416378.js";(document.head || document.documentElement).appendChild(autosizesScript);}window.ShopifyAnalytics = window.ShopifyAnalytics || {};window.ShopifyAnalytics.performance = window.ShopifyAnalytics.performance || {};(function () {var LONG_FRAME_THRESHOLD = 50;var longAnimationFrames = [];var activeRafId = null;function collectLongFrames() {var previousTime = null;function rafMonitor(now) {if (activeRafId === null) {return;}var delta = now - previousTime;if (delta > LONG_FRAME_THRESHOLD) {longAnimationFrames.push({startTime: previousTime,endTime: now,});}previousTime = now;activeRafId = requestAnimationFrame(rafMonitor);}previousTime = performance.now();activeRafId = requestAnimationFrame(rafMonitor);}if (!window.PerformanceObserver?.supportedEntryTypes?.includes('long-animation-frame')) {collectLongFrames();var timeoutId = setTimeout(function () {cancelAnimationFrame(activeRafId);}, 10000);window.ShopifyAnalytics.performance.getLongAnimationFrames = function (stopCollection) {if (stopCollection === undefined) {stopCollection = false;}if (stopCollection) {clearTimeout(timeoutId);cancelAnimationFrame(activeRafId);}return longAnimationFrames;};}})();})();</script>
869<script crossorigin="anonymous" defer="defer" src="//www.roosters.co.uk/cdn/shopifycloud/storefront/assets/shopify_pay/storefront-616277c7.js?v=20250812"></script>
vendor: 1 bytes, line 869
869
870<script id="shopify-origin-trials" async="async" integrity="sha256-qJbe/jEZBHtr5W/BlA2cKAz3vkXu6vJQyLjgvgCC86g=" src="//cdn.shopify.com/shopifycloud/storefront/assets/storefront/origin_trials-318ab40a.js" crossorigin="anonymous" onload="window.__shopifyOriginTrialsDone = true" onerror="window.__shopifyOriginTrialsDone = true"></script>
vendor: 1 bytes, line 870
870
871<script> 872 window.Shopify = window.Shopify || {}; 873 window.Shopify.MCP = window.Shopify.MCP || {}; 874 window.Shopify.MCP.enabled = true; 875 window.Shopify.MCP.shop = "roostersbrewingco.myshopify.com"; 876 window.Shopify.MCP.mcpEndpoint = "https:\/\/www.roosters.co.uk\/api\/mcp"; 877 window.Shopify.MCP.tools = [{"name":"search_shop_policies_and_faqs","description":"Used to get facts about the stores policies, products, or services.\nSome examples of questions you can ask are:\n - What is your return policy?\n - What is your shipping policy?\n - What is your phone number?\n - What are your hours of operation?\"\n","inputSchema":{"$schema":"https:\/\/json-schema.org\/draft\/2020-12\/schema","type":"object","properties":{"query":{"type":"string","description":"A natural language query."},"context":{"type":"string","description":"Additional information about the request such as user demographics, mood, location, or other relevant details that could help in tailoring the response appropriately."}},"required":["query"]}}]; 878</script>
vendor: 1 bytes, line 878
878
879<script>(()=>{var d="shopify:webmcp_adapter_loaded",n=Symbol.for("shopify.webmcp_adapter_loading");function s(c,a,{win:r=window,doc:o=document}={}){function p(){try{return r.localStorage.getItem(d)==="true"}catch{return!1}}function l(){try{r.localStorage.setItem(d,"true")}catch{}}function u(){return typeof(o.modelContext||r.navigator?.modelContext)?.registerTool=="function"}function f(){if(r[n]||!u())return;let t=o.head||o.getElementsByTagName("head")[0];if(!t)return;let e=o.createElement("script");e.type="module",e.crossOrigin="anonymous",a&&(e.integrity=a),e.src=c,e.addEventListener("load",l,{once:!0}),e.addEventListener("error",()=>{r[n]=!1},{once:!0}),t.appendChild(e),r[n]=!0}function _(t){let e=o.getElementById("shopify-origin-trials");if(!e||r.__shopifyOriginTrialsDone){t();return}e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})}function i(){_(()=>r.setTimeout(f,0))}function m(){o.addEventListener("DOMContentLoaded",i,{once:!0})}p()?i():m()}s("\/\/www.roosters.co.uk\/cdn\/shopifycloud\/storefront\/assets\/storefront\/webmcp-c6b62ece.js","sha256-ke4DDuBjdvea3vxLWxHc9E9nq8zihuG4IfYEGbb77ys=");})(); 880</script>
vendor: 1 bytes, line 880
880
881<script data-source-attribution="shopify.dynamic_checkout.dynamic.init">var Shopify=Shopify||{};Shopify.PaymentButton=Shopify.PaymentButton||{isStorefrontPortableWallets:!0,init:function(){window.Shopify.PaymentButton.init=function(){};var t=document.createElement("script");t.src="https://www.roosters.co.uk/cdn/shopifycloud/portable-wallets/latest/portable-wallets.en.js",t.type="module",document.head.appendChild(t)}}; 882</script>
vendor: 1 bytes, line 882
882
883<script data-source-attribution="shopify.dynamic_checkout.buyer_consent"> 884 function portableWalletsHideBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.add("hidden"),t.setAttribute("aria-hidden","true"),n.removeEventListener("click",e))}function portableWalletsShowBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.remove("hidden"),t.removeAttribute("aria-hidden"),n.addEventListener("click",e))}window.Shopify?.PaymentButton&&(window.Shopify.PaymentButton.hideBuyerConsent=portableWalletsHideBuyerConsent,window.Shopify.PaymentButton.showBuyerConsent=portableWalletsShowBuyerConsent); 885</script>
vendor: 1 bytes, line 885
885
886<script data-source-attribution="shopify.dynamic_checkout.cart.bootstrap">document.addEventListener("DOMContentLoaded",(function(){function t(){return document.querySelector("shopify-accelerated-checkout-cart, shopify-accelerated-checkout")}if(t())Shopify.PaymentButton.init();else{new MutationObserver((function(e,n){t()&&(Shopify.PaymentButton.init(),n.disconnect())})).observe(document.body,{childList:!0,subtree:!0})}})); 887</script>
vendor: 1 bytes, line 887
887
888<script id='scb4127' type='text/javascript' async='' src='https://www.roosters.co.uk/cdn/shopifycloud/privacy-banner/storefront-banner.js'></script>
888<link id="shopify-accelerated-checkout-styles" rel="stylesheet" media="screen" href="https://www.roosters.co.uk/cdn/shopifycloud/portable-wallets/latest/accelerated-checkout-backwards-compat.css" crossorigin="anonymous"> 889<style id="shopify-accelerated-checkout-cart"> 890 #shopify-buyer-consent { 891 margin-top: 1em; 892 display: inline-block; 893 width: 100%; 894} 895 896#shopify-buyer-consent.hidden { 897 display: none; 898} 899 900#shopify-subscription-policy-button { 901 background: none; 902 border: none; 903 padding: 0; 904 text-decoration: underline; 905 font-size: inherit; 906 cursor: pointer; 907} 908 909#shopify-subscription-policy-button::before { 910 box-shadow: none; 911} 912 913 </style> 914
915<script id="shopify-cfh-end">window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.end');</script>
915 916 917
917<script defer> 918 919 /** 920 * IMPORTANT! 921 * Do not edit this file. Any changes made could be overwritten by at 922 * any time. If you need assistance, please reach out to us at [email protected]. 923 */ 924 925 if (typeof(GIST) == 'undefined') { 926 window.GIST = GIST = {}; 927 } 928 if (typeof(GIST.f) == 'undefined') { 929 GIST.f = {}; 930 } 931 932 GIST.f._isEmpty = function(obj){ 933 934 for(var prop in obj) { 935 if(obj.hasOwnProperty(prop)) { 936 return false; 937 } 938 } 939 940 return JSON.stringify(obj) === JSON.stringify({}); 941 942 }; 943 944</script>
944 945 946 947<!-- BEGIN app block: shopify://apps/1clickpopup/blocks/main/233742b9-16cb-4f75-9de7-3fe92c29fdff -->
947<script> 948 window.OneClickPopup = {} 949 950</script>
vendor: 1 bytes, line 950
950
951<script src="https://cdn.shopify.com/extensions/01a0f7b0-b20c-7344-ab0e-2c29adadacc2/1click-popup-72/assets/1click-popup-snippet.js" async></script>
951 952 953 954<!-- END app block -->
954<script src="https://cdn.shopify.com/extensions/01a0c6ef-041f-7b02-8ffe-578eeba3d440/v1.1.6/assets/popup.js" type="text/javascript" defer="defer"></script>
vendor: 1 bytes, line 954
954
955<script src="https://cdn.shopify.com/extensions/01a0fb59-7c79-73cb-bfd4-c02b60359c25/joy-loyalty-program-646/assets/avada-joy.js" type="text/javascript" defer="defer"></script>
955 956<link href="https://monorail-edge.shopifysvc.com" rel="dns-prefetch">
957<script>(function(){if ("sendBeacon" in navigator && "performance" in window) {try {var session_token_from_headers = performance.getEntriesByType('navigation')[0].serverTiming.find(x => x.name == '_s').description;} catch {var session_token_from_headers = undefined;}var session_cookie_matches = document.cookie.match(/_shopify_s=([^;]*)/);var session_token_from_cookie = session_cookie_matches && session_cookie_matches.length === 2 ? session_cookie_matches[1] : "";var session_token = session_token_from_headers || session_token_from_cookie || "";function handle_abandonment_event(e) {var entries = performance.getEntries().filter(function(entry) {return /monorail-edge.shopifysvc.com/.test(entry.name);});if (!window.abandonment_tracked && entries.length === 0) {window.abandonment_tracked = true;var currentMs = Date.now();var navigation_start = performance.timing.navigationStart;var payload = {shop_id: 62856757501,url: window.location.href,navigation_start,duration: currentMs - navigation_start,session_token,page_type: "search"};window.navigator.sendBeacon("https://monorail-edge.shopifysvc.com/v1/produce", JSON.stringify({schema_id: "online_store_buyer_site_abandonment/1.1",payload: payload,metadata: {event_created_at_ms: currentMs,event_sent_at_ms: currentMs}}));}}window.addEventListener('pagehide', handle_abandonment_event);}}());</script>
vendor: 1 bytes, line 957
957
958<script> 959 window.__TREKKIE_SHIM_QUEUE = window.__TREKKIE_SHIM_QUEUE || []; 960</script>
vendor: 1 bytes, line 960
960
961<script>(function(){var wpmLoader=function(){"use strict";var e=/Googlebot|Storebot-Google|bingbot|Baiduspider|YandexBot|DuckDuckBot|Slurp|facebookexternalhit|Twitterbot|LinkedInBot|Applebot|AdsBot-Google|Mediapartners-Google|APIs-Google|PetalBot|SemrushBot|AhrefsBot|MJ12bot|DotBot|Acunetix|PerplexityBot|Perplexity-User/i,t=/bytedance/i;function i(){try{var e=document.cookie;if(!e||"string"!=typeof e)return;for(var t=0,i=e.split(";");t<i.length;t++){var n=i[t],r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r).trim();if(o){var a=void 0;try{a=decodeURIComponent(o)}catch(e){a=o}if("_shopify_s"===a){var d=n.slice(r+1).trim();try{return decodeURIComponent(d)}catch(e){return d}}}}}return}catch(e){return}}function n(e){try{"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)}catch(e){}}function r(e,t){return"string"==typeof e&&e.length>0&&e.length<=t?e:void 0}function o(e){var t;switch(null==(t=null==e?void 0:e.navigation)?void 0:t.type){case 0:return"navigate";case 1:return"reload";case 2:return"back_forward";default:return}}function a(){var e,t,i;try{var n=null==(i=null==(t=null==(e=self.ShopifyAnalytics)?void 0:e.lib)?void 0:t.trekkie)?void 0:i.state;return"awaiting-consent"===n||"initialized"===n?n:void 0}catch(e){return}}return function(d,s,u,l){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};try{var p=c.trekkieShim;!0!==p&&"true"!==p||null!=window.__TREKKIE_SHIM_QUEUE||(window.__TREKKIE_SHIM_QUEUE=[])}catch(e){}var f,v,h,y,g=(v=(f={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/}).modern,h=f.legacy,(y=navigator.userAgent).match(e)?"bot":y.match(v)?"modern":y.match(h)?"legacy":y.match(t)?"bot":"unknown"),m=function(e){var t,i,n=r(e,128);try{var a=window.performance,d=null==(t=null==a?void 0:a.getEntriesByType)?void 0:t.call(a,"navigation")[0];if(!d)return{requestId:n,navigationType:o(a)};var s="type"in d?r(d.type,64):void 0,u="serverTiming"in d&&Array.isArray(d.serverTiming)?d.serverTiming:[];return{requestId:null!=n?n:r(null==(i=u.find(function(e){return"requestID"===e.name}))?void 0:i.description,128),navigationType:s}}catch(e){return{requestId:n}}}(c.requestId),w=function(e){var t=e.version,r=e.browserTarget,o=e.surface,a=e.shopId,d=e.monorailEndpoint,s=window.location.href;return{emit:function(e){var u=e.status,l=e.errorMsg,c=e.failureReason,p=e.useKeepaliveFallback,f=void 0!==p&&p,v=e.navigationType,h=e.pagehidePersisted,y=e.requestId,g=e.trekkieState;if(d){var m,w;try{var b=(new Date).getTime();m=JSON.stringify({metadata:{event_sent_at_ms:b},events:[{schema_id:"web_pixels_manager_load/3.3",payload:{version:t,bundle_target:r,page_url:s,status:u,surface:o,error_msg:l,failure_reason:c,navigation_type:v,pagehide_persisted:h,request_id:y,trekkie_state:g,shop_id:a,visit_token:i()},metadata:{event_created_at_ms:b}}]})}catch(e){return}try{if("function"==typeof window.navigator.sendBeacon&&-1===(w=window.navigator.userAgent).indexOf("iPhone; CPU iPhone OS 12_")&&-1===w.indexOf("iPad; CPU OS 12_")&&-1===w.indexOf("iPod touch; CPU iPhone OS 12_")&&window.navigator.sendBeacon.bind(window.navigator)(d,m))return}catch(e){}if(f)try{"function"==typeof window.fetch&&window.fetch(d,{method:"POST",headers:{"Content-Type":"text/plain"},body:m,keepalive:!0}
961).catch(function(){})}catch(e){}else try{var _=new XMLHttpRequest;_.open("POST",d,!0),_.setRequestHeader("Content-Type","text/plain"),_.send(m)}catch(e){n("[Web Pixels Manager] Got an unhandled error while logging to Monorail.")}}else n("[Web Pixels Manager] No Monorail endpoint provided, skipping logging.")}}}({version:u,browserTarget:g,surface:d.surface,shopId:d.shopId,monorailEndpoint:d.monorailEndpoint});if(Boolean(null==(_=null==(b=window.Shopify)?void 0:b.analytics)?void 0:_.replayQueue))w.emit({status:"setup-skipped",errorMsg:"replay queue already initialized."});else{var b,_;w.emit({status:"setup-started"}),window.Shopify=window.Shopify||{};var S=window.Shopify;S.analytics=S.analytics||{};var P=S.analytics;P.replayQueue=[],P.publish=function(e,t,i){return P.replayQueue.push([e,t,i]),!0};try{self.performance.mark("wpm:start")}catch(e){}var k,C="modern"===g?"modern":"legacy",E=(null!=l?l:{modern:"",legacy:""})[C],I=[(k={baseUrl:s,hashVersion:u,buildTarget:C}).baseUrl,"/wpm","/b",k.hashVersion,"modern"===k.buildTarget?"m":"l",".js"].join(""),O=!1,T=!1;try{c.browserTarget=g,function(){O=!0;try{window.addEventListener("pagehide",M)}catch(e){O=!1}}(),R(function(){try{R(x)}catch(e){D(e)}}),w.emit({status:"loading",requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()})}catch(e){D(e)}}function U(){var e;if(q(),!function(){var e,t;return Boolean(null==(t=null==(e=window.Shopify)?void 0:e.analytics)?void 0:t.initialized)}()){var t,i,n;try{if("function"!=typeof(null==(e=window.webPixelsManager)?void 0:e.init))return void A();if(!(null!==(n=i=t=window.webPixelsManager.init(d))&&"function"!=typeof n&&Object(n)===n&&"publish"in i&&"function"==typeof i.publish&&"publishCustomEvent"in i&&"function"==typeof i.publishCustomEvent&&"visitor"in i&&"function"==typeof i.visitor))return void A()}catch(e){return void A(e)}var r=window.Shopify.analytics;r.replayQueue.forEach(function(e){var i=e[0],n=e[1],r=e[2];t.publishCustomEvent(i,n,r)}),r.replayQueue=[],r.publish=t.publishCustomEvent,r.visitor=t.visitor,r.initialized=!0}}function A(e){B("manager_api_unavailable",void 0===e?void 0:Q(e))}function x(){B("script_load_failed","".concat(I," has failed to load"))}function B(e,t){T||(T=!0,q(),w.emit({status:"failed",errorMsg:t,failureReason:e,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function M(e){O&&(q(),w.emit({status:"pagehide-while-loading",useKeepaliveFallback:!0,pagehidePersisted:e.persisted,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function q(){O=!1;try{window.removeEventListener("pagehide",M)}catch(e){}}function R(e){var t;!function(e){var t=e.src,i=e.async,n=void 0===i||i,r=e.onload,o=e.onerror,a=e.sri,d=e.scriptDataAttributes,s=void 0===d?{}:d,u=document.createElement("script"),l=document.querySelector("head"),c=document.querySelector("body");if(u.async=n,u.src=t,a&&(u.integrity=a,u.crossOrigin="anonymous"),s)for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))try{u.dataset[p]=String(s[p])}catch(e){}if(r&&u.addEventListener("load",r),o&&u.addEventListener("error",o),l)l.appendChild(u);else{if(!c)throw new Error("Did not find a head or body element to append the script");c.appendChild(u)}}({src:I,async:!0,onload:U,onerror:e,sri:(t=E,"string"==typeof t&&/^sha384-[A-Za-z0-9+/=]+$/.test(t)?E:""),scriptDataAttributes:c})}function D(e){B("script_append_failed",Q(e))}function Q(e){return e instanceof Error?e.message:"Unknown error"}}}();wpmLoader({shopId: 62856757501,storefrontBaseUrl: "https://www.roosters.co.uk",extensionsBaseUrl: "https://extensions.shopifycdn.com/cdn/shopifycloud/web-pixels-manager",monorailEndpoint: "https://www.roosters.co.uk/.well-known/shopify/monorail/unstable/produce_batch",surface: "storefront-renderer",enabledBetaFlags: ["4c64608a","16072cab","8450a54b","7ee89bf1"],webPixelsConfigList: [{"id":"3254
961649216","configuration":"{\"mailchimp_store_id\":\"store_gtljije53d4s7q9329yv\", \"mailchimp_user_id\":\"38314301\",\"mailchimp_list_id\":\"8e7a003f82\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"e357a49eadeb6216a959d63fa3fb8f55","type":"APP","apiClientId":2585307,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"3085107584","configuration":"{\"config\":\"{\\\"google_tag_ids\\\":[\\\"G-9ZXV00TLP1\\\",\\\"G-GCZVR5F2VE\\\",\\\"GT-W6JV6HWS\\\"],\\\"target_country\\\":\\\"GB\\\",\\\"gtag_events\\\":[{\\\"type\\\":\\\"begin_checkout\\\",\\\"action_label\\\":[\\\"G-9ZXV00TLP1\\\",\\\"AW-10928672281\\\/1RzfCP2Hrt4bEJmcmdso\\\"]},{\\\"type\\\":\\\"search\\\",\\\"action_label\\\":[\\\"G-9ZXV00TLP1\\\",\\\"AW-10928672281\\\/2lOUCNuJrt4bEJmcmdso\\\"]},{\\\"type\\\":\\\"remove_from_cart\\\",\\\"action_label\\\":\\\"G-9ZXV00TLP1\\\"},{\\\"type\\\":\\\"view_item\\\",\\\"action_label\\\":[\\\"G-9ZXV00TLP1\\\",\\\"AW-10928672281\\\/REFHCNiJrt4bEJmcmdso\\\",\\\"MC-P24T43D1TT\\\"]},{\\\"type\\\":\\\"add_shipping_info\\\",\\\"action_label\\\":\\\"G-9ZXV00TLP1\\\"},{\\\"type\\\":\\\"purchase\\\",\\\"action_label\\\":[\\\"G-9ZXV00TLP1\\\",\\\"AW-10928672281\\\/ZeT4CPqHrt4bEJmcmdso\\\",\\\"MC-P24T43D1TT\\\"]},{\\\"type\\\":\\\"page_view\\\",\\\"action_label\\\":[\\\"G-9ZXV00TLP1\\\",\\\"AW-10928672281\\\/PDrCCNWJrt4bEJmcmdso\\\",\\\"MC-P24T43D1TT\\\"]},{\\\"type\\\":\\\"view_item_list\\\",\\\"action_label\\\":\\\"G-9ZXV00TLP1\\\"},{\\\"type\\\":\\\"add_payment_info\\\",\\\"action_label\\\":[\\\"G-9ZXV00TLP1\\\",\\\"AW-10928672281\\\/2F0HCN6Jrt4bEJmcmdso\\\"]},{\\\"type\\\":\\\"add_to_cart\\\",\\\"action_label\\\":[\\\"G-9ZXV00TLP1\\\",\\\"AW-10928672281\\\/D6WvCNKJrt4bEJmcmdso\\\"]},{\\\"type\\\":\\\"view_cart\\\",\\\"action_label\\\":\\\"G-9ZXV00TLP1\\\"}],\\\"enable_monitoring_mode\\\":false}\"}","eventPayloadVersion":"v1","runtimeContext":"OPEN","scriptVersion":"a3321ca85cf5aaf6b57585fcd8d67b3a","type":"APP","apiClientId":1780363,"privacyPurposes":[],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"2538635648","configuration":"{\"shopifyDomain\":\"roostersbrewingco.myshopify.com\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"1dd80183ec586df078419d82cb462921","type":"APP","apiClientId":4546651,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"},{"id":"207552765","configuration":"{\"pixel_id\":\"725249668871936\",\"pixel_type\":\"facebook_pixel\",\"metaapp_system_user_token\":\"-\"}","eventPayloadVersion":"v1","runtimeContext":"OPEN","scriptVersion":"96420dbe9ea96c426a1b7f364f977719","type":"APP","apiClientId":2329312,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"195199360","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["ANALYTICS"],"name":"Google Analytics tag (migrated)"},{"id":"shopify-app-pixel","configuration":"{}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"APP","privacyPurposes":["ANALYTICS","MARKETING"]},{"id":"shopify-custom-pixel","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING"]}],isMerchantRequest: false,initData: {"shop":{"name":"RoostersBrewingCo","paymentSettings":{"currencyCode":"GBP"},"myshopifyDomain":"roostersbrewingco.myshopify.com","countryCode":"GB","storefrontUrl":"https:\/\/www.roosters.co.uk"},"customer":null,"cart":null,"checkout":null,"productVariants":[],"products":[],"purchasingCompany":null},},"https://www.roosters.co.uk/cdn","5982071ew7ea472e3p69b68784m2150dfea",{"modern":"","legacy":""},{"trekkieShim":true,"agentContext":true,"apiClientId":"580111","facebookCapiEnabled":"true","themeId":"131089924349","themeStoreId":"836","themePublished":"true","eventMetadataId":"c5b5e894-4849-41c7-a6f0-431cbf0a2163","pageType":"searchresults","shopId":"62856757501","storefrontBaseUrl":"https:\/\/www.roosters.co.uk","extensionBaseUrl":"https:\/\/extensions.shopifycdn.com\/cdn\/shopifycloud\/web-pixels-manager","surface":"storefront-renderer","enabledBetaFlags":"[\"4c64608a\", \"16072cab\", \"8450a54b\", \"7ee89bf1\"]","isMerchantRequest":"false","hashVersion":"5982071ew7ea472e3p69b68784m2150dfea","publish":"custom","events":"[[\"page_viewed\",{}],[\"search_submitted\",{\"searchResult\":{\"query\":\"\",\"productVariants\":[]}}]]"});})();</script>
961<script> 962 window.ShopifyAnalytics = window.ShopifyAnalytics || {}; 963 window.ShopifyAnalytics.meta = window.ShopifyAnalytics.meta || {}; 964 window.ShopifyAnalytics.meta.currency = 'GBP'; 965 var meta = {"products":[],"page":{"pageType":"searchresults","requestId":"011d48bb-1a60-4088-a7aa-55c8982b1782-1790945085"}}; 966 for (var attr in meta) { 967 window.ShopifyAnalytics.meta[attr] = meta[attr]; 968 } 969</script>
vendor: 1 bytes, line 969
969
970<script class="analytics"> 971 (function () { 972 var customDocumentWrite = function(content) { 973 var jquery = null; 974 975 if (window.jQuery) { 976 jquery = window.jQuery; 977 } else if (window.Checkout && window.Checkout.$) { 978 jquery = window.Checkout.$; 979 } 980 981 if (jquery) { 982 jquery('body').append(content); 983 } 984 }; 985 986 var hasLoggedConversion = function(token) { 987 if (token) { 988 return document.cookie.indexOf('loggedConversion=' + token) !== -1; 989 } 990 return false; 991 } 992 993 var setCookieIfConversion = function(token) { 994 if (token) { 995 var twoMonthsFromNow = new Date(Date.now()); 996 twoMonthsFromNow.setMonth(twoMonthsFromNow.getMonth() + 2); 997 998 document.cookie = 'loggedConversion=' + token + '; expires=' + twoMonthsFromNow; 999 } 1000 } 1001 1002 var trekkie = window.ShopifyAnalytics.lib = window.trekkie = window.trekkie || []; 1003 window.ShopifyAnalytics.lib.trekkie = window.trekkie; 1004 if (trekkie.integrations) { 1005 return; 1006 } 1007 trekkie.methods = [ 1008 'identify', 1009 'page', 1010 'ready', 1011 'track', 1012 'trackForm', 1013 'trackLink' 1014 ]; 1015 trekkie.factory = function(method) { 1016 return function() { 1017 var args = Array.prototype.slice.call(arguments); 1018 args.unshift(method); 1019 trekkie.push(args); 1020 if (method == 'track' || method == 'page') { 1021 var pageUrl; 1022 try { 1023 pageUrl = window.location.href; 1024 } catch (e) {} 1025 var pageReferrer; 1026 try { 1027 pageReferrer = document.referrer; 1028 } catch (e) {} 1029 try { 1030 if (window.__TREKKIE_SHIM_QUEUE == null) { 1031 window.__TREKKIE_SHIM_QUEUE = []; 1032 } 1033 window.__TREKKIE_SHIM_QUEUE.push({ 1034 from: 'trekkie-stub', 1035 method: method, 1036 args: args.slice(1), 1037 pageContext: { 1038 url: pageUrl, 1039 referrer: pageReferrer 1040 } 1041 }); 1042 } catch (e) { 1043 // no-op 1044 } 1045 } 1046 return trekkie; 1047 }; 1048 }; 1049 for (var i = 0; i < trekkie.methods.length; i++) { 1050 var key = trekkie.methods[i]; 1051 trekkie[key] = trekkie.factory(key); 1052 } 1053 trekkie.load = function(config) { 1054 trekkie.config = config || {}; 1055 trekkie.config.initialDocumentCookie = document.cookie; 1056 var first = document.getElementsByTagName('script')[0]; 1057var script = document.createElement('script'); 1058script.type = 'text/javascript'; 1059script.onerror = function(e) { 1060 var scriptFallback = document.createElement('script'); 1061 scriptFallback.type = 'text/javascript'; 1062 scriptFallback.onerror = function(error) { 1063 var Monorail = { 1064 produce: function produce(monorailDomain, schemaId, payload) { 1065 var currentMs = new Date().getTime(); 1066 var event = { 1067 schema_id: schemaId, 1068 payload: payload, 1069 metadata: { 1070 event_created_at_ms: currentMs, 1071 event_sent_at_ms: currentMs 1072 } 1073 }; 1074 return Monorail.sendRequest("https://" + monorailDomain + "/v1/produce", JSON.stringify(event)); 1075 }, 1076 sendRequest: function sendRequest(endpointUrl, payload) { 1077 // Try the sendBeacon API 1078 if (window && window.navigator && typeof window.navigator.sendBeacon === 'function' && typeof window.Blob === 'function' && !Monorail.isIos12()) { 1079 var blobData = new window.Blob([payload], { 1080 type: 'text/plain' 1081 }); 1082 1083 if (window.navigator.sendBeacon(endpointUrl, blobData)) { 1084 return true; 1085 } // sendBeacon was not successful 1086 1087 } // XHR beacon 1088 1089 var xhr = new XMLHttpRequest(); 1090 1091 try { 1092 xhr.open('POST', endpointUrl); 1093 xhr.setRequestHeader('Content-Type', 'text/plain'); 1094 xhr.send(payload); 1095 } catch (e) { 1096 console.log(e); 1097 } 1098 1099 return false; 1100 }, 1101 isIos12: function isIos12() { 1102 return window.navigator.userAgent.lastIndexOf('iPhone; CPU iPhone OS 12_') !== -1 || window.navigator.userAgent.lastIndexOf('iPad; CPU OS 12_') !== -1; 1103 } 1104 }; 1105 Monorail.produce('monorail-edge.shopifysvc.com', 1106 'trekkie_storefront_load_errors/1.1', 1107 {shop_id: 62856757501, 1108 theme_id: 131089924349, 1109 app_name: "storefront", 1110 context_url: window.location.href, 1111 source_url: "//www.roosters.co.uk/cdn/s/trekkie.storefront.2f6d7d7ede7d24234881a9cd5f47e679642fa1f6.min.js"}); 1112 1113 }; 1114 scriptFallback.async = true; 1115 scriptFallback.src = '//www.roosters.co.uk/cdn/s/trekkie.storefront.2f6d7d7ede7d24234881a9cd5f47e679642fa1f6.min.js'; 1116 first.parentNode.insertBefore(scriptFallback, first); 1117}; 1118script.async = true; 1119script.src = '//www.roosters.co.uk/cdn/s/trekkie.storefront.2f6d7d7ede7d24234881a9cd5f47e679642fa1f6.min.js'; 1120first.parentNode.insertBefore(script, first); 1121 1122 }; 1123 trekkie.load( 1124 {"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":62856757501,"isMerchantRequest":null,"themeId":131089924349,"themeCityHash":"937090911376976690","contentLanguage":"en","currency":"GBP","eventMetadataId":"c5b5e894-4849-41c7-a6f0-431cbf0a2163"},"isServerSideCookieWritingEnabled":true,"monorailRegion":"shop_domain","enabledBetaFlags":["764d78cb","8450a54b","7ee89bf1","4c64608a"]},"Session Attribution":{},"S2S":{"facebookCapiEnabled":true,"source":"trekkie-storefront-renderer","apiClientId":580111}} 1125 ); 1126 1127 var loaded = false;
1128 trekkie.ready(function() { 1129 if (loaded) return; 1130 loaded = true; 1131 1132 window.ShopifyAnalytics.lib = window.trekkie; 1133 1134 var originalDocumentWrite = document.write; 1135 document.write = customDocumentWrite; 1136 try { window.ShopifyAnalytics.merchantGoogleAnalytics.call(this); } catch(error) {}; 1137 document.write = originalDocumentWrite; 1138 1139 var match = window.location.pathname.match(/checkouts\/(.+)\/(thank_you|post_purchase)/) 1140 var token = match? match[1]: undefined; 1141 if (!hasLoggedConversion(token)) { 1142 setCookieIfConversion(token); 1143 window.ShopifyAnalytics.lib.track("Performed Search",{"query":null},undefined,undefined,{"shopifyEmitted":true}); 1144 } 1145 }); 1146 1147 window.ShopifyAnalytics.lib.page(null,{"pageType":"searchresults","requestId":"011d48bb-1a60-4088-a7aa-55c8982b1782-1790945085","shopifyEmitted":true}); 1148 1149 var eventsListenerScript = document.createElement('script'); 1150 eventsListenerScript.async = true; 1151 eventsListenerScript.src = "//www.roosters.co.uk/cdn/shopifycloud/storefront/assets/shop_events_listener-4e26a9ce.js"; 1152 document.getElementsByTagName('head')[0].appendChild(eventsListenerScript); 1153})();</script>
1153 1154
1154<script> 1155 if (!window.ga || (window.ga && typeof window.ga !== 'function')) { 1156 window.ga = function ga() { 1157 (window.ga.q = window.ga.q || []).push(arguments); 1158 if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') { 1159 window.Shopify.analytics.publish("ga_stub_called", {}, {sendTo: "google_osp_migration"}); 1160 } 1161 console.error("Shopify's Google Analytics stub called with:", Array.from(arguments), "\nSee https://help.shopify.com/manual/promoting-marketing/pixels/pixel-migration#google for more information."); 1162 }; 1163 if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') { 1164 window.Shopify.analytics.publish("ga_stub_initialized", {}, {sendTo: "google_osp_migration"}); 1165 } 1166 } 1167</script>
vendor: 1 bytes, line 1167
1167
1168<script 1169 defer 1170 src="https://www.roosters.co.uk/cdn/shopifycloud/perf-kit/shopify-perf-kit-3.9.4.min.js" 1171 data-application="storefront-renderer" 1172 data-shop-id="62856757501" 1173 data-render-region="gcp-us-west1" 1174 data-page-type="search" 1175 data-theme-instance-id="131089924349" 1176 data-theme-name="Venue" 1177 data-theme-version="6.0.1" 1178 data-monorail-region="shop_domain" 1179 data-resource-timing-sampling-rate="10" 1180 data-shs="true" 1181 data-shs-beacon="true" 1182 data-shs-export-with-fetch="true" 1183 data-shs-logs-sample-rate="1" 1184 data-shs-beacon-endpoint="https://www.roosters.co.uk/api/collect" 1185></script>
1185 1186<meta name="shopify-y" content="6489b712-974b-4b22-9ee9-f6ce2ebccb77" data-expiration="1822502685000"><meta name="shopify-s" content="af695193-ad18-437c-874d-9c8fbfcc9c8d" data-expiration="1790946885000"><meta name="new-cookie-storage-activated" content="t"> 1187</head> 1188 1189<body id="search" class="template-search" data-anim-load="true" data-anim-interval-style="fade_down" data-anim-zoom="true" data-anim-interval="true" data-heading-border="true"> 1190
1190<script type="text/javascript"> 1191 //loading class for animations 1192 document.body.className += ' ' + 'js-theme-loading'; 1193 setTimeout(function(){ 1194 document.body.className = document.body.className.replace('js-theme-loading','js-theme-loaded'); 1195 }, 300); 1196 </script>
1196 1197<!-- Google Tag Manager (noscript) -->
vendor: 68 bytes, lines 1197-1198
1197 1198<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=
1198GTM-KR2TFW7
vendor: 83 bytes, lines 1198-1199
1198" 1199height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
1200<!-- End Google Tag Manager (noscript) --> 1201 <a class="skip-to-content-link" href="#main">Skip to content</a> 1202 1203 <div class="page-transition"></div> 1204 1205 <div class="page-container"> 1206 <div id="shopify-section-mobile-drawer" class="shopify-section js-section__mobile-draw"><style> 1207.mobile-draw, 1208.mobile-draw .mfp-close { 1209 background-color: #f0f0f0; 1210} 1211.mobile-draw__localize { 1212 background-color: #e8e8e8; 1213} 1214</style> 1215 1216<div class="mobile-draw mobile-draw--dark js-menu-draw mfp-hide"><div class="mobile-draw__wrapper"> 1217 1218 <nav class="mobile-draw__nav mobile-nav"> 1219 <ul class="mobile-nav__items o-list-bare"> 1220 1221 1222 1223 <li class="mobile-nav__item mobile-nav__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-1"> 1224 <a href="#mobile-sub-1" class="mobile-nav__link mobile-nav__link--sub js-toggle-trigger">Info</a> 1225 1226 1227 <div class="mobile-nav__sub js-toggle-target" id="mobile-sub-1"> 1228 <ul class="mobile-nav__sub__items o-list-bare"> 1229 1230 1231 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-1-1"> 1232 <a href="#mobile-sub-t-1-1" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">About Us</a> 1233 1234 1235 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-1-1"> 1236 <ul class="mobile-nav__sub-t__items o-list-bare"> 1237 1238 1239 <li class="mobile-nav__sub-t__item"> 1240 <a href="/pages/about-us" class="mobile-nav__sub-t__link">- History</a> 1241 </li> 1242 1243 <li class="mobile-nav__sub-t__item"> 1244 <a href="/pages/recent-notable-awards" class="mobile-nav__sub-t__link">- Awards</a> 1245 </li> 1246 1247 1248 </ul> 1249 </div> 1250 1251 1252 </li> 1253 1254 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-1-2"> 1255 <a href="#mobile-sub-t-1-2" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">Jobs</a> 1256 1257 1258 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-1-2"> 1259 <ul class="mobile-nav__sub-t__items o-list-bare"> 1260 1261 1262 <li class="mobile-nav__sub-t__item"> 1263 <a href="/pages/taproom-jobs" class="mobile-nav__sub-t__link">- Taproom</a> 1264 </li> 1265 1266 <li class="mobile-nav__sub-t__item"> 1267 <a href="/pages/brewery-jobs" class="mobile-nav__sub-t__link">- Brewery</a> 1268 </li> 1269 1270 1271 </ul> 1272 </div> 1273 1274 1275 </li> 1276 1277 </ul> 1278 </div> 1279 1280 </li> 1281 1282 1283 <li class="mobile-nav__item mobile-nav__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-2"> 1284 <a href="#mobile-sub-2" class="mobile-nav__link mobile-nav__link--sub js-toggle-trigger">Shop</a> 1285 1286 1287 <div class="mobile-nav__sub js-toggle-target" id="mobile-sub-2"> 1288 <ul class="mobile-nav__sub__items o-list-bare"> 1289 1290 1291 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-2-1"> 1292 <a href="#mobile-sub-t-2-1" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">All Beer</a> 1293 1294 1295 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-2-1"> 1296 <ul class="mobile-nav__sub-t__items o-list-bare"> 1297 1298 1299 <li class="mobile-nav__sub-t__item"> 1300 <a href="/collections/cans" class="mobile-nav__sub-t__link">- Cans</a> 1301 </li> 1302 1303 <li class="mobile-nav__sub-t__item"> 1304 <a href="/collections/barrel-aged" class="mobile-nav__sub-t__link">- Barrel-Aged</a> 1305 </li> 1306 1307 <li class="mobile-nav__sub-t__item"> 1308 <a href="/collections/bag-in-box" class="mobile-nav__sub-t__link">- Bag In Box</a> 1309 </li> 1310 1311 <li class="mobile-nav__sub-t__item"> 1312 <a href="/collections/gluten-free" class="mobile-nav__sub-t__link">- Gluten Free</a> 1313 </li> 1314 1315 1316 </ul> 1317 </div> 1318 1319 1320 </li> 1321 1322 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-2-2"> 1323 <a href="#mobile-sub-t-2-2" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">Merch</a> 1324 1325 1326 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-2-2"> 1327 <ul class="mobile-nav__sub-t__items o-list-bare"> 1328 1329 1330 <li class="mobile-nav__sub-t__item"> 1331 <a href="https://www.roosters.co.uk/pages/merch" class="mobile-nav__sub-t__link">- All Merch</a> 1332 </li> 1333 1334 <li class="mobile-nav__sub-t__item"> 1335 <a href="/collections/hats" class="mobile-nav__sub-t__link">- Hats</a> 1336 </li> 1337 1338 <li class="mobile-nav__sub-t__item"> 1339 <a href="/collections/t-shirts" class="mobile-nav__sub-t__link">- T-Shirts</a> 1340 </li> 1341 1342 <li class="mobile-nav__sub-t__item"> 1343 <a href="/collections/glassware" class="mobile-nav__sub-t__link">- Glassware</a> 1344 </li> 1345 1346 1347 </ul> 1348 </div> 1349 1350 1351 </li> 1352 1353 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-2-3"> 1354 <a href="#mobile-sub-t-2-3" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">Gift Vouchers</a> 1355 1356 1357 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-2-3"> 1358 <ul class="mobile-nav__sub-t__items o-list-bare"> 1359 1360 1361 <li class="mobile-nav__sub-t__item"> 1362 <a href="/products/roosters-gift-voucher" class="mobile-nav__sub-t__link">- Online</a> 1363 </li> 1364 1365 <li class="mobile-nav__sub-t__item"> 1366 <a href="/products/taproom-gift-voucher" class="mobile-nav__sub-t__link">- Taproom</a> 1367 </li> 1368 1369 1370 </ul> 1371 </div> 1372 1373 1374 </li> 1375 1376 <li class="mobile-nav__sub__item" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-2-4"> 1377 <a href="/collections/sale" class="mobile-nav__sub__link">Sale</a> 1378 1379 1380 1381 </li> 1382 1383 </ul> 1384 </div> 1385 1386 </li> 1387 1388 1389 <li class="mobile-nav__item mobile-nav__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-3"> 1390 <a href="#mobile-sub-3" class="mobile-nav__link mobile-nav__link--sub js-toggle-trigger">Taproom</a> 1391 1392 1393 <div class="mobile-nav__sub js-toggle-target" id="mobile-sub-3"> 1394 <ul class="mobile-nav__sub__items o-list-bare"> 1395 1396 1397 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-3-1"> 1398 <a href="#mobile-sub-t-3-1" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">Taproom Info</a> 1399 1400 1401 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-3-1"> 1402 <ul class="mobile-nav__sub-t__items o-list-bare"> 1403 1404 1405 <li class="mobile-nav__sub-t__item"> 1406 <a href="/pages/taproom" class="mobile-nav__sub-t__link">- General Info [inc. Opening Times]</a> 1407 </li> 1408 1409 <li class="mobile-nav__sub-t__item"> 1410 <a href="/pages/taproom-food" class="mobile-nav__sub-t__link">- Street Food Kitchen</a> 1411 </li> 1412 1413 <li class="mobile-nav__sub-t__item"> 1414 <a href="/pages/taproom-loyalty" class="mobile-nav__sub-t__link">- Rooster Booster Loyalty Club</a> 1415 </li> 1416 1417 <li class="mobile-nav__sub-t__item"> 1418 <a href="/pages/happy-hour" class="mobile-nav__sub-t__link">- Happy 'Hour'</a> 1419 </li> 1420 1421 1422 </ul> 1423 </div> 1424 1425 1426 </li> 1427 1428 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-3-2"> 1429 <a href="#mobile-sub-t-3-2" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">Events</a> 1430 1431 1432 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-3-2"> 1433 <ul class="mobile-nav__sub-t__items o-list-bare"> 1434 1435 1436 <li class="mobile-nav__sub-t__item"> 1437 <a href="/pages/events-calendar" class="mobile-nav__sub-t__link">- View All Events</a> 1438 </li> 1439 1440 <li class="mobile-nav__sub-t__item"> 1441 <a href="/pages/quiz-night" class="mobile-nav__sub-t__link">- Quiz Night</a> 1442 </li> 1443 1444
1444 <li class="mobile-nav__sub-t__item"> 1445 <a href="/pages/really-funny-comedy" class="mobile-nav__sub-t__link">- Really Funny Comedy</a> 1446 </li> 1447 1448 <li class="mobile-nav__sub-t__item"> 1449 <a href="/pages/harrogate-folk-club" class="mobile-nav__sub-t__link">- Harrogate Folk Club</a> 1450 </li> 1451 1452 <li class="mobile-nav__sub-t__item"> 1453 <a href="https://www.eventbrite.co.uk/e/barrett-pugh-and-broad-live-at-roosters-tickets-1983566014345" class="mobile-nav__sub-t__link">- Serious Sam Barrett</a> 1454 </li> 1455 1456 <li class="mobile-nav__sub-t__item"> 1457 <a href="/products/beer_and_cheese_2026" class="mobile-nav__sub-t__link">- A Taste of Independent Harrogate</a> 1458 </li> 1459 1460 <li class="mobile-nav__sub-t__item"> 1461 <a href="https://hydefamilyjamshop.com/event/6572039/762673860/festive-fiesta" class="mobile-nav__sub-t__link">- Hyde Family Jam Festive Fiesta</a> 1462 </li> 1463 1464 1465 </ul> 1466 </div> 1467 1468 1469 </li> 1470 1471 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-3-3"> 1472 <a href="#mobile-sub-t-3-3" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">The Sample Room</a> 1473 1474 1475 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-3-3"> 1476 <ul class="mobile-nav__sub-t__items o-list-bare"> 1477 1478 1479 <li class="mobile-nav__sub-t__item"> 1480 <a href="/pages/the-sample-room" class="mobile-nav__sub-t__link">- Private Parties</a> 1481 </li> 1482 1483 1484 </ul> 1485 </div> 1486 1487 1488 </li> 1489 1490 </ul> 1491 </div> 1492 1493 </li> 1494 1495 1496 <li class="mobile-nav__item"> 1497 <a href="/pages/swb-gallery" class="mobile-nav__link">Suds With Buds</a> 1498 1499 1500 </li> 1501 1502 1503 <li class="mobile-nav__item mobile-nav__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-5"> 1504 <a href="#mobile-sub-5" class="mobile-nav__link mobile-nav__link--sub js-toggle-trigger">Trade</a> 1505 1506 1507 <div class="mobile-nav__sub js-toggle-target" id="mobile-sub-5"> 1508 <ul class="mobile-nav__sub__items o-list-bare"> 1509 1510 1511 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-5-1"> 1512 <a href="#mobile-sub-t-5-1" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">Core Range</a> 1513 1514 1515 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-5-1"> 1516 <ul class="mobile-nav__sub-t__items o-list-bare"> 1517 1518 1519 <li class="mobile-nav__sub-t__item"> 1520 <a href="/pages/core-range" class="mobile-nav__sub-t__link">- Modern Classics</a> 1521 </li> 1522 1523 1524 </ul> 1525 </div> 1526 1527 1528 </li> 1529 1530 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-5-2"> 1531 <a href="#mobile-sub-t-5-2" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">Limited Release Beers</a> 1532 1533 1534 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-5-2"> 1535 <ul class="mobile-nav__sub-t__items o-list-bare"> 1536 1537 1538 <li class="mobile-nav__sub-t__item"> 1539 <a href="https://www.roosters.co.uk/pages/limited-release-beers" class="mobile-nav__sub-t__link">- Current Availability</a> 1540 </li> 1541 1542 1543 </ul> 1544 </div> 1545 1546 1547 </li> 1548 1549 <li class="mobile-nav__sub__item mobile-nav__sub__item--sub" aria-has-popup="true" aria-expanded="false" aria-controls="mobile-sub-t-5-3"> 1550 <a href="#mobile-sub-t-5-3" class="mobile-nav__sub__link mobile-nav__sub__link--t js-toggle-trigger">In The Trade?</a> 1551 1552 1553 <div class="mobile-nav__sub-t js-toggle-target" id="mobile-sub-t-5-3"> 1554 <ul class="mobile-nav__sub-t__items o-list-bare"> 1555 1556 1557 <li class="mobile-nav__sub-t__item"> 1558 <a href="https://www.roosters.co.uk/pages/in-the-trade" class="mobile-nav__sub-t__link">- Stock Our Beer!</a> 1559 </li> 1560 1561 1562 </ul> 1563 </div> 1564 1565 1566 </li> 1567 1568 </ul> 1569 </div> 1570 1571 </li> 1572 1573 1574 <li class="mobile-nav__item"> 1575 <a href="/blogs/blog" class="mobile-nav__link">Blog</a> 1576 1577 1578 </li> 1579 1580 1581 <li class="mobile-nav__item"> 1582 <a href="/pages/contact" class="mobile-nav__link">Contact Us</a> 1583 1584 1585 </li> 1586 1587 1588 1589 1590 <li class="mobile-nav__item"> 1591 <a href="https://www.roosters.co.uk/customer_authentication/redirect?locale=en®ion_country=GB" class="mobile-nav__link">Log in</a> 1592 </li> 1593 1594 1595 </ul> 1596 </nav> 1597 1598 1599 <div class="mobile-draw__search mobile-search"> 1600 <form action="/search" method="get" class="mobile-search__form" role="search"> 1601 <input type="hidden" name="type" value="product,article,page"> 1602 <input type="search" name="q" class="mobile-search__input" value="" aria-label="Search our store..." placeholder="Search our store..."> 1603 <button type="submit" class="mobile-search__submit"> 1604 <i class="icon icon--search" aria-hidden="true"></i>
1605 <span class="icon-fallback__text">Search</span> 1606 </button> 1607 </form> 1608 </div> 1609 1610 1611 <div class="mobile-draw__footer mobile-footer"> 1612 1613 1614 <ul class="mobile-footer__social-items o-list-bare"> 1615 1616 <li class="mobile-footer__social-item"> 1617 <a href="https://facebook.com/RoostersBrewCo" class="mobile-footer__social-link icon-fallback" target="_blank" rel="noopener"> 1618 <i class="icon icon--facebook" aria-hidden="true"></i> 1619 <span class="icon-fallback__text">Facebook</span> 1620 </a> 1621 </li> 1622 1623 1624 <li class="mobile-footer__social-item"> 1625 <a href="https://twitter.com/RoostersBrewCo" class="mobile-footer__social-link icon-fallback" target="_blank" rel="noopener"> 1626 <i class="icon icon--twitter" aria-hidden="true"></i> 1627 <span class="icon-fallback__text">Twitter</span> 1628 </a> 1629 </li> 1630 1631 1632 1633 <li class="mobile-footer__social-item"> 1634 <a href="http://instagram.com/RoostersBrewCo" class="mobile-footer__social-link icon-fallback" target="_blank" rel="noopener"> 1635 <i class="icon icon--instagram" aria-hidden="true"></i> 1636 <span class="icon-fallback__text">Instagram</span> 1637 </a> 1638 </li> 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 </ul> 1649 1650 </div> 1651 1652 1653 <div class="mobile-draw__cta mobile-cta"> 1654 1655 1656 1657 1658 1659 <div class="mobile-cta__text rte"> 1660 <p>01423 865959</p> 1661 </div> 1662 1663 1664 <div class="mobile-cta__link"> 1665 <a href="/pages/contact" class="link link--arrow">Contact us</a> 1666 </div> 1667 1668 </div> 1669 1670 1671 </div> 1672</div> 1673 1674 1675</div> 1676 <div id="shopify-section-announcement" class="shopify-section js-section__announcement"><style type="text/css"> 1677 1678 .announcement { 1679 background-color: #fdda3f; 1680 } 1681 .announcement__text, 1682 .announcement__text.rte a { 1683 color: #222222; 1684 } 1685 .announcement__text.rte a { 1686 border-color: #222222; 1687 } 1688 1689</style> 1690 1691 1692 1693 1694 <a href="/pages/delivery-info" class="announcement__link"> 1695 1696 <div class="announcement js-announcement"> 1697 <p class="announcement__text">FREE DELIVERY AVAILABLE ON ORDERS OVER £50 /// CLUCK & COLLECT /// FREE LOCAL DELIVERY WITHIN A 5 MILE RADIUS [CLICK HERE FOR MORE DETAILS]</p> 1698 </div> 1699 1700 </a> 1701 1702 1703 1704 1705</div> 1706 <div id="shopify-section-header" class="shopify-section shopify-section-header js-section__header"><style type="text/css"> 1707 .header, .nav__sub-wrap, .nav__sub-t-wrap { background-color: #ffffff; } 1708 .nav__sub-wrap:after { border-bottom-color: #ffffff; } 1709 .header--light .nav__sub__link.selected, 1710 .header--light .nav__sub__link:hover, 1711 .header--light .nav__sub__item--sub:hover .nav__sub__link, 1712 .header--light .nav__sub-t__link:hover { background-color: #ffffff; } 1713 .header--dark .nav__sub__link.selected, 1714 .header--dark .nav__sub__link:hover, 1715 .header--dark .nav__sub__item--sub:hover .nav__sub__link, 1716 .header--dark .nav__sub-t__link:hover { background-color: #f2f2f2; } 1717 1718 1719 .shopify-section-header { 1720 position: -webkit-sticky; 1721 position: sticky; 1722 } 1723 1724 1725 :root { 1726 1727 --header-is-sticky: 0; 1728 ; 1729 } 1730 1731 .header, 1732 .header__logo, 1733 .header-trigger { 1734 height: 150px; 1735 } 1736 .header__logo-img, 1737 .header-trigger { 1738 max-height: 150px; 1739 } 1740 .header--center .header__logo-img { 1741 width: 150px; 1742 } 1743 .header__logo-img { 1744 padding: 9px 0; 1745 } 1746 @media screen and (max-width: 767px) { 1747 .header, 1748 .header__logo, 1749 .header.header--center .header__logo, 1750 .header-trigger {height: 94px;} 1751 .header__logo-img, 1752 .header--center.header--center .header__logo-img, 1753 .header-trigger {max-height: 94px;} 1754 } 1755 .header--mega .primary-nav .nav__sub { 1756padding-top: 58px; 1757 } 1758 1759 1760 1761 1762 1763 .main .collection__header--img, 1764 .main .article__featured-media { margin-top: -30px } 1765 1766</style> 1767 1768 1769 <div class="header-stripe"></div> 1770 1771 1772<header role="banner" id="top" class="header header--dark js-header header--sticky js-header-sticky header--scroll js-header-scroll header--center header--stripe header--mega" data-section-id="header" data-section-type="header-section"> 1773 1774 <div class="header__logo u-flex u-flex--middle u-flex--center"> 1775 1776 <div class="header__logo-wrapper js-main-logo" itemscope itemtype="http://schema.org/Organization"> 1777 1778 1779 <a href="/" itemprop="url" class="header__logo-link animsition-link"> 1780 1781 <img src="//www.roosters.co.uk/cdn/shop/files/Rooster_s_Brew_Co._Logo_Harrogate_500x.png?v=1730129103" class="header__logo-img" alt="RoostersBrewingCo" itemprop="logo" width="3373" height="3373"> 1782 </a> 1783 1784 1785 </div> 1786 1787 </div> 1788 1789 <div class="header-trigger header-trigger--left mobile-draw-trigger-icon u-flex u-flex--middle js-mobile-draw-icon" style="display: none"> 1790 <a href="#" class="header-trigger__link header-trigger__link--mobile js-mobile-draw-trigger icon-fallback"> 1791 <i class="icon icon--menu" aria-hidden="true"></i>
1792 <span class="icon-fallback__text">Menu</span> 1793 </a> 1794 </div> 1795 1796 <div class="header-trigger header-trigger--right search-draw-trigger-icon u-flex u-flex--middle js-search-draw-icon" style="display: none"> 1797 <a href="/search" class="header-trigger__link header-trigger__link--search icon-fallback js-search-trigger js-no-transition"> 1798 <i class="icon icon--search" aria-hidden="true"></i> 1799 <span class="icon-fallback__text">Search</span> 1800 </a> 1801 </div> 1802 1803 <div class="header-trigger header-trigger--far-right cart-draw-trigger-icon u-flex u-flex--middle js-cart-draw-icon" style="display: none"> 1804 <a href="/cart" class="header-trigger__link header-trigger__link--cart icon-fallback js-cart-icon"> 1805 <i class="icon icon--cart" aria-hidden="true"></i> 1806 <span class="icon-fallback__text">Cart</span> 1807 </a> 1808 </div> 1809 1810 <div class="header-navs js-heaver-navs u-clearfix u-hidden@tab-down"> 1811 1812 <nav class="primary-nav header-navs__items js-primary-nav" role="navigation"> 1813 <ul class="primary-nav__items"> 1814 1815 1816 <li class="primary-nav__item primary-nav__item--sub js-header-sub-link"> 1817 <a href="/pages/about-us" class="primary-nav__link animsition-link nav__link--sub js-header-sub-link-a" aria-expanded="false" aria-controls="sub-1">Info</a> 1818 1819 1820 <div class="nav__sub js-nav-sub" id="sub-1"> 1821 <div class="nav__sub-wrap"> 1822 1823 <ul class="nav__sub__items nav__sub__items--2 o-list-bare"> 1824 1825 1826 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 1827 <a href="/pages/about-us" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-1-1">About Us</a> 1828 1829 1830 <div class="nav__sub-t js-nav-sub-t" id="sub-t-1-1"> 1831 <div class="nav__sub-t-wrap"> 1832 <ul class="nav__sub-t__items o-list-bare"> 1833 1834 1835 <li class="nav__sub-t__item"> 1836 <a href="/pages/about-us" class="nav__sub-t__link">- History</a> 1837 </li> 1838 1839 <li class="nav__sub-t__item"> 1840 <a href="/pages/recent-notable-awards" class="nav__sub-t__link">- Awards</a> 1841 </li> 1842 1843 1844 </ul> 1845 </div> 1846 </div> 1847 1848 1849 </li> 1850 1851 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 1852 <a href="/pages/brewery-jobs" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-1-2">Jobs</a> 1853 1854 1855 <div class="nav__sub-t js-nav-sub-t" id="sub-t-1-2"> 1856 <div class="nav__sub-t-wrap"> 1857 <ul class="nav__sub-t__items o-list-bare"> 1858 1859 1860 <li class="nav__sub-t__item"> 1861 <a href="/pages/taproom-jobs" class="nav__sub-t__link">- Taproom</a> 1862 </li> 1863 1864 <li class="nav__sub-t__item"> 1865 <a href="/pages/brewery-jobs" class="nav__sub-t__link">- Brewery</a> 1866 </li> 1867 1868 1869 </ul> 1870 </div> 1871 </div> 1872 1873 1874 </li> 1875 1876 1877 </ul> 1878 1879 1880 1881 1882 1883 </div> 1884 </div> 1885 1886 1887 </li> 1888 1889 1890 <li class="primary-nav__item primary-nav__item--sub js-header-sub-link"> 1891 <a href="/collections/all-beer" class="primary-nav__link animsition-link nav__link--sub js-header-sub-link-a" aria-expanded="false" aria-controls="sub-2">Shop</a> 1892 1893 1894 <div class="nav__sub js-nav-sub" id="sub-2"> 1895 <div class="nav__sub-wrap"> 1896 1897 <ul class="nav__sub__items nav__sub__items--4 o-list-bare"> 1898 1899 1900 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 1901 <a href="/collections/all-beer" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-2-1">All Beer</a> 1902 1903 1904 <div class="nav__sub-t js-nav-sub-t" id="sub-t-2-1"> 1905 <div class="nav__sub-t-wrap"> 1906 <ul class="nav__sub-t__items o-list-bare"> 1907 1908 1909 <li class="nav__sub-t__item"> 1910 <a href="/collections/cans" class="nav__sub-t__link">- Cans</a> 1911 </li> 1912 1913 <li class="nav__sub-t__item"> 1914 <a href="/collections/barrel-aged" class="nav__sub-t__link">- Barrel-Aged</a> 1915 </li> 1916 1917 <li class="nav__sub-t__item"> 1918 <a href="/collections/bag-in-box" class="nav__sub-t__link">- Bag In Box</a> 1919 </li> 1920 1921 <li class="nav__sub-t__item"> 1922 <a href="/collections/gluten-free" class="nav__sub-t__link">- Gluten Free</a> 1923 </li> 1924 1925 1926 </ul> 1927 </div> 1928 </div> 1929 1930 1931 </li> 1932 1933 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 1934 <a href="https://www.roosters.co.uk/pages/merch" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-2-2">Merch</a> 1935 1936 1937 <div class="nav__sub-t js-nav-sub-t" id="sub-t-2-2"> 1938 <div class="nav__sub-t-wrap"> 1939 <ul class="nav__sub-t__items o-list-bare"> 1940 1941 1942 <li class="nav__sub-t__item"> 1943 <a href="https://www.roosters.co.uk/pages/merch" class="nav__sub-t__link">- All Merch</a> 1944 </li> 1945 1946 <li class="nav__sub-t__item"> 1947 <a href="/collections/hats" class="nav__sub-t__link">- Hats</a> 1948 </li> 1949 1950 <li class="nav__sub-t__item"> 1951 <a href="/collections/t-shirts" class="nav__sub-t__link">- T-Shirts</a> 1952 </li> 1953 1954 <li class="nav__sub-t__item"> 1955 <a href="/collections/glassware" class="nav__sub-t__link">- Glassware</a> 1956 </li> 1957 1958 1959 </ul> 1960 </div> 1961 </div> 1962 1963 1964 </li> 1965 1966 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 1967 <a href="#" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-2-3">Gift Vouchers</a> 1968 1969 1970 <div class="nav__sub-t js-nav-sub-t" id="sub-t-2-3"> 1971 <div class="nav__sub-t-wrap"> 1972 <ul class="nav__sub-t__items o-list-bare"> 1973 1974 1975 <li class="nav__sub-t__item"> 1976 <a href="/products/roosters-gift-voucher" class="nav__sub-t__link">- Online</a> 1977 </li> 1978 1979 <li class="nav__sub-t__item"> 1980 <a href="/products/taproom-gift-voucher" class="nav__sub-t__link">- Taproom</a> 1981 </li> 1982 1983 1984 </ul> 1985 </div> 1986 </div> 1987 1988 1989 </li> 1990 1991 <li class="nav__sub__item"> 1992 <a href="/collections/sale" class="nav__sub__link" aria-expanded="false" aria-controls="sub-t-2-4">Sale</a> 1993 1994 1995 1996 </li> 1997 1998 1999 </ul> 2000 2001 2002 2003 2004 2005 </div> 2006 </div> 2007 2008 2009 </li> 2010 2011 2012 <li class="primary-nav__item primary-nav__item--sub js-header-sub-link"> 2013 <a href="/pages/taproom" class="primary-nav__link animsition-link nav__link--sub js-header-sub-link-a" aria-expanded="false" aria-controls="sub-3">Taproom</a> 2014 2015 2016 <div class="nav__sub js-nav-sub" id="sub-3"> 2017 <div class="nav__sub-wrap"> 2018 2019 <ul class="nav__sub__items nav__sub__items--3 o-list-bare"> 2020 2021 2022 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 2023 <a href="/pages/taproom" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-3-1">Taproom Info</a> 2024 2025 2026 <div class="nav__sub-t js-nav-sub-t" id="sub-t-3-1"> 2027 <div class="nav__sub-t-wrap"> 2028 <ul class="nav__sub-t__items o-list-bare"> 2029 2030 2031 <li class="nav__sub-t__item"> 2032 <a href="/pages/taproom" class="nav__sub-t__link">- General Info [inc. Opening Times]</a> 2033 </li> 2034 2035 <li class="nav__sub-t__item"> 2036 <a href="/pages/taproom-food" class="nav__sub-t__link">- Street Food Kitchen</a> 2037 </li> 2038 2039 <li class="nav__sub-t__item"> 2040 <a href="/pages/taproom-loyalty" class="nav__sub-t__link">- Rooster Booster Loyalty Club</a> 2041 </li> 2042 2043
2043 <li class="nav__sub-t__item"> 2044 <a href="/pages/happy-hour" class="nav__sub-t__link">- Happy 'Hour'</a> 2045 </li> 2046 2047 2048 </ul> 2049 </div> 2050 </div> 2051 2052 2053 </li> 2054 2055 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 2056 <a href="/pages/events-calendar" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-3-2">Events</a> 2057 2058 2059 <div class="nav__sub-t js-nav-sub-t" id="sub-t-3-2"> 2060 <div class="nav__sub-t-wrap"> 2061 <ul class="nav__sub-t__items o-list-bare"> 2062 2063 2064 <li class="nav__sub-t__item"> 2065 <a href="/pages/events-calendar" class="nav__sub-t__link">- View All Events</a> 2066 </li> 2067 2068 <li class="nav__sub-t__item"> 2069 <a href="/pages/quiz-night" class="nav__sub-t__link">- Quiz Night</a> 2070 </li> 2071 2072 <li class="nav__sub-t__item"> 2073 <a href="/pages/really-funny-comedy" class="nav__sub-t__link">- Really Funny Comedy</a> 2074 </li> 2075 2076 <li class="nav__sub-t__item"> 2077 <a href="/pages/harrogate-folk-club" class="nav__sub-t__link">- Harrogate Folk Club</a> 2078 </li> 2079 2080 <li class="nav__sub-t__item"> 2081 <a href="https://www.eventbrite.co.uk/e/barrett-pugh-and-broad-live-at-roosters-tickets-1983566014345" class="nav__sub-t__link">- Serious Sam Barrett</a> 2082 </li> 2083 2084 <li class="nav__sub-t__item"> 2085 <a href="/products/beer_and_cheese_2026" class="nav__sub-t__link">- A Taste of Independent Harrogate</a> 2086 </li> 2087 2088 <li class="nav__sub-t__item"> 2089 <a href="https://hydefamilyjamshop.com/event/6572039/762673860/festive-fiesta" class="nav__sub-t__link">
2089- Hyde Family Jam Festive Fiesta</a> 2090 </li> 2091 2092 2093 </ul> 2094 </div> 2095 </div> 2096 2097 2098 </li> 2099 2100 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 2101 <a href="#" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-3-3">The Sample Room</a> 2102 2103 2104 <div class="nav__sub-t js-nav-sub-t" id="sub-t-3-3"> 2105 <div class="nav__sub-t-wrap"> 2106 <ul class="nav__sub-t__items o-list-bare"> 2107 2108 2109 <li class="nav__sub-t__item"> 2110 <a href="/pages/the-sample-room" class="nav__sub-t__link">- Private Parties</a> 2111 </li> 2112 2113 2114 </ul> 2115 </div> 2116 </div> 2117 2118 2119 </li> 2120 2121 2122 </ul> 2123 2124 2125 2126 2127 2128 </div> 2129 </div> 2130 2131 2132 </li> 2133 2134 2135 <li class="primary-nav__item"> 2136 <a href="/pages/swb-gallery" class="primary-nav__link animsition-link" >Suds With Buds</a> 2137 2138 2139 2140 </li> 2141 2142 2143 <li class="primary-nav__item primary-nav__item--sub js-header-sub-link"> 2144 <a href="/pages/core-range" class="primary-nav__link animsition-link nav__link--sub js-header-sub-link-a" aria-expanded="false" aria-controls="sub-5">Trade</a> 2145 2146 2147 <div class="nav__sub js-nav-sub" id="sub-5"> 2148 <div class="nav__sub-wrap"> 2149 2150 <ul class="nav__sub__items nav__sub__items--3 o-list-bare"> 2151 2152 2153 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 2154 <a href="/pages/core-range" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-5-1">Core Range</a> 2155 2156 2157 <div class="nav__sub-t js-nav-sub-t" id="sub-t-5-1"> 2158 <div class="nav__sub-t-wrap"> 2159 <ul class="nav__sub-t__items o-list-bare"> 2160 2161 2162 <li class="nav__sub-t__item"> 2163 <a href="/pages/core-range" class="nav__sub-t__link">- Modern Classics</a> 2164 </li> 2165 2166 2167 </ul> 2168 </div> 2169 </div> 2170 2171 2172 </li> 2173 2174 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 2175 <a href="#" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-5-2">Limited Release Beers</a> 2176 2177 2178 <div class="nav__sub-t js-nav-sub-t" id="sub-t-5-2"> 2179 <div class="nav__sub-t-wrap"> 2180 <ul class="nav__sub-t__items o-list-bare"> 2181 2182 2183 <li class="nav__sub-t__item"> 2184 <a href="https://www.roosters.co.uk/pages/limited-release-beers" class="nav__sub-t__link">- Current Availability</a> 2185 </li> 2186 2187 2188 </ul> 2189 </div> 2190 </div> 2191 2192 2193 </li> 2194 2195 <li class="nav__sub__item nav__sub__item--sub js-header-sub-t-link"> 2196 <a href="#" class="nav__sub__link js-header-sub-t-a" aria-expanded="false" aria-controls="sub-t-5-3">In The Trade?</a> 2197 2198 2199 <div class="nav__sub-t js-nav-sub-t" id="sub-t-5-3"> 2200 <div class="nav__sub-t-wrap"> 2201 <ul class="nav__sub-t__items o-list-bare"> 2202 2203 2204 <li class="nav__sub-t__item"> 2205 <a href="https://www.roosters.co.uk/pages/in-the-trade" class="nav__sub-t__link">- Stock Our Beer!</a> 2206 </li> 2207 2208 2209 </ul> 2210 </div> 2211 </div> 2212 2213 2214 </li> 2215 2216 2217 </ul> 2218 2219 2220 2221 2222 2223 </div> 2224 </div> 2225 2226 2227 </li> 2228 2229 2230 <li class="primary-nav__item"> 2231 <a href="/blogs/blog" class="primary-nav__link animsition-link" >Blog</a> 2232 2233 2234 2235 </li> 2236 2237 2238 <li class="primary-nav__item"> 2239 <a href="/pages/contact" class="primary-nav__link animsition-link" >Contact Us</a> 2240 2241 2242 2243 </li> 2244 2245 </ul> 2246 </nav> 2247 2248 <nav class="secondary-nav header-navs__items js-secondary-nav"> 2249 <ul class="secondary-nav__items"> 2250 2251 <li class="secondary-nav__item secondary-nav__item--light"> 2252 <a href="https://www.roosters.co.uk/customer_authentication/redirect?locale=en®ion_country=GB" class="secondary-nav__link">Log in</a> 2253 </li> 2254 2255 2256 2257 <li class="secondary-nav__item"> 2258 <a href="/cart" class="secondary-nav__link">Cart (<span id="CartCount">0</span>)</a> 2259 </li> 2260 2261 2262 <li class="secondary-nav__item secondary-nav__item--search"> 2263 <a href="/search" class="secondary-nav__link secondary-nav__link--search icon-fallback js-search-trigger js-no-transition"> 2264 <i class="icon icon--search" aria-hidden="true"></i>
2265 <span class="icon-fallback__text u-hidden-visually">Search</span> 2266 </a> 2267 </li> 2268 2269 2270 </ul> 2271 </nav> 2272 2273 </div> 2274</header>
2275<script> 2276var primaryNav = document.getElementsByClassName('js-primary-nav')[0]; 2277var primaryWidth = document.getElementsByClassName('js-primary-nav')[0].offsetWidth; 2278var navSpace = document.getElementsByClassName('js-heaver-navs')[0].offsetWidth / 2 - document.getElementsByClassName('js-main-logo')[0].offsetWidth / 2 - 18; 2279if (document.getElementsByClassName('js-header')[0].classList.contains('header--left')) { 2280 if (navSpace < primaryWidth) { 2281 document.getElementsByClassName('js-header')[0].classList.add('header--inline-icons'); 2282 } 2283} 2284 2285//set header height variables 2286function setHeightVar() { 2287 var announcementHeight; 2288 if (document.querySelector('.js-announcement') != null) { 2289 announcementHeight = document.querySelector('.js-announcement').offsetHeight; 2290 } else { 2291 announcementHeight = 0; 2292 } 2293 var headerHeight = document.querySelector('.js-header').offsetHeight; 2294 2295 document.documentElement.style.setProperty('--header-height', headerHeight + 'px'); 2296 document.documentElement.style.setProperty('--header-full-height', announcementHeight + headerHeight + 'px'); 2297} 2298setHeightVar(); 2299setTimeout(function() { 2300 setHeightVar(); 2301}, 500); 2302</script>
2302 2303</div> 2304 2305 <div class="main" id="main"> 2306 <!--LayoutHub-Workspace-Start--><div id="shopify-section-template--15739191034109__main" class="shopify-section js-section__search"><style> 2307.mfp-container .collection-sidebar, 2308.mfp-container .collection-sidebar .mfp-close { 2309 background-color: #f0f0f0; 2310} 2311</style><section class="section section--search search-page" data-section-id="template--15739191034109__main" data-section-type="search-template"> 2312 2313 <div class="collection collection--sidebar-sidebar"> 2314 2315 <div class="container container--default"> 2316 2317 <div class="section__title section__title--center"> 2318 <h1 class="section__title-text h2">Search our store</h1> 2319 </div> 2320 2321 <form action="/search" method="get" class="search-page__form" role="search"> 2322 2323 <input type="hidden" name="type" value="product,article,page"> 2324 2325 <input type="search" name="q" value="" placeholder="Search our store..." class="search-page__form-input" aria-label="Search our store..."> 2326 2327 <button type="submit" class="search-page__form-submit"> 2328 <i class="icon icon--search" aria-hidden="true"></i> 2329 <span class="icon-fallback__text">Search</span> 2330 </button> 2331 </form></div> 2332 2333 </div> 2334</section> 2335 2336</div><!--LayoutHub-Workspace-End--> 2337 </div> 2338 2339 <div id="shopify-section-footer-newsletter" class="shopify-section js-section__footer-newsletter"><style type="text/css"> 2340 .section--footer-newsletter .newsletter { 2341 background-color: #ffffff; 2342 } 2343</style> 2344 2345 2346 2347 <section class="section section--footer-newsletter"> 2348 <div class="container"> 2349 2350 <div class="newsletter newsletter--default"> 2351 <div class="newsletter__content"> 2352 2353 <div class="newsletter__title section__title section__title--center section__title--desc"> 2354 2355 <h2 class="section__title-text">Sign Up To Our Mailing List</h2> 2356 2357 2358 <div class="section__title-desc rte"><p>Join our web shop & Taproom mailing list to be among the first to find out about new releases, events & to receive exclusive discounts from time to time too!</p></div> 2359 2360 </div> 2361 2362 <div class="newsletter__form-wrapper"> 2363 <form method="post" action="/contact#newsletter" id="newsletter" accept-charset="UTF-8" class="newsletter__form-form"><input type="hidden" name="form_type" value="customer" /><input type="hidden" name="utf8" value="â" /> 2364 2365 2366 <div class="o-layout o-layout--flush"> 2367 <div class="o-layout__item u-1/1 u-2/3@tab"> 2368 <input type="hidden" name="contact[tags]" value="newsletter"> 2369 <label for="Email-Footer" class="u-hidden-visually">Email</label> 2370 <input type="email" 2371 name="contact[email]" 2372 id="Email-Footer" 2373 class="newsletter__input" 2374 value="" 2375 placeholder="[email protected]" 2376 autocorrect="off" 2377 autocapitalize="off"> 2378 </div> 2379 <div class="o-layout__item u-1/1 u-1/3@tab"> 2380 <button type="submit" class="c-btn c-btn--full c-btn--primary c-btn--arrow newsletter__btn" name="commit" id="Subscribe-Footer">Subscribe</button> 2381 </div> 2382 </div> 2383 2384 </form> 2385 </div> 2386 </div> 2387 </div> 2388 </div> 2389 </section> 2390 2391 2392 2393</div> 2394 <div id="shopify-section-footer" class="shopify-section js-section__footer"><style type="text/css"> 2395 .footer { 2396 background-color: #222222; 2397 2398 } 2399 .footer__bottom { 2400 background-color: #151515; 2401 } 2402</style> 2403<footer role="contentinfo" id="footer" class="footer footer--light"> 2404 <div class="container">
2405 <div class="footer__content"> 2406 <div class="o-layout"> 2407 2408 2409 2410 2411 2412 <div class="o-layout__item u-1/1 u-1/2@tab u-1/3@desk" > 2413 <div class="footer-nav"> 2414 2415 <h3 class="footer-nav__title h5">Contact</h3> 2416 2417 2418 2419 <p class="footer-nav__text"><a aria-label="Call" href="tel:01423865959" class="footer-nav__text-link">01423865959</a></p> 2420 2421 2422 <p class="footer-nav__text footer-nav__text--address"> 2423 Unit H5, Fifth Avenue, Hornbeam Park<br/> 2424 Harrogate England<br/> 2425 HG2 8QT United Kingdom 2426 </p> 2427 2428 2429 <div class="footer-nav__social-wrapper"> 2430 <ul class="footer-nav__social-items o-list-bare"> 2431 2432 <li class="footer-nav__social-item"> 2433 <a href="https://facebook.com/RoostersBrewCo" class="footer-nav__social-link icon-fallback" target="_blank" rel="noopener"> 2434 <i class="icon icon--facebook" aria-hidden="true"></i> 2435 <span class="icon-fallback__text">Facebook</span> 2436 </a> 2437 </li> 2438 2439 2440 <li class="footer-nav__social-item"> 2441 <a href="https://twitter.com/RoostersBrewCo" class="footer-nav__social-link icon-fallback" target="_blank" rel="noopener"> 2442 <i class="icon icon--twitter" aria-hidden="true"></i> 2443 <span class="icon-fallback__text">Twitter</span> 2444 </a> 2445 </li> 2446 2447 2448 2449 <li class="footer-nav__social-item"> 2450 <a href="http://instagram.com/RoostersBrewCo" class="footer-nav__social-link icon-fallback" target="_blank" rel="noopener"> 2451 <i class="icon icon--instagram" aria-hidden="true"></i> 2452 <span class="icon-fallback__text">Instagram</span> 2453 </a> 2454 </li> 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 </ul> 2465 </div> 2466 2467 2468 </div> 2469 </div> 2470 2471 2472 2473 2474 2475 2476 2477 2478 <div class="o-layout__item u-1/1 u-1/2@tab u-1/3@desk" > 2479 <div class="footer-nav"> 2480 2481 <ul class="footer-nav__items o-list-bare"> 2482 2483 <li class="footer-nav__item footer-nav__item--active"><a href="/search" class="footer-nav__link">Search</a></li> 2484 2485 <li class="footer-nav__item"><a href="/pages/faq" class="footer-nav__link">FAQ</a></li> 2486 2487 <li class="footer-nav__item"><a href="/pages/terms-conditions" class="footer-nav__link">Terms & Conditions</a></li> 2488 2489 <li class="footer-nav__item"><a href="/pages/privacy-policy" class="footer-nav__link">Privacy Policy</a></li> 2490 2491 <li class="footer-nav__item"><a href="/pages/delivery-info" class="footer-nav__link">Delivery Info</a></li> 2492 2493 <li class="footer-nav__item"><a href="/pages/payments" class="footer-nav__link">Payments</a></li> 2494 2495 <li class="footer-nav__item"><a href="/pages/returns-exchanges" class="footer-nav__link">Returns & Exchanges</a></li> 2496 2497 <li class="footer-nav__item"><a href="/policies/terms-of-service" class="footer-nav__link">Terms of Service</a></li> 2498 2499 <li class="footer-nav__item"><a href="/policies/refund-policy" class="footer-nav__link">Refund policy</a></li> 2500 2501 </ul> 2502 </div> 2503 </div> 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 <div class="o-layout__item u-1/1 u-1/2@tab u-1/3@desk" > 2516 <div class="footer-nav"> 2517 2518 2519 </div> 2520 </div> 2521 2522 2523 2524 2525 2526 </div> 2527 </div> 2528 </div> 2529 2530 <div class="footer__bottom"> 2531 <div class="container container--full"> 2532 2533 <div class="footer__bottom__left"><div class="footer__icons footer__bottom__left-item"> 2534 2535<ul class="footer__icons-items o-list-bare"> 2536 2537 <li class="footer__icons-item"> 2538 <svg class="payment-icon" xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 38 24" width="38" height="24" fill="none" aria-labelledby="pi-american_express"><title id="pi-american_express">American Express</title><rect x=".5" y=".5" width="37" height="23" rx="2.5" stroke="#000" stroke-opacity=".07" fill="none"/><path d="M35 0H3C1.3 0 0 1.3 0 3V21C0 22.7 1.4 24 3 24H35C36.7 24 38 22.7 38 21V3C38 1.3 36.6 0 35 0Z" fill="#0071CE" style="fill:#0071CE;fill:color(display-p3 0.0000 0.4431 0.8078);fill-opacity:1;"/>
2538<path d="M3 0.5H35C36.3348 0.5 37.5 1.58692 37.5 3V21C37.5 22.4239 36.4239 23.5 35 23.5H3C1.66524 23.5 0.5 22.4131 0.5 21V3C0.5 1.57614 1.57614 0.5 3 0.5Z" stroke="black" stroke-opacity="0.07" style="stroke:black;stroke-opacity:0.07;"/><path d="M25.8662 6.33203V3H31L31.8662 5.5332L32.7334 3H37V14.2002H36.7998L34.8672 16.2656L36.7998 18.3594H37V21.2666H33.5996L31.9336 19.3994L30.2002 21.2666H19.4668V12.666H16L20.2666 3H24.4004L25.8662 6.33203ZM20.5996 20.2656H27V18.5322H22.666V17.3994H26.8662V15.666H22.666V14.5322H27V12.7988H20.5996V20.2656ZM30.5332 16.5322L27 20.2656H29.5996L31.8662 17.8662L34.0664 20.2656H36.7324L33.1992 16.4658L36.7324 12.7988H34.1328L31.8662 15.1992L29.7324 12.7988H27L30.5332 16.5322ZM17.666 11.7324H19.9326L20.5332 10.1992H23.999L24.666 11.7324H26.999L23.666 4.19922H20.999L17.666 11.7324ZM33.5996 4.19922L31.9326 8.86621L30.1992 4.19922H27V11.666H29.0664V6.39941L31 11.666H32.7998L34.7324 6.39941V11.666H36.7324V4.13281L33.5996 4.19922ZM23.2656 8.46582H21.2656L22.2656 5.99902L23.2656 8.46582Z" fill="white" style="fill:white;fill-opacity:1;"/></svg> 2539 2540 </li> 2541 2542 <li class="footer__icons-item"> 2543 <svg class="payment-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" role="img" x="0" y="0" width="38" height="24" viewBox="0 0 165.521 105.965" xml:space="preserve" aria-labelledby="pi-apple_pay"><title id="pi-apple_pay">Apple Pay</title><path fill="#000" d="M150.698 0H14.823c-.566 0-1.133 0-1.698.003-.477.004-.953.009-1.43.022-1.039.028-2.087.09-3.113.274a10.51 10.51 0 0 0-2.958.975 9.932 9.932 0 0 0-4.35 4.35 10.463 10.463 0 0 0-.975 2.96C.113 9.611.052 10.658.024 11.696a70.22 70.22 0 0 0-.022 1.43C0 13.69 0 14.256 0 14.823v76.318c0 .567 0 1.132.002 1.699.003.476.009.953.022 1.43.028 1.036.09 2.084.275 3.11a10.46 10.46 0 0 0 .974 2.96 9.897 9.897 0 0 0 1.83 2.52 9.874 9.874 0 0 0 2.52 1.83c.947.483 1.917.79 2.96.977 1.025.183 2.073.245 3.112.273.477.011.953.017 1.43.02.565.004 1.132.004 1.698.004h135.875c.565 0 1.132 0 1.697-.004.476-.002.952-.009 1.431-.02 1.037-.028 2.085-.09 3.113-.273a10.478 10.478 0 0 0 2.958-.977 9.955 9.955 0 0 0 4.35-4.35c.483-.947.789-1.917.974-2.96.186-1.026.246-2.074.274-3.11.013-.477.02-.954.022-1.43.004-.567.004-1.132.004-1.699V14.824c0-.567 0-1.133-.004-1.699a63.067 63.067 0 0 0-.022-1.429c-.028-1.038-.088-2.085-.274-3.112a10.4 10.4 0 0 0-.974-2.96 9.94 9.94 0 0 0-4.35-4.35A10.52 10.52 0 0 0 156.939.3c-1.028-.185-2.076-.246-3.113-.274a71.417 71.417 0 0 0-1.431-.022C151.83 0 151.263 0 150.698 0z" /><path fill="#FFF" d="M150.698 3.532l1.672.003c.452.003.905.008 1.36.02.793.022 1.719.065 2.583.22.75.135 1.38.34 1.984.648a6.392 6.392 0 0 1 2.804 2.807c.306.6.51 1.226.645 1.983.154.854.197 1.783.218 2.58.013.45.019.9.02 1.36.005.557.005 1.113.005 1.671v76.318c0 .558 0 1.114-.004 1.682-.002.45-.008.9-.02 1.35-.022.796-.065 1.725-.221 2.589a6.855 6.855 0 0 1-.645 1.975 6.397 6.397 0 0 1-2.808 2.807c-.6.306-1.228.511-1.971.645-.881.157-1.847.2-2.574.22-.457.01-.912.017-1.379.019-.555.004-1.113.004-1.669.004H14.801c-.55 0-1.1 0-1.66-.004a74.993 74.993 0 0 1-1.35-.018c-.744-.02-1.71-.064-2.584-.22a6.938 6.938 0 0 1-1.986-.65 6.337 6.337 0 0 1-1.622-1.18 6.355 6.355 0 0 1-1.178-1.623 6.935 6.935 0 0 1-.646-1.985c-.156-.863-.2-1.788-.22-2.578a66.088 66.088 0 0 1-.02-1.355l-.003-1.327V14.474l.002-1.325a66.7 66.7 0 0 1 .02-1.357c.022-.792.065-1.717.222-2.587a6.924 6.924 0 0 1 .646-1.981c.304-.598.7-1.144 1.18-1.623a6.386 6.386 0 0 1 1.624-1.18 6.96 6.96 0 0 1 1.98-.646c.865-.155 1.792-.198 2.586-.22.452-.012.905-.017 1.354-.02l1.677-.003h135.875" /><g><g><path fill="#000" d="M43.508 35.77c1.404-1.755 2.356-4.112 2.105-6.52-2.054.102-4.56 1.355-6.012 3.112-1.303 1.504-2.456 3.959-2.156 6.266 2.306.2 4.61-1.152 6.063-2.858" /><path fill="#000" d="M45.587 39.079c-3.35-.2-6.196 1.9-7.795 1.9-1.6 0-4.049-1.8-6.698-1.751-3.447.05-6.645 2-8.395 5.1-3.598 6.2-.95 15.4 2.55 20.45 1.699 2.5 3.747 5.25 6.445 5.151 2.55-.1 3.549-1.65 6.647-1.65 3.097 0 3.997 1.65 6.696 1.6 2.798-.05 4.548-2.5 6.247-5 1.95-2.85 2.747-5.6 2.797-5.75-.05-.05-5.396-2.101-5.446-8.251-.05-5.15 4.198-7.6 4.398-7.751-2.399-3.548-6.147-3.948-7.447-4.048" /></g><g><path fill="#000" d="M78.973 32.11c7.278 0 12.347 5.017 12.347 12.321 0 7.33-5.173 12.373-12.529 12.373h-8.058V69.62h-5.822V32.11h14.062zm-8.24 19.807h6.68c5.07 0 7.954-2.729 7.954-7.46 0-4.73-2.885-7.434-7.928-7.434h-6.706v14.894z" />
2543<path fill="#000" d="M92.764 61.847c0-4.809 3.665-7.564 10.423-7.98l7.252-.442v-2.08c0-3.04-2.001-4.704-5.562-4.704-2.938 0-5.07 1.507-5.51 3.82h-5.252c.157-4.86 4.731-8.395 10.918-8.395 6.654 0 10.995 3.483 10.995 8.89v18.663h-5.38v-4.497h-.13c-1.534 2.937-4.914 4.782-8.579 4.782-5.406 0-9.175-3.222-9.175-8.057zm17.675-2.417v-2.106l-6.472.416c-3.64.234-5.536 1.585-5.536 3.95 0 2.288 1.975 3.77 5.068 3.77 3.95 0 6.94-2.522 6.94-6.03z" /><path fill="#000" d="M120.975 79.652v-4.496c.364.051 1.247.103 1.715.103 2.573 0 4.029-1.09 4.913-3.899l.52-1.663-9.852-27.293h6.082l6.863 22.146h.13l6.862-22.146h5.927l-10.216 28.67c-2.34 6.577-5.017 8.735-10.683 8.735-.442 0-1.872-.052-2.261-.157z" /></g></g></svg> 2544 2545 </li> 2546 2547 <li class="footer__icons-item"> 2548 <svg class="payment-icon" xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 38 24" width="38" height="24" aria-labelledby="pi-google_pay"><title id="pi-google_pay">Google Pay</title><path d="M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z" fill="#000" opacity=".07"/><path d="M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32" fill="#FFF"/><path d="M18.093 11.976v3.2h-1.018v-7.9h2.691a2.447 2.447 0 0 1 1.747.692 2.28 2.28 0 0 1 .11 3.224l-.11.116c-.47.447-1.098.69-1.747.674l-1.673-.006zm0-3.732v2.788h1.698c.377.012.741-.135 1.005-.404a1.391 1.391 0 0 0-1.005-2.354l-1.698-.03zm6.484 1.348c.65-.03 1.286.188 1.778.613.445.43.682 1.03.65 1.649v3.334h-.969v-.766h-.049a1.93 1.93 0 0 1-1.673.931 2.17 2.17 0 0 1-1.496-.533 1.667 1.667 0 0 1-.613-1.324 1.606 1.606 0 0 1 .613-1.336 2.746 2.746 0 0 1 1.698-.515c.517-.02 1.03.093 1.49.331v-.208a1.134 1.134 0 0 0-.417-.901 1.416 1.416 0 0 0-.98-.368 1.545 1.545 0 0 0-1.319.717l-.895-.564a2.488 2.488 0 0 1 2.182-1.
254806zM23.29 13.52a.79.79 0 0 0 .337.662c.223.176.5.269.785.263.429-.001.84-.17 1.146-.472.305-.286.478-.685.478-1.103a2.047 2.047 0 0 0-1.324-.374 1.716 1.716 0 0 0-1.03.294.883.883 0 0 0-.392.73zm9.286-3.75l-3.39 7.79h-1.048l1.281-2.728-2.224-5.062h1.103l1.612 3.885 1.569-3.885h1.097z" fill="#5F6368"/><path d="M13.986 11.284c0-.308-.024-.616-.073-.92h-4.29v1.747h2.451a2.096 2.096 0 0 1-.9 1.373v1.134h1.464a4.433 4.433 0 0 0 1.348-3.334z" fill="#4285F4"/><path d="M9.629 15.721a4.352 4.352 0 0 0 3.01-1.097l-1.466-1.14a2.752 2.752 0 0 1-4.094-1.44H5.577v1.17a4.53 4.53 0 0 0 4.052 2.507z" fill="#34A853"/><path d="M7.079 12.05a2.709 2.709 0 0 1 0-1.735v-1.17H5.577a4.505 4.505 0 0 0 0 4.075l1.502-1.17z" fill="#FBBC04"/><path d="M9.629 8.44a2.452 2.452 0 0 1 1.74.68l1.3-1.293a4.37 4.37 0 0 0-3.065-1.183 4.53 4.53 0 0 0-4.027 2.5l1.502 1.171a2.715 2.715 0 0 1 2.55-1.875z" fill="#EA4335"/></svg> 2549 2550 </li> 2551 2552 <li class="footer__icons-item"> 2553 <svg class="payment-icon" xmlns="http://www.w3.org/2000/svg" role="img" width="38" height="24" viewBox="0 0 38 24" aria-labelledby="pi-klarna" fill="none"><title id="pi-klarna">Klarna</title><rect width="38" height="24" rx="2" fill="#FFA8CD"/><rect x=".5" y=".5" width="37" height="23" rx="1.5" stroke="#000" stroke-opacity=".07"/><path d="M30.62 14.755c-.662 0-1.179-.554-1.179-1.226 0-.673.517-1.226 1.18-1.226.663 0 1.18.553 1.18 1.226 0 .672-.517 1.226-1.18 1.226zm-.33 1.295c.565 0 1.286-.217 1.686-1.068l.04.02c-.176.465-.176.742-.176.81v.11h1.423v-4.786H31.84v.109c0 .069 0 .346.175.81l-.039.02c-.4-.85-1.121-1.068-1.687-1.068-1.355 0-2.31 1.088-2.31 2.522 0 1.433.955 2.521 2.31 2.521zm-4.788-5.043c-.643 0-1.15.228-1.56 1.068l-.039-.02c.175-.464.175-.741.175-.81v-.11h-1.423v4.787h1.462V13.4c0-.662.38-1.078.995-1.078.614 0 .917.356.917 1.068v2.532h1.462v-3.046c0-1.088-.838-1.869-1.989-1.869zm-4.963 1.068l-.039-.02c.176-.464.176-.741.176-.81v-.11h-1.424v4.787h1.463l.01-2.304c0-.673.35-1.078.926-1.078.156 0 .282.02.429.06v-1.464c-.644-.139-1.22.109-1.54.94zm-4.65 2.68c-.664 0-1.18-.554-1.18-1.226 0-.673.516-1.226 1.18-1.226.662 0 1.179.553 1.179 1.226 0 .672-.517 1.226-1.18 1.226zm-.332 1.295c.565 0 1.287-.217 1.687-1.068l.038.02c-.175.465-.175.742-.175.81v.11h1.424v-4.786h-1.424v.109c0 .069 0 .346.175.81l-.038.02c-.4-.85-1.122-1.068-1.687-1.068-1.356 0-2.311 1.088-2.311 2.522 0 1.433.955 2.521 2.31 2.521zm-4.349-.128h1.463V9h-1.463v6.922zM10.136 9H8.644c0 1.236-.751 2.343-1.892 3.134l-.448.317V9h-1.55v6.922h1.55V12.49l2.564 3.43h1.892L8.293 12.64c1.121-.82 1.852-2.096 1.843-3.639z" fill="#0B051D"/></svg> 2554 </li> 2555 2556 <li class="footer__icons-item"> 2557 <svg class="payment-icon" viewBox="0 0 38 24" xmlns="http://www.w3.org/2000/svg" width="38" height="24" role="img" aria-labelledby="pi-maestro"><title id="pi-maestro">Maestro</title><path opacity=".07" d="M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z"/><path fill="#fff" d="M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32"/><circle fill="#EB001B" cx="15" cy="12" r="7"/><circle fill="#00A2E5" cx="23" cy="12" r="7"/><path fill="#7375CF" d="M22 12c0-2.4-1.2-4.5-3-5.7-1.8 1.3-3 3.4-3 5.7s1.2 4.5 3 5.7c1.8-1.2 3-3.3 3-5.7z"/></svg> 2558 </li> 2559 2560 <li class="footer__icons-item"> 2561 <svg class="payment-icon" xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 38 24" width="38" height="24" fill="none" aria-labelledby="pi-master"><title id="pi-master">Mastercard</title><rect x=".5" y=".5" width="37" height="23" rx="2.5" stroke="#000" stroke-opacity=".07" fill="none"/><path d="M35 0H3C1.3 0 0 1.3 0 3V21C0 22.7 1.4 24 3 24H35C36.7 24 38 22.7 38 21V3C38 1.3 36.6 0 35 0Z" fill="#1C1C1C" style="fill:#1C1C1C;fill:color(display-p3 0.1098 0.1098 0.1098);fill-opacity:1;"/>
2561<path d="M35 1C36.1 1 37 1.9 37 3V21C37 22.1 36.1 23 35 23H3C1.9 23 1 22.1 1 21V3C1 1.9 1.9 1 3 1H35Z" fill="#232323" style="fill:#232323;fill:color(display-p3 0.1373 0.1373 0.1373);fill-opacity:1;"/><path d="M14.6364 19.2727C18.8538 19.2727 22.2727 15.8538 22.2727 11.6364C22.2727 7.41892 18.8538 4 14.6364 4C10.4189 4 7 7.41892 7 11.6364C7 15.8538 10.4189 19.2727 14.6364 19.2727Z" fill="#EB001B" style="fill:#EB001B;fill:color(display-p3 0.9216 0.0000 0.1059);fill-opacity:1;"/><path d="M23.3637 19.2727C27.5811 19.2727 31 15.8538 31 11.6364C31 7.41892 27.5811 4 23.3637 4C19.1462 4 15.7273 7.41892 15.7273 11.6364C15.7273 15.8538 19.1462 19.2727 23.3637 19.2727Z" fill="#F79E1B" style="fill:#F79E1B;fill:color(display-p3 0.9686 0.6196 0.1059);fill-opacity:1;"/><path d="M22.2727 11.6362C22.2727 9.01797 20.9637 6.72706 19 5.41797C17.0364 6.83615 15.7273 9.12706 15.7273 11.6362C15.7273 14.1452 17.0364 16.5452 19 17.8543C20.9637 16.5452 22.2727 14.2543 22.2727 11.6362Z" fill="#FF5F00" style="fill:#FF5F00;fill:color(display-p3 1.0000 0.3725 0.0000);fill-opacity:1;"/></svg> 2562 2563 </li> 2564 2565 <li class="footer__icons-item"> 2566 <svg class="payment-icon" xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 38 24" width="38" height="24" aria-labelledby="pi-shopify_pay"><title id="pi-shopify_pay">Shop Pay</title><path opacity=".07" d="M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z" fill="#000"/><path d="M35.889 0C37.05 0 38 .982 38 2.182v19.636c0 1.2-.95 2.182-2.111 2.182H2.11C.95 24 0 23.018 0 21.818V2.182C0 .982.95 0 2.111 0H35.89z" fill="#5A31F4"/><path d="M9.35 11.368c-1.017-.223-1.47-.31-1.47-.705 0-.372.306-.558.92-.558.54 0 .934.238 1.225.704a.079.079 0 00.104.03l1.146-.584a.082.082 0 00.032-.114c-.475-.831-1.353-1.286-2.51-1.286-1.52 0-2.464.755-2.464 1.956 0 1.275 1.15 1.597 2.17 1.82 1.02.222 1.474.31 1.474.705 0 .396-.332.582-.993.582-.612 0-1.065-.282-1.34-.83a.08.08 0 00-.107-.035l-1.143.57a.083.083 0 00-.036.111c.454.92 1.384 1.437 2.627 1.437 1.583 0 2.539-.742 2.539-1.98s-1.155-1.598-2.173-1.82v-.003zM15.49 8.855c-.65 0-1.224.232-1.636.646a.04.04 0 01-.069-.03v-2.64a.08.08 0 00-.08-.081H12.27a.08.08 0 00-.08.082v8.194a.08.08 0 00.08.082h1.433a.08.08 0 00.081-.082v-3.594c0-.695.528-1.227 1.239-1.227.71 0 1.226.521 1.226 1.227v3.594a.08.08 0 00.081.082h1.433a.08.08 0 00.081-.082v-3.594c0-1.51-.981-2.577-2.355-2.577zM20.753 8.62c-.778 0-1.507.24-2.03.588a.082.082 0 00-.027.109l.632 1.088a.08.08 0 00.11.03 2.5 2.5 0 011.318-.366c1.25 0 2.17.891 2.17 2.068 0 1.003-.736 1.745-1.669 1.745-.76 0-1.288-.446-1.288-1.077 0-.361.152-.657.548-.866a.08.08 0 00.032-.113l-.596-1.018a.08.08 0 00-.098-.035c-.799.299-1.359 1.018-1.359 1.984 0 1.46 1.152 2.55 2.76 2.55 1.877 0 3.227-1.313 3.227-3.195 0-2.018-1.57-3.492-3.73-3.492zM28.675 8.843c-.724 0-1.373.27-1.845.746-.026.027-.069.007-.069-.029v-.572a.08.08 0 00-.08-.082h-1.397a.08.08 0 00-.08.082v8.182a.08.08 0 00.08.081h1.433a.08.08 0 00.081-.081v-2.683c0-.036.043-.054.069-.03a2.6 2.6 0 001.808.7c1.682 0 2.993-1.373 2.993-3.157s-1.313-3.157-2.993-3.157zm-.271 4.929c-.956 0-1.681-.768-1.681-1.783s.723-1.783 1.681-1.783c.958 0 1.68.755 1.68 1.783 0 1.027-.713 1.783-1.681 1.783h.001z" fill="#fff"/></svg> 2567 2568 </li> 2569 2570 <li class="footer__icons-item"> 2571 <svg class="payment-icon" viewBox="-36 25 38 24" xmlns="http://www.w3.org/2000/svg" width="38" height="24" role="img" aria-labelledby="pi-unionpay"><title id="pi-unionpay">Union Pay</title><path fill="#005B9A" d="M-36 46.8v.7-.7zM-18.3 25v24h-7.2c-1.3 0-2.1-1-1.8-2.3l4.4-19.4c.3-1.3 1.9-2.3 3.2-2.3h1.4zm12.6 0c-1.3 0-2.9 1-3.2 2.3l-4.5 19.4c-.3 1.3.5 2.3 1.8 2.3h-4.9V25h10.8z"/><path fill="#E9292D" d="M-19.7 25c-1.3 0-2.9 1.1-3.2 2.3l-4.4 19.4c-.3 1.3.5 2.3 1.8 2.3h-8.9c-.8 0-1.5-.6-1.5-1.4v-21c0-.8.7-1.6 1.5-1.6h14.7z"/><path fill="#0E73B9" d="M-5.7 25c-1.3 0-2.9 1.1-3.2 2.3l-4.4 19.4c-.3 1.3.5 2.3 1.8 2.3H-26h.5c-1.3 0-2.1-1-1.8-2.3l4.4-19.4c.3-1.3 1.9-2.3 3.2-2.3h14z"/><path fill="#059DA4" d="M2 26.6v21c0 .8-.6 1.4-1.5 1.4h-12.1c-1.3 0-2.1-1.1-1.8-2.3l4.5-19.4C-8.6 26-7 25-5.7 25H.5c.9 0 1.5.7 1.5 1.6z"/><path fill="#fff" d="M-21.122 38.645h.14c.14 0 .28-.07.28-.14l.42-.63h1.19l-.21.35h1.4l-.21.63h-1.68c-.21.28-.42.42-.7.42h-.84l.21-.63m-.21.91h3.01l-.21.7h-1.19l-.21.7h1.19l-.21.7h-1.19l-.28 1.05c-.07.14 0 .28.28.21h.98l-.21.7h-1.89c-.35 0-.49-.21-.35-.63l.35-1.33h-.77l.21-.7h.77l.21-.7h-.7l.21-.7zm4.83-1.75v.42s.56-.42 1.12-.42h1.96l-.77 2.66c-.07.28-.35.49-.77.49h-2.24l-.49 1.89c0 .07 0 .14.14.14h.42l-.14.56h-1.12c-.42 0-.56-.14-.49-.35l1.47-5.39h.91zm1.68.77h-1.75l-.21.7s.28-.21.77-.21h1.05l.14-.49zm-.63 1.68c.14 0 .21 0 .21-.14l.14-.35h-1.75l-.14.56 1.54-.07zm-1.19.84h.98v.42h.28c.14 0 .21-.07.21-.14l.07-.28h.84l-.14.49c-.07.35-.35.49-.77.56h-.56v.77c0 .14.07.21.35.21h.49l-.14.56h-1.19c-.35 0-.49-.14-.49-.49l.07-2.1zm4.2-2.45l.21-.84h1.19l-.07.28s.56-.28 1.05-.28h1.47l-.21.84h-.21l-1.12 3.85
2571h.21l-.21.77h-.21l-.07.35h-1.19l.07-.35h-2.17l.21-.77h.21l1.12-3.85h-.28m1.26 0l-.28 1.05s.49-.21.91-.28c.07-.35.21-.77.21-.77h-.84zm-.49 1.54l-.28 1.12s.56-.28.98-.28c.14-.42.21-.77.21-.77l-.91-.07zm.21 2.31l.21-.77h-.84l-.21.77h.84zm2.87-4.69h1.12l.07.42c0 .07.07.14.21.14h.21l-.21.7h-.77c-.28 0-.49-.07-.49-.35l-.14-.91zm-.35 1.47h3.57l-.21.77h-1.19l-.21.7h1.12l-.21.77h-1.26l-.28.42h.63l.14.84c0 .07.07.14.21.14h.21l-.21.7h-.7c-.35 0-.56-.07-.56-.35l-.14-.77-.56.84c-.14.21-.35.35-.63.35h-1.05l.21-.7h.35c.14 0 .21-.07.35-.21l.84-1.26h-1.05l.21-.77h1.19l.21-.7h-1.19l.21-.77zm-19.74-5.04c-.14.7-.42 1.19-.91 1.54-.49.35-1.12.56-1.89.56-.7 0-1.26-.21-1.54-.56-.21-.28-.35-.56-.35-.98 0-.14 0-.35.07-.56l.84-3.92h1.19l-.77 3.92v.28c0 .21.07.35.14.49.14.21.35.28.7.28s.7-.07.91-.28c.21-.21.42-.42.49-.77l.77-3.92h1.19l-.84 3.92m1.12-1.54h.84l-.07.49.14-.14c.28-.28.63-.42 1.05-.42.35 0 .63.14.77.35.14.21.21.49.14.91l-.49 2.38h-.91l.42-2.17c.07-.28.07-.49 0-.56-.07-.14-.21-.14-.35-.14-.21 0-.42.07-.56.21-.14.14-.28.35-.28.63l-.42 2.03h-.91l.63-3.57m9.8 0h.84l-.07.49.14-.14c.28-.28.63-.42 1.05-.42.35 0 .63.14.77.35s.21.49.14.91l-.49 2.38h-.91l.42-2.24c.07-.21 0-.42-.07-.49-.07-.14-.21-.14-.35-.14-.21 0-.42.07-.56.21-.14.14-.28.35-.28.63l-.42 2.03h-.91l.7-3.57m-5.81 0h.98l-.77 3.5h-.98l.77-3.5m.35-1.33h.98l-.21.84h-.98l.21-.84zm1.4 4.55c-.21-.21-.35-.56-.35-.98v-.21c0-.07 0-.21.07-.28.14-.56.35-1.05.7-1.33.35-.35.84-.49 1.33-.49.42 0 .77.14 1.05.35.21.21.35.56.35.98v.21c0 .07 0 .21-.07.28-.14.56-.35.98-.7 1.33-.35.35-.84.49-1.33.49-.35 0-.7-.14-1.05-.35m1.89-.7c.14-.21.28-.49.35-.84v-.35c0-.21-.07-.35-.14-.49a.635.635 0 0 0-.49-.21c-.28 0-.49.07-.63.28-.14.21-.28.49-.35.84v.28c0 .21.07.35.14.49.14.14.28.21.49.21.28.07.42 0 .63-.21m6.51-4.69h2.52c.49 0 .84.14 1.12.35.28.21.35.56.35.91v.28c0 .07 0 .21-.07.28-.07.49-.35.98-.7 1.26-.42.35-.84.49-1.4.49h-1.4l-.42 2.03h-1.19l1.19-5.6m.56 2.59h1.12c.28 0 .49-.07.7-.21.14-.14.28-.35.35-.63v-.28c0-.21-.07-.35-.21-.42-.14-.07-.35-.14-.7-.14h-.91l-.35 1.68zm8.68 3.71c-.35.77-.7 1.26-.91 1.47-.21.21-.63.7-1.61.7l.07-.63c.84-.28 1.26-1.4 1.54-1.96l-.28-3.78h1.19l.07 2.38.91-2.31h1.05l-2.03 4.13m-2.94-3.85l-.42.28c-.42-.35-.84-.56-1.54-.21-.98.49-1.89 4.13.91 2.94l.14.21h1.12l.7-3.29-.91.07m-.56 1.82c-.21.56-.56.84-.91.77-.28-.14-.35-.63-.21-1.19.21-.56.56-.84.91-.77.28.14.35.63.21 1.19"/></svg> 2572 </li> 2573 2574 <li class="footer__icons-item"> 2575 <svg class="payment-icon" xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 38 24" width="38" height="24" fill="none" aria-labelledby="pi-visa"><title id="pi-visa">Visa</title><rect x=".5" y=".5" width="37" height="23" rx="2.5" stroke="#000" stroke-opacity=".07" fill="none"/><path d="M35 0H3C1.3 0 0 1.3 0 3V21C0 22.7 1.4 24 3 24H35C36.7 24 38 22.7 38 21V3C38 1.3 36.6 0 35 0Z" fill="#142FBD" style="fill:#142FBD;fill:color(display-p3 0.0784 0.1843 0.7412);fill-opacity:1;"/><path d="M35 1C36.1 1 37 1.9 37 3V21C37 22.1 36.1 23 35 23H3C1.9 23 1 22.1 1 21V3C1 1.9 1.9 1 3 1H35Z" fill="#1532CB" style="fill:#1532CB;fill:color(display-p3 0.0824 0.1961 0.7961);fill-opacity:1;"/><path d="M29.5944 10.2167H29.2778C28.8556 11.2722 28.5389 11.8 28.2222 13.3833H30.2278C29.9111 11.8 29.9111 11.0611 29.5944 10.2167V10.2167ZM32.6556 16.4444H30.8611C30.7556 16.4444 30.7556 16.4444 30.65 16.3389L30.4389 15.3889L30.3333 15.1778H27.8C27.6944 15.1778 27.5889 15.1778 27.5889 15.3889L27.2722 16.3389C27.2722 16.4444 27.1667 16.4444 27.1667 16.4444H24.95L25.1611 15.9167L28.2222 8.73889C28.2222 8.21111 28.5389 8 29.0667 8H30.65C30.7556 8 30.8611 8 30.8611 8.21111L32.3389 15.0722C32.4444 15.4944 32.55 15.8111 32.55 16.2333C32.6556 16.3389 32.6556 16.3389 32.6556 16.4444V16.4444ZM18.5111 16.1278L18.9333 14.2278C19.0389 14.2278 19.1444 14.3333 19.1444 14.3333C19.8833 14.65 20.6222 14.8611 21.3611 14.7556C21.5722 14.7556 21.8889 14.65 22.1 14.5444C22.6278 14.3333 22.6278 13.8056 22.2056 13.3833C21.9944 13.1722 21.6778 13.0667 21.3611 12.8556C20.9389 12.6444 20.5167 12.4333 20.2 12.1167C18.9333 11.0611 19.3556 9.58333 20.0944 8.84444C20.7278 8.42222 21.0444 8 21.8889 8C23.1556 8 24.5278 8 25.1611 8.21111H25.2667C25.1611 8.84444 25.0556 9.37222 24.8444 10.0056C24.3167 9.79444 23.7889 9.58333 23.2611 9.58333C22.9444 9.58333 22.6278 9.58333 22.3111 9.68889C22.1 9.68889 21.9944 9.79444 21.8889 9.9C21.6778 10.1111 21.6778 10.4278 21.8889 10.6389L22.4167 11.0611C22.8389 11.2722 23.2611 11.4833 23.5778 11.6944C24.1056 12.0111 24.6333 12.5389 24.7389 13.1722C24.95 14.1222 24.6333 14.9667 23.7889 15.6C23.2611 16.0222 23.05 16.2333 22.3111 16.2333C20.8333 16.2333 19.6722 16.3389 18.7222 16.0222C18.6167 16.2333 18.6167 16.2333 18.5111 16.1278V16.1278ZM14.8167 16.4444C14.9222 15.7056 14.9222 15.7056 15.0278 15.3889C15.5556 13.0667 16.0833 10.6389 16.5056 8.31667C16.6111 8.10556 16.6111 8 16.8222 8H18.7222C18.5111 9.26667 18.3 10.2167 17.9833 11.3778C17.6667 12.9611 17.35 14.5444 16.9278 16.1278C16.9278 16.3389 16.8222 16.3389 16.6111 16.3389L14.8167 16.4444ZM5 8.21111C5 8.10556 5.21111 8 5.31667 8H8.90556C9.43333 8 9.85556 8.31667 9.96111 8.84444L10.9111 13.4889C10.9111 13.5944 10.9111 13.5944 11.0167 13.7C11.0167 13.5944 11.1222 13.5944 11.1222 13.5944L13.3389 8.21111C13.2333 8.10556 13.3389 8 13.4444 8H15.6611C15.6611 8.10556 15.6611 8.10556 15.5556 8.21111L12.2833 15.9167C12.1778 16.1278 12.1778
257516.2333 12.0722 16.3389C11.9667 16.4444 11.7556 16.3389 11.5444 16.3389H9.96111C9.85556 16.3389 9.75 16.3389 9.75 16.1278L8.06111 9.58333C7.85 9.37222 7.53333 9.05556 7.11111 8.95C6.47778 8.63333 5.31667 8.42222 5.10556 8.42222L5 8.21111Z" fill="white" style="fill:white;fill-opacity:1;"/></svg> 2576 2577 </li> 2578 2579 </ul> 2580 2581 </div></div> 2582 2583 <div class="footer__bottom__right"> 2584 <div class="footer-copyright"> 2585 <p class="footer-copyright__text"> 2586 <span class="footer-copyright__span footer-copyright__span--powered"><a target="_blank" rel="nofollow" href="https://www.shopify.com?utm_campaign=poweredby&utm_medium=shopify&utm_source=onlinestore">Powered by Shopify</a></span> 2587 <span class="footer-copyright__span footer-copyright__span--shop">© 2026, RoostersBrewingCo</span> 2588 </p> 2589 </div> 2590 </div> 2591 2592 </div> 2593 </div> 2594 2595</footer> 2596 2597 2598</div> 2599 <div id="shopify-section-promo-pop" class="shopify-section js-section__promo-pop"> 2600<div class="promo-pop js-promo-pop promo-pop--disabled promo-pop--no-mobile" data-promo-enabled="false" data-promo-delay="7000" data-promo-expiry="3"> 2601 <a href="#" class="promo-pop__close js-promo-pop-close icon-fallback"> 2602 <i class="icon icon--close" aria-hidden="true"></i> 2603 <span class="icon-fallback__text">Close (esc)</span> 2604 </a> 2605 2606 <div class="promo-pop__wrapper"> 2607 <div class="promo-pop__content"> 2608 2609 2610 <div class="section__title promo-pop__title"> 2611 <h4 class="section__title-text">JOIN OUR LOYALTY PROGRAMME</h4> 2612 </div> 2613 2614 2615 2616 <div class="promo-pop__desc rte"><p>Sign up to our loyalty programme and start earning reward points on every purchase!</p><p><strong>Special offer: Members get 20% discount throughout August!</strong></p><p>It's easy to join â simply sign up via the <em>Rewards</em> button at checkout or on your account page. Start building your rewards today and redeem them as money off future orders.</p></div> 2617 2618 2619 2620 <div class="promo-pop__form"> 2621 <form method="post" action="/contact#contact_form" id="contact_form" accept-charset="UTF-8" class="promo-pop__form-form"><input type="hidden" name="form_type" value="customer" /><input type="hidden" name="utf8" value="â" /> 2622 2623 2624 <div class="promo-pop__fieldset"> 2625 <input type="hidden" name="contact[tags]" value="newsletter"> 2626 <input type="email" 2627 name="contact[email]" 2628 id="Email" 2629 class="promo-pop__fieldset-item promo-pop__input" 2630 value="" 2631 placeholder="[email protected]" 2632 autocorrect="off" 2633 autocapitalize="off"> 2634 2635 <button type="submit" class="c-btn c-btn--primary c-btn--arrow promo-pop__fieldset-item promo-pop__btn" name="commit" id="Subscribe">Subscribe</button> 2636 </div> 2637 2638 </form> 2639 </div> 2640 2641 2642 2643 <a href="/collections/all-beer" class="c-btn c-btn--primary c-btn--arrow c-btn--full promo-pop__link">Learn more</a> 2644 2645 </div> 2646 </div> 2647</div> 2648 2649</div> 2650 <div id="shopify-section-age-checker" class="shopify-section js-section__age-checker"><div class="age-checker js-age-draw mfp-hide" data-age-check-enabled="true"> 2651 <div class="age-checker__wrapper"> 2652 2653 2654 2655 <div class="age-checker__content"> 2656 <div class="section__title section__title--center age-checker__title"> 2657 <h3 class="section__title-text">Age verification</h3> 2658 </div> 2659 2660 <div class="age-checker__desc"><p>BY CLICKING ENTER I CONFIRM I AM OVER THE AGE OF 18</p></div> 2661 2662 <div class="age-checker__actions"> 2663 <a href="#" class="age-checker__btn c-btn c-btn--primary c-btn--full js-age-close">Enter</a> 2664 2665 </div> 2666 </div> 2667 </div> 2668</div> 2669 2670 2671</div> 2672 </div> 2673 2674 2675 <div class="search-draw js-search-draw mfp-hide"> 2676 <div class="search-draw__wrapper"> 2677 <div class="search__head"> 2678 <div class="search__label"> 2679 <h3 class="search__label-title">Search</h3> 2680 </div> 2681 </div> 2682 <div class="search__inner"> 2683 <form action="/search" method="get" class="search__form" role="search"> 2684 <input type="hidden" name="type" value="product,article,page"> 2685 <input type="search" name="q" class="search__form-input js-search-input" value="" placeholder="Search our store..." aria-label="Search our store..."> 2686 <button type="submit" class="search__form-submit"> 2687 <i class="icon icon--search" aria-hidden="true"></i>
2688 <span class="icon-fallback__text">Search</span> 2689 </button> 2690 </form> 2691 2692 2693 <div class="search__nav"> 2694 <h4 class="search__nav-title h5">Main menu</h4> 2695 <ul class="search__nav-items o-list-bare"> 2696 2697 <li class="search__nav-item"> 2698 <a href="/pages/about-us" class="search__nav-link">Info</a> 2699 </li> 2700 2701 <li class="search__nav-item"> 2702 <a href="/collections/all-beer" class="search__nav-link">Shop</a> 2703 </li> 2704 2705 <li class="search__nav-item"> 2706 <a href="/pages/taproom" class="search__nav-link">Taproom</a> 2707 </li> 2708 2709 <li class="search__nav-item"> 2710 <a href="/pages/swb-gallery" class="search__nav-link">Suds With Buds</a> 2711 </li> 2712 2713 <li class="search__nav-item"> 2714 <a href="/pages/core-range" class="search__nav-link">Trade</a> 2715 </li> 2716 2717 <li class="search__nav-item"> 2718 <a href="/blogs/blog" class="search__nav-link">Blog</a> 2719 </li> 2720 2721 <li class="search__nav-item"> 2722 <a href="/pages/contact" class="search__nav-link">Contact Us</a> 2723 </li> 2724 2725 </ul> 2726 </div> 2727 2728 </div> 2729 </div> 2730 </div> 2731 2732 2733 <div class="ajaxcart-draw js-cart-draw mfp-hide ajaxcart-draw--notification"> 2734 <div class="ajaxcart-draw__wrapper js-cart-draw-inner"> 2735 <div class="ajaxcart-draw__scroll"> 2736 <div class="ajaxcart__head"> 2737 <div class="ajaxcart__label"> 2738 2739 2740 <h3 class="ajaxcart__label-title">Added to cart</h3> 2741 2742 </div> 2743 </div> 2744 <div id="CartContainer"></div> 2745 2746 </div> 2747 </div> 2748 </div> 2749 2750
2750<script id="CartTemplate" type="text/template"> 2751 2752 <form action="/cart" method="post" novalidate class="cart ajaxcart__form"> 2753 <div class="ajaxcart__inner"> 2754 <div class="ajaxcart__products"> 2755 {{#items}} 2756 <div class="ajaxcart__product"> 2757 <div class="ajaxcart__row" data-line="{{line}}"> 2758 2759 <div class="o-layout o-layout--tiny u-flex u-flex--middle"> 2760 2761 <div class="o-layout__item u-1/1 u-5/10@tab"> 2762 <div class="o-layout o-layout--tiny u-flex u-flex--middle"> 2763 <div class="o-layout__item u-1/3 u-1/4@tab"> 2764 <a href="{{url}}" class="ajaxcart__product-image"> 2765 <div class="o-ratio o-ratio--bg-product"> 2766 2767 {{#if img}} 2768 <img src="{{img}}" class="o-ratio__content" alt="{{ name }}"> 2769 {{else}} 2770 <img src="//www.roosters.co.uk/cdn/shop/t/3/assets/placeholder_240x.png?v=113555733946226816651645974002" class="o-ratio__content" alt="{{ name }}"> 2771 {{/if}} 2772 2773 </div> 2774 </a> 2775 </div> 2776 <div class="o-layout__item u-2/3 u-3/4@tab"> 2777 <a href="{{url}}"><h2 class="ajaxcart__product-name h3">{{name}}</h2></a> 2778 {{#if variation}} 2779 <p class="ajaxcart__product-meta">{{variation}}</p> 2780 {{/if}} 2781 {{#properties}} 2782 {{#each this}} 2783 {{#if this}} 2784 {{#iffirstnoteq @key "_"}} 2785 <p class="ajaxcart__product-meta">{{@key}}:{{this}}</p> 2786 {{/iffirstnoteq}} 2787 {{/if}} 2788 {{/each}} 2789 {{/properties}} 2790 2791 {{#if sellingPlan}} 2792 <p class="ajaxcart__product-meta">{{ sellingPlan }}</p> 2793 {{/if}} 2794 2795 2796 </div> 2797 </div> 2798 </div> 2799 2800 <div class="o-layout__item u-4/10 u-2/10@tab"> 2801 <div class="ajaxcart__qty"> 2802 <button type="button" class="ajaxcart__qty-adjust ajaxcart__qty--minus" data-id="{{key}}" data-qty="{{itemMinus}}" data-line="{{line}}"> 2803 <span aria-hidden="true">−</span> 2804 <span class="u-hidden-visually">Reduce item quantity by one</span> 2805 </button> 2806 <input type="text" name="updates[]" class="ajaxcart__qty-num js-qty-input" value="{{itemQty}}" min="0" data-id="{{key}}" data-line="{{line}}" aria-label="quantity" pattern="[0-9]*" autocomplete="off"> 2807 <button type="button" class="ajaxcart__qty-adjust ajaxcart__qty--plus" data-id="{{key}}" data-line="{{line}}" data-qty="{{itemAdd}}"> 2808 <span aria-hidden="true">+</span> 2809 <span class="u-hidden-visually">Increase item quantity by one</span> 2810 </button> 2811 </div> 2812 </div> 2813 2814 <div class="o-layout__item u-6/10 u-3/10@tab"> 2815 {{#if lineDiscount}} 2816 2817 <div class="ajaxcart-item__price ajaxcart-item__price--original"><s><span class="money">{{{originalLinePrice}}}</span></s></div> 2818 2819 <div class="ajaxcart-item__discount"> 2820 {{#each lineDiscounts}} 2821 <p class="ajaxcart-item__discount-text"> 2822 {{ this.discount_application.title }} (-<span class="money">{{{ this.amount }}}</span>) 2823 </p> 2824 {{/each}} 2825 </div> 2826 2827 <div class="ajaxcart-item__price ajaxcart-item__price--sale"><span class="money">{{{lineDiscountedPrice}}}</span></div> 2828 2829 {{else}} 2830 <div class="ajaxcart-item__price"><span class="money">{{{linePrice}}}</span></div> 2831 {{/if}} 2832 2833 {{#if unitPriceExists}} 2834 <div class="ajaxcart-item__price ajaxcart-item__price--unit">{{{ unitPrice }}}<span aria-hidden="true">/</span><span class="u-hidden-visually">per </span>{{#ifnoteq unitReferenceValue "1"}}{{{ unitReferenceValue }}}{{/ifnoteq}}{{{ unitReferenceUnit }}}</div> 2835 {{/if}} 2836 2837 </div> 2838 2839 </div> 2840 2841 </div> 2842 </div> 2843 {{/items}} 2844 </div> 2845 2846 2847 2848 </div> 2849 2850 <div class="ajaxcart__footer"> 2851 <div class="o-layout o-layout--tiny o-layout--reverse"> 2852 <div class="o-layout__item u-1/1 u-1/3@tab"> 2853 2854 {{#if cartDiscounts}} 2855 {{#each cartDiscounts}} 2856 <p class="ajaxcart__footer-discount">{{ this.title }} (-<span class="money">{{ this.total_allocated_amount }}</span>)</p> 2857 {{/each}} 2858 {{/if}} 2859 2860 <p class="ajaxcart__footer-total">Subtotal <span class="money">{{{totalPrice}}}</span></p> 2861 </div> 2862 <div class="o-layout__item u-1/1 u-2/3@tab"> 2863 <p class="ajaxcart__footer-message">Shipping & taxes calculated at checkout</p> 2864 </div> 2865 </div> 2866 2867 2868 <div class="ajaxcart__footer-terms">
2869 <span class="ajaxcart__footer-terms__error js-cart-terms-error">This field is required</span> 2870 <input type="checkbox" class="ajaxcart__footer-terms__input js-cart-terms-input" id="ajaxcart-agree"> 2871 <label for="ajaxcart-agree" class="ajaxcart__footer-terms__label rte"> 2872 <p>I confirm I have read and understand the following:<br/>⢠I am over the age of 18 years old<br/>⢠Bag In Box orders are only available for local delivery or brewery collection and cannot be shipped via DHL<br/>⢠I have read and agree with the terms & conditions</p> 2873 </label> 2874 </div> 2875 2876 </div> 2877 2878 <div class="ajaxcart__button"> 2879 2880 <div class="o-layout o-layout--tiny o-layout--reverse"> 2881 <div class="o-layout__item u-1/1 u-1/2@tab"> 2882 2883 <button type="submit" class="c-btn c-btn--full c-btn--primary c-btn--arrow ajaxcart__checkout js-cart-checkout-validate" name="checkout">Check Out</button> 2884 2885 </div> 2886 <div class="o-layout__item u-1/1 u-1/2@tab"> 2887 <a href="/" class="c-btn c-btn--full c-btn--hollow js-close-mfp ajaxcart__continue">Continue shopping</a> 2888 </div> 2889 </div> 2890 2891 </div> 2892 </form> 2893 2894</script>
2894 2895
2896<script id="NotificationTemplate" type="text/template"> 2897 2898 <div class="ajaxcart__inner"> 2899 2900 <div class="o-layout o-layout--tiny u-flex u-flex--middle"> 2901 2902 <div class="o-layout__item u-1/1 u-3/5@mob"> 2903 <div class="ajaxcart__product"> 2904 2905 <div class="o-layout o-layout--small u-flex u-flex--middle"> 2906 2907 <div class="o-layout__item u-1/3"> 2908 <div class="ajaxcart__product-image-wrapper"> 2909 <div class="ajaxcart__product-image"> 2910 <div class="o-ratio o-ratio--bg-product"> 2911 2912 {{#if thisItem.img}} 2913 <img src="{{ thisItem.img }}" class="o-ratio__content" alt="{{ thisItem.name }}"> 2914 {{else}} 2915 <img src="//www.roosters.co.uk/cdn/shop/t/3/assets/placeholder_240x.png?v=113555733946226816651645974002" class="o-ratio__content" alt="{{ thisItem.name }}"> 2916 {{/if}} 2917 2918 </div> 2919 </div> 2920 </div> 2921 </div> 2922 2923 <div class="o-layout__item u-2/3"> 2924 <p class="ajaxcart__product-name">{{ thisItem.name }}</p> 2925 <p class="ajaxcart__product-meta">{{ thisItem.variation }}</p> 2926 <p class="ajaxcart__product-meta">{{ thisItem.sellingPlan }}</p> 2927 <p class="ajaxcart__product-meta">{{ thisItem.price }}</p> 2928 {{#if thisItem.unitPriceExists}} 2929 <div class="ajaxcart__product-meta ajaxcart-item__price--unit">{{{ thisItem.unitPrice }}}<span aria-hidden="true">/</span><span class="u-hidden-visually">per </span>{{#ifnoteq thisItem.unitReferenceValue "1"}}{{{ thisItem.unitReferenceValue }}}{{/ifnoteq}}{{{ thisItem.unitReferenceUnit }}}</div> 2930 {{/if}} 2931 </div> 2932 2933 </div> 2934 2935 </div> 2936 </div> 2937 2938 <div class="o-layout__item u-1/1 u-2/5@mob"> 2939 <a href="/cart" class="c-btn c-btn--small c-btn--full c-btn--primary c-btn--arrow ajaxcart__checkout" name="checkout">View cart</a> 2940 <a href="/" class="c-btn c-btn--small c-btn--full c-btn--hollow js-close-mfp ajaxcart__continue">Continue shopping</a> 2941 </div> 2942 2943 </div> 2944 2945 </div> 2946 2947</script>
2947 2948
2949<script id="AjaxQty" type="text/template"> 2950 2951 <div class="ajaxcart__qty"> 2952 <button type="button" class="ajaxcart__qty-adjust ajaxcart__qty--minus" data-id="{{key}}" data-qty="{{itemMinus}}"> 2953 <span aria-hidden="true">−</span> 2954 <span class="u-hidden-visually">Reduce item quantity by one</span> 2955 </button> 2956 <input type="text" class="ajaxcart__qty-num js-qty-input" value="{{itemQty}}" min="0" data-id="{{key}}" aria-label="quantity" pattern="[0-9]*" autocomplete="off"> 2957 <button type="button" class="ajaxcart__qty-adjust ajaxcart__qty--plus" data-id="{{key}}" data-qty="{{itemAdd}}"> 2958 <span aria-hidden="true">+</span> 2959 <span class="u-hidden-visually">Increase item quantity by one</span> 2960 </button> 2961 </div> 2962 2963</script>
2963 2964
2965<script id="JsQty" type="text/template"> 2966 2967 <div class="js-qty"> 2968 <button type="button" class="js-qty__adjust js-qty__adjust--minus icon-fallback-text" data-id="{{key}}" data-qty="{{itemMinus}}"> 2969 <span aria-hidden="true">−</span> 2970 <span class="u-hidden-visually">Reduce item quantity by one</span> 2971 </button> 2972 <input type="text" class="js-qty__num js-qty-input" value="{{itemQty}}" min="1" data-id="{{key}}" aria-label="quantity" pattern="[0-9]*" name="{{inputName}}" id="{{inputId}}" autocomplete="off"> 2973 <button type="button" class="js-qty__adjust js-qty__adjust--plus" data-id="{{key}}" data-qty="{{itemAdd}}"> 2974 <span aria-hidden="true">+</span> 2975 <span class="u-hidden-visually">Increase item quantity by one</span> 2976 </button> 2977 </div> 2978 2979</script>
2979 2980 2981
2981<script> 2982 //cart functions 2983 theme.ajaxCartInit = function() { 2984 ajaxCart.init({ 2985 2986 2987 2988 sourceId: '#NotificationTemplate', 2989 triggerSelector: '.js-cart-icon', 2990 formSelector: '.js-product-form', 2991 addToCartSelector: '.js-product-add', 2992 2993 2994 cartContainer: '#CartContainer', 2995 cartCountSelector: '#CartCount', 2996 cartCostSelector: '#CartCost', 2997 emptySelector: '#EmptyCart', 2998 moneyFormat: "£{{amount}}" 2999 }); 3000 }; 3001 </script>
3001 3002 <!-- Venue theme by Safe As Milk - http://safeasmilk.co/ --> 3003 <!-- Theme version 6.0.1 --><!--Content in content_for_footer --> 3004 3005 3006<!--LH--> 3007 3008<style>.gktAccountWidgetModalWrapper { 3009 font-size: 16px; 3010} 3011 3012.gktAccountWidgetModal { 3013 height: 600px; 3014 width: 75vw; 3015} 3016 3017.gktAccountWidgetRewardBalance { 3018 display: grid; 3019 grid-gap: 5px; 3020 justify-content: start; 3021} 3022 3023 3024.gktRewardCode { 3025 display: grid; 3026 text-align: right; 3027 grid-gap: 5px; 3028} 3029 3030.gktAccountWidgetRewardBalanceValue { 3031 place-self: start; 3032} 3033 3034.gktAccountWidgetModalContent { 3035 display: grid; 3036 grid-gap: 10px; 3037 grid-template-rows: 1fr 0.6fr auto; 3038} 3039 3040.gktAccountWidgetRewardDetails { 3041 display: grid; 3042 grid-template-columns: 1fr 1fr; 3043 /* grid-gap: 10px; */ 3044 padding: 10px 0px; 3045 border-bottom: 1px solid #a2a2a2; 3046} 3047 3048.gktAccountWidgetBodyTabActive { 3049 border-bottom: 1px solid black; 3050} 3051 3052 3053 3054.gktAccountWidgetRewardSectionBodyListItem, 3055.gktAccountWidgetRewardSectionBodyListHeader { 3056 display: grid; 3057 /* grid-template-columns: 1fr 1fr 1fr; */ 3058 grid-template-columns: 33% 33% 33%; 3059 padding: 10px 5px; 3060 text-align: start; 3061 place-items: start; 3062 align-items: center; 3063 border-bottom: 1px solid #efe4e4; 3064} 3065 3066 3067 3068.gktAccountWidgetBuyWithRewardsButton { 3069 text-align: center; 3070 align-items: center; 3071 display: grid; 3072 gap: 10px; 3073 justify-content: center; 3074 padding: 15px; 3075 padding: 10px; 3076 align-items: center; 3077 background: #252525; 3078 border-radius: 5px; 3079 border-radius: 2px; 3080 color: white; 3081 cursor: pointer; 3082} 3083 3084.gktAccountWidgetBuyWithRewardsButton:hover , .gktAccountWidgetGiftCardSectionBodyListItemForAddToAccountButton:hover { 3085 transform: scale(0.95); 3086} 3087 3088.gktAccountWidgetActivator{ 3089 text-align: center; 3090 display: grid; 3091 gap: 10px; 3092 justify-content: center; 3093 padding: 15px; 3094 padding: 10px; 3095 align-items: center; 3096 background: #252525; 3097 border-radius: 5px; 3098 border-radius: 2px; 3099 color: white; 3100} 3101 3102 3103.gktAccountWidgetRewardCodeValue { 3104 place-self: end; 3105 font-size: 20px; 3106} 3107 3108.gktAccountWidgetRewardBalanceValue { 3109 font-size: 20px; 3110} 3111 3112.gktAccountWidgetRewardCodeCopyBtn { 3113 display: none; 3114} 3115 3116.gktAccountWidgetModalClose { 3117 display: grid; 3118 padding: 1px; 3119 align-self: baseline; 3120 justify-self: end; 3121 cursor: pointer; 3122 justify-content: end; 3123} 3124 3125.gktAccountWidgetBodyTabRewards, 3126.gktAccountWidgetBodyTabGiftCards { 3127 padding: 10px; 3128} 3129 3130.gktAccountWidgetRewardSectionBodyListHeader, 3131.gktAccountWidgetGiftCardSectionListHeader { 3132 color: #808080; 3133} 3134 3135.gktAccountWidgetBodyTabs { 3136 display: grid; 3137 grid-template-columns: 1fr 1fr; 3138 grid-template-rows: 1fr; 3139 grid-gap: 10px; 3140 text-align: center; 3141 border-bottom: 1px solid #ebebeb; 3142 cursor: pointer; 3143} 3144 3145.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar, 3146.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar {
3147 width: 5px; 3148} 3149 3150/* Track */ 3151.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar-track, 3152.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar-track { 3153 background: #f1f1f1; 3154} 3155 3156/* Handle */ 3157.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar-thumb, 3158.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar-thumb { 3159 background: #2c2c2c 0% 0% no-repeat padding-box; 3160} 3161 3162/* Handle on hover */ 3163.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar-thumb:hover, 3164.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar-thumb:hover { 3165 background: #000000 0% 0% no-repeat padding-box; 3166} 3167 3168.gktAccountWidgetRewardSection, 3169.gktAccountWidgetGiftCardSection { 3170 display: none; 3171} 3172 3173.gktAccountWidgetGiftCardSectionBodyList, 3174.gktAccountWidgetRewardSectionBodyList { 3175 font-size: 14px; 3176 padding-right: 10px; 3177 margin-top: 10px; 3178} 3179 3180.gktAccountWidgetGiftCardSectionBodyListItem, 3181.gktAccountWidgetGiftCardSectionListHeader { 3182 display: grid; 3183 grid-template-columns: 1fr 1fr 1fr 1.8fr; 3184 /* convert into percentages */ 3185 grid-template-columns: 22% 22% 22% 30%; 3186 padding: 10px; 3187 grid-gap: 10px; 3188 text-align: start; 3189 place-items: start; 3190 align-items: center; 3191 border-bottom: 1px solid #efe4e4; 3192} 3193 3194/* .gktAccountWidgetGiftCardSectionBodyListItem { 3195 display: grid; 3196 grid-template-columns: 1fr 1fr 1fr 1.8fr; 3197 padding: 10px; 3198 grid-gap: 10px; 3199 align-items: center; 3200} */ 3201 3202 3203.gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount{ 3204 width: 100%; 3205} 3206 3207.gktAccountWidgetGiftCardSectionBodyListItemForAddToAccountButton { 3208 text-align: center; 3209 display: grid; 3210 gap: 10px; 3211 justify-content: center; 3212 padding: 10px 5px; 3213 align-items: center; 3214 background: #252525; 3215 border-radius: 5px; 3216 border-radius: 2px; 3217 color: white; 3218 place-self: center; 3219 cursor: pointer; 3220 width: 100%; 3221} 3222.gktAccountWidgetGiftCardSectionListHeaderForAction{ 3223 text-align: center; 3224 place-self: center; 3225} 3226 3227.gktAccountWidgetModalWrapper { 3228 display: none; 3229 width: 100%; 3230 height: 100vh; 3231 position: fixed; 3232 opacity: 1; 3233 background: #222; 3234 z-index: 999999999; 3235 top: 0; 3236 left: 0; 3237 overflow: hidden; 3238 animation-name: fadeIn_Container; 3239 animation-duration: 0.2s; 3240} 3241 3242.gktAccountWidgetModalWrapper { 3243 background-color: #2229; 3244} 3245/* Modal Content */ 3246.gktAccountWidgetModal { 3247 position: fixed; 3248 top: 25%; 3249 left: 50%; 3250 max-width: 700px; 3251 width: 65vw !important; 3252 margin: 10px auto; 3253 padding: 20px 30px 30px; 3254 margin-top: 20vh !important; 3255 background: #fefefe; 3256 animation-name: fadeIn_Modal; 3257 animation-duration: 0.2s; 3258 transform: translate(-50%, -50%); 3259 line-height: 16px; 3260 max-height: 90vh; 3261 overflow-y: auto; 3262 overflow-x: hidden; 3263 border-radius: 2px; 3264 color: black !important; 3265} 3266 3267.gktDisabled { 3268 opacity: 0.5; 3269 pointer-events: none; 3270} 3271 3272 3273.gktPoweredByBanner { 3274 display: flex; 3275 position: absolute; 3276 bottom: 0; 3277 left: 0; 3278 width: 100%; 3279 justify-content: center; 3280 align-items: center; 3281 padding: 10px; 3282 padding: 6px; 3283 font-size: 14px; 3284 background: #efe9e9; 3285 cursor: pointer; 3286} 3287 3288.gktLoading { 3289 display: grid; 3290 align-items: center; 3291 /* margin-top: 30%; */ 3292 justify-content: center; 3293 /* height: 200px; 3294 margin: 50px auto; */ 3295 text-align: -webkit-center; 3296} 3297 3298.gktLoadingSpinner { 3299 display: block !important; 3300 border: 12px solid #f3f3f3; 3301 border-radius: 50%; 3302 border-top: 12px solid #cbcbcb; 3303 border-bottom: 12px solid #cbcbcb; 3304 width: 80px; 3305 height: 80px; 3306 -webkit-animation: spin 2s linear infinite; 3307 animation: spin 2s linear infinite; 3308} 3309 3310@-webkit-keyframes spin { 3311 0% { 3312 -webkit-transform: rotate(0deg); 3313 } 3314 3315 100% { 3316 -webkit-transform: rotate(360deg); 3317 } 3318} 3319 3320@keyframes spin { 3321 0% { 3322 transform: rotate(0deg); 3323 } 3324 3325 100% { 3326 transform: rotate(360deg); 3327 } 3328} 3329 3330.gktAccountWidgetNoRewardDataFound, 3331.gktAccountWidgetNoGiftCardDataFound { 3332 text-align: center; 3333 display: grid; 3334 justify-content: center; 3335 margin: 50px 25px; 3336} 3337 3338.gktAccountWidgetRewardSectionBodyListItemBalanceRemove{ 3339 color: red; 3340} 3341 3342 3343 3344@media screen and (max-width: 600px) { 3345 .gktAccountWidgetModal { 3346 top: 25%; 3347 left: 50%; 3348 min-width: 250px; 3349 width: 100vw !important; 3350 padding: 10px 20px; 3351 margin-top: 0 !important; 3352 top: 0; 3353 left: 0; 3354 transform: translate(0px, 0px); 3355 border-radius: 0px; 3356 height: 100vh !important; 3357 max-height: 100vh !important; 3358 min-width: 100%; 3359 min-width: -moz-available; /* WebKit-based browsers will ignore this. */ 3360 min-width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */ 3361 min-width: fill-available; 3362 } 3363 .gktAccountWidgetRewardSectionBodyList, 3364 .gktAccountWidgetGiftCardSectionBodyList { 3365 height: 550px; 3366 overflow-y: auto; 3367 } 3368 .gktLoading{ 3369 height: 550px; 3370 align-items: baseline; 3371 margin-top: 22%; 3372 } 3373} 3374 3375@media screen and (min-width: 764px) { 3376 .gktAccountWidgetRewardSectionBodyList, 3377 .gktAccountWidgetGiftCardSectionBodyList { 3378 height: 350px; 3379 overflow-y: auto; 3380 } 3381 .gktLoading{ 3382 height: 350px; 3383 } 3384} 3385 3386 3387.cashbackWidgetContainer{ 3388 display: grid; 3389 grid-template-columns: 1fr; 3390 grid-template-rows: auto 1fr; 3391 border: 2px solid black; 3392 border-radius: 5px; 3393 padding: 8px 8px; 3394} 3395.cashbackWidgetTitleContainer{ 3396 display: grid; 3397 grid-template-columns: auto 1fr; 3398 grid-gap: 10px; 3399 align-items: center; 3400} 3401.cashbackWidgetIcon{ 3402 width: 25px; 3403 height: 25px; 3404} 3405 3406.cashbackWidgetHeading{ 3407 font-size: 18px; 3408 font-weight: 700; 3409 text-align: left; 3410} 3411 3412.cashbackWidgetBody{ 3413 font-size: 14px; 3414 font-weight: 600; 3415 text-align: left; 3416 3417} 3418 3419 3420 3421.gktComboContainer { 3422 display: grid; 3423 grid-template-columns: 1fr; 3424 grid-template-rows: auto; 3425 3426} 3427.gktPrevImage,.gktNextImage{ 3428 margin-left:5px; 3429 font-size: 16px; 3430} 3431.gktComboSliderNavigatior{ 3432 position: absolute; 3433 bottom: 5px; 3434 right:5px; 3435} 3436.gktComboItemContainer{ 3437 display: grid; 3438 grid-template-columns: 1fr 2fr; 3439 grid-template-rows: auto; 3440 padding: 3px 0px; 3441 margin: 3px 0px; 3442 border-radius: 3px; 3443 border: 1px solid #f1f2f3; 3444} 3445 3446.gktComboItemContainerItem1{ 3447 grid-row: 1 / 5; 3448 position:relative; 3449} 3450 3451.gktComboItemContainerItem2{ 3452 padding-left: 5px; 3453 text-align: left; 3454} 3455 3456.gktComboItemContainerItem3{ 3457 padding-left: 5px; 3458 text-align: left; 3459} 3460 3461.gktComboItemContainerItem4{ 3462 padding-left: 5px; 3463 text-align: left; 3464} 3465 3466 3467.gktComboItemContainerItem3CustomSelect{ 3468 position: relative; 3469 width: fit-content; 3470 3471} 3472 3473.gktComboItemContainerItem3CustomSelect > select{ 3474 box-shadow: 0; 3475 font-size: 16px; 3476 padding: 6px 10px; 3477 background-color: #fafafa; 3478 border: 1px solid #eee; 3479 min-width: 120px; 3480 margin: 0px; 3481 3482} 3483 3484.gktComboItemContainerItem3CustomSelect > select:focus{ 3485 outline:none; 3486 3487} 3488 3489.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn { 3490 position: absolute; 3491 display: block; 3492 top:0; 3493 right: 0; 3494 background: #fafafa; 3495 height: 100%;
3496 width: 20px; 3497 pointer-events: none; 3498 3499} 3500.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::before, 3501.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::after 3502 { 3503 content: ""; 3504 position: absolute; 3505 width: 0; 3506 height: 0; 3507 left: 50%; 3508 transform: translate(-50%, -50%); 3509 3510} 3511 3512.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::before 3513 { 3514 border-left: 8px solid transparent; 3515 border-right: 8px solid transparent; 3516 border-bottom: 8px solid #635959; 3517 top:30% 3518 3519} 3520 3521.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::after 3522 { 3523 border-left: 8px solid transparent; 3524 border-right: 8px solid transparent; 3525 border-top: 8px solid #635959; 3526 top: 70%; 3527} 3528 3529 3530 3531.gktComboModalWrapper { 3532 3533 display: none; 3534 width: 100%; 3535 height: 100vh; 3536 position: fixed; 3537 opacity: 1; 3538 background: #222; 3539 z-index: 999999999; 3540 top: 0; 3541 left: 0; 3542 overflow: hidden; 3543 animation-name: fadeIn_Container; 3544 animation-duration: .2s 3545} 3546 3547 /* Modal Content */ 3548.gktComboModal { 3549 3550 position: fixed; 3551 top: 25%; 3552 left: 50%; 3553 min-width: 250px; 3554 width: 50vw !important; 3555 margin: 10px auto; 3556 padding:10px; 3557 margin-top: 25vh !important; 3558 border-radius: 4px; 3559 background: #fefefe; 3560 box-shadow: 0 0 10px #000; 3561 animation-name: fadeIn_Modal; 3562 animation-duration: .2s; 3563 3564 transform: translate(-50%, -50%); 3565 } 3566 3567 3568 3569/* Header should be in one line*/ 3570.gktComboModalHeader { 3571 display: grid; 3572 grid-template-columns: auto 25px; 3573} 3574 3575 3576.gktComboModalPopupHeading > p { 3577 margin: 0 !important; 3578} 3579 3580.gktComboModalClose{ 3581 fill: rgba(255,255,255,0.851); 3582 background: rgba(32,33,36,0.4); 3583 -webkit-border-radius: 50%; 3584 border-radius: 50%; 3585 width: 24px; 3586 height: 24px; 3587 padding: 1px; 3588 align-self: baseline; 3589 justify-self: end; 3590 margin-top: 3px; 3591 margin-right: 3px; 3592 cursor: pointer; 3593} 3594 3595 3596.gktComboModalClose:hover, 3597 .gktComboModalClose:focus { 3598 color: #000; 3599 text-decoration: none; 3600 cursor: pointer; 3601 } 3602 3603 3604.gktComboContent { 3605 display:grid; 3606 grid-template-rows: 1fr 3fr; 3607 grid-gap: 10px; 3608 padding: 5px 10px; 3609 margin:5px 10px; 3610 font-size: 30px; 3611} 3612 3613.gktComboContentHeader{ 3614 3615} 3616.gktComboContentFooter{ 3617 3618} 3619.gktComboContentFooterBtn1{ 3620 3621} 3622.gktComboContentFooterBtn2{ 3623 3624} 3625 3626 3627 3628.gktFreeGiftcardPopupModalWrapper { 3629 display: none; 3630 width: 100%; 3631 height: 100vh; 3632 position: fixed; 3633 opacity: 1; 3634 background: #e1d8d882; 3635 z-index: 999999999; 3636 top: 0; 3637 left: 0; 3638 overflow: hidden; 3639 animation-name: fadeIn_Container; 3640 animation-duration: .2s 3641 display: none; 3642 } 3643 .gktFreeGiftcardPopupConfirmationPageButtons{ 3644 display:grid; 3645 grid-template-columns:1fr 1fr; 3646 grid-gap:10px; 3647 } 3648 .gktFreeGiftcardPopupButton, .gktFreeGiftcardPopupCheckoutButton, .gktFreeGiftcardPopupContinueShoppingButton{ 3649 cursor: pointer; 3650 padding: 6px 12px; 3651 font-weight: 500; 3652 text-align: center; 3653 background-color: black; 3654 color: white; 3655 transition: transform .2s; 3656 font-size:16px; 3657 } 3658 .gktFreeGiftcardPopupContinueShoppingButton{ 3659 background-color: white; 3660 color: black; 3661 } 3662 .gktFreeGiftcardPopupConfirmationPageDescription{ 3663 font-size: 16px; 3664 text-align: center; 3665 font-weight: 600; 3666 margin-bottom: 0; 3667 margin-top: 0; 3668 padding-top: 10px; 3669 } 3670 .gktFreeGiftcardPopupConfirmationPage{ 3671 } 3672 .gktFreeGiftcardPopupModalClose{ 3673 position:absolute; 3674 top:5px; 3675 right:5px; 3676 fill: rgba(255,255,255,0.851); 3677 background: rgba(32,33,36,0.4); 3678 -webkit-border-radius: 50%; 3679 border-radius: 50%; 3680 width: 24px; 3681 height: 24px; 3682 padding: 1px; 3683 align-self: baseline; 3684 justify-self: end; 3685 margin-top: 3px; 3686 margin-right: 3px; 3687 cursor: pointer; 3688 } 3689 .gktFreeGiftcardPopupConfirmationPageImage{ 3690 width: 100%; 3691 height: 150px !important; 3692 object-fit: cover !important; 3693 } 3694 .gktFreeGiftcardPopupModalClose:focus, 3695 .gktFreeGiftcardPopupModalClose:hover{ 3696 color: #000; 3697 text-decoration: none; 3698 cursor: pointer; 3699 } 3700.gktFreeGiftcardPopupButton:hover, .gktFreeGiftcardPopupModalWrapper button:hover { 3701 transform: scale(0.95); 3702} 3703 .gktFreeGiftcardPopupModal { 3704 position: fixed; 3705 top: 25%; 3706 left: 50%; 3707 max-width: 450px; 3708 width: 45vw !important; 3709 margin: 10px auto; 3710 padding:10px 20px; 3711 margin-top: 20vh !important; 3712 border-radius: 4px; 3713 background: #fefefe; 3714 box-shadow: 0 0 10px #000; 3715 animation-name: fadeIn_Modal; 3716 animation-duration: .2s; 3717 transform: translate(-50%, -50%); 3718 line-height: 16px; 3719 max-height: 90vh; 3720 overflow-y: auto; 3721 overflow-x: hidden; 3722 display: none; 3723 } 3724 3725 img.gktFreeGiftcardPopupImage { 3726 width: 100%; 3727 height: 200px; 3728 object-fit: contain; 3729 } 3730 3731 .gktFreeGiftcardPopupHeading{ 3732 font-size: 20px; 3733 margin: 0 !important; 3734 padding: 8px !important; 3735 text-align:center; 3736 } 3737 .gktFreeGiftcardPopupInputFields{ 3738 display:grid; 3739 grid-gap:5px; 3740 margin: 0 !important; 3741 3742 } 3743 .gktFreeGiftcardPopupInputFields > input{ 3744 display: block; 3745 width: 100%; 3746 margin: 0 !important; 3747 padding: 10px 20px !important; 3748 background-color: #f3f4f3 !important; 3749 border: 1px solid #f3f4f3 !important; 3750 border-radius: 0px !important; 3751 font-size: 14px !important; 3752} 3753 3754.gktFreeGiftcardPopupModalBody{ 3755 height:100%; 3756 width:100%; 3757 display:grid; 3758 grid-gap:5px; 3759} 3760textarea.gktFreeGiftcardPopupTextArea{ 3761 display: block; 3762 width: 100%; 3763 margin-top: 10px; 3764 resize:none; 3765 padding: 10px 20px !important; 3766 background-color: #f3f4f3 !important; 3767 border: 1px solid #f3f4f3 !important; 3768 border-radius: 0px !important; 3769 font-size: 14px !important; 3770 margin: 0 !important; 3771 min-height: 90px !important; 3772} 3773.gktFreeGiftcardPopupButton{ 3774 display: block; 3775 width: 100%; 3776 height: fit-content; 3777 margin-top: 0 !important; 3778 padding: 10px 20px; 3779}
3780.gktModalCheckoutButton:hover { 3781 transform: scale(0.95); 3782} 3783.gktModalCheckoutButton{ 3784 cursor: pointer; 3785} 3786.gktFreeGiftcardPopupInputFieldsEmailError{ 3787 display: block; 3788 font-size: 12px; 3789 color: red; 3790 padding-top:2px; 3791} 3792@media only screen and (max-width: 600px) { 3793 .gktFreeGiftcardPopupModal { 3794 margin-top: 0 !important; 3795 top: 0; 3796 left: 0; 3797 transform: translate(0px, 0px); 3798 border-radius: 0px; 3799 height: 100vh !important; 3800 max-height: 100vh !important; 3801 min-width: 100%; 3802 } 3803 3804} 3805 3806 3807.gktGiftCardWrapper{ 3808 display: none; 3809} 3810 3811.productPageGiftCardUi{ 3812 display: grid; 3813 width: 100%; 3814 grid-gap: 10px; 3815 padding: 3px 0px; 3816 margin: 3px 0px; 3817} 3818 3819.gktGiftCardModalWrapper { 3820 display: none; 3821 width: 100%; 3822 height: 100vh; 3823 position: fixed; 3824 opacity: 1; 3825 background: #222; 3826 z-index: 999999999; 3827 top: 0; 3828 left: 0; 3829 overflow: hidden; 3830 animation-name: fadeIn_Container; 3831 animation-duration: .2s 3832 } 3833 .gktGiftCardModalWrapper{ 3834 background-color: #2229; 3835 } 3836 /* Modal Content */ 3837 .gktGiftCardModal{ 3838 position: fixed; 3839 top: 25%; 3840 left: 50%; 3841 max-width: 600px; 3842 width: 55vw !important; 3843 margin: 10px auto; 3844 padding:20px 30px 30px; 3845 margin-top: 20vh !important; 3846 border-radius: 4px; 3847 background: #fefefe; 3848 animation-name: fadeIn_Modal; 3849 animation-duration: .2s; 3850 transform: translate(-50%, -50%); 3851 line-height: 16px; 3852 max-height: 90vh; 3853 overflow-y: auto; 3854 overflow-x: hidden; 3855 color: black !important; 3856 } 3857 3858 3859 3860.gktGiftCardInputFieldsDiv{ 3861 display: grid; 3862} 3863 3864 /* Header should be in one line*/ 3865 .gktGiftCardModalHeader { 3866 display: grid; 3867 grid-template-columns: auto 25px; 3868 } 3869 3870 3871 .gktGiftCardModalPopupHeading > p { 3872 margin: 0 !important; 3873 } 3874 .gktGiftCardModalPopupHeading{ 3875 font-size: 20px; 3876 3877 } 3878 .gktGiftCardModalClose{ 3879 -webkit-border-radius: 50%; 3880 border-radius: 50%; 3881 width: 24px; 3882 height: 24px; 3883 padding: 1px; 3884 align-self: baseline; 3885 justify-self: end; 3886 margin-top: 3px; 3887 margin-right: 3px; 3888 cursor: pointer; 3889 } 3890 3891 3892 .gktGiftCardContent hr{ 3893 unset:all; 3894 } 3895 3896 .gktGiftCardModalClose:hover, 3897 .gktGiftCardModalClose:focus { 3898 color: #000; 3899 text-decoration: none; 3900 cursor: pointer; 3901 } 3902 .gktGiftCardInputFieldsDiv > div { 3903 display: grid; 3904 padding-bottom:5px; 3905 margin-bottom:10px; 3906 } 3907 3908 .gktGiftCardInputFieldsDiv label{ 3909 line-height: 1.2; 3910 margin-bottom:0px; 3911 font-size: 14px; 3912 color:black !important; 3913 padding-bottom:5px; 3914 text-transform:none !important; 3915 letter-spacing:0px !important; 3916 } 3917 3918 .gktGiftCardModalCheckbox{ 3919 display: block !important; 3920 } 3921.gktGiftCardModalCheckbox input[type="checkbox"]{ 3922 display: inline-block; 3923 margin-right: 10px; 3924 margin-left: 0px; 3925 width: auto; 3926 height: max-content !important; 3927 } 3928 .gktGiftCardModalCheckbox .gktGiftCardModalCheckboxLabel{ 3929 display: inline-block; 3930 margin-right: 10px; 3931 margin-left: 0px; 3932 width: auto; 3933 } 3934 3935 3936 .gktGiftCardContainer { 3937 height: 400px; 3938 border-top: 1px solid #A2A2A2 !important; 3939 display: grid; 3940 grid-template-rows: 1fr 9fr; 3941} 3942 3943 .gktGiftCardDetailsContent input, .productPageGiftCardUi input{ 3944 margin:0px; 3945 padding: 10px 18px; 3946 width: 100%; 3947 background-color: #ffffff; 3948 color: #000000; 3949 max-width: 100%; 3950 line-height: 1.2; 3951 border-radius: 2px; 3952 padding-bottom: 10px; 3953 border: 1px solid #A2A2A2; 3954 font-size:14px !important; 3955 } 3956 3957 .productPageGiftCardUi textarea{ 3958 margin:0px; 3959 padding: 10px 18px; 3960 width: 100%; 3961 background-color: #ffffff; 3962 color: #000000; 3963 max-width: 100%; 3964 line-height: 1.2; 3965 border-radius: 2px; 3966 padding-bottom: 10px; 3967 border: 1px solid #A2A2A2; 3968 font-size:14px !important; 3969 } 3970 3971 .gktGiftCardMessageInputFieldsDiv textarea { 3972 margin:0px; 3973 padding: 10px 18px; 3974 width: 100%; 3975 border: 1px solid #cccccc; 3976 background-color: #ffffff; 3977 color: #000000; 3978 max-width: 100%; 3979 line-height: 1.2; 3980 border-radius: 2px; 3981 padding-bottom: 10px; 3982 max-height: 70px !important; 3983 min-height:50px !important; 3984 border: 1px solid #A2A2A2; 3985 resize: none; 3986 width: 100%; 3987 height: 126px; 3988 padding: 10px; 3989}
3990 .greetingCardMainBody,.gktGiftCardDetailsContent,.gktGiftCardMessageContent{ 3991 background: #F2F2F2 0% 0% no-repeat padding-box; 3992 padding:20px; 3993 font-size:14px !important; 3994 } 3995 3996 .greetingCardMainBody{ 3997 padding:0px; 3998 // why are we declaring this here? 3999 // because we dont want to have padding for scroll 4000 } 4001 .gktGiftCardMessageDivider{ 4002 display: block !important; 4003 border: 1px solid #A2A2A2 !important; 4004 height: 0px; 4005 opacity: 0.5; 4006 } 4007.gktGiftCardMessageLabel{ 4008 text-align: left; 4009 letter-spacing: 0px; 4010 display: block; 4011 color: #000000; 4012 padding-bottom: 10px; 4013 opacity: 1; 4014} 4015 4016 4017 4018 .gktGiftCardDetailsContent { 4019 font-size: 16px; 4020 height: 400px; 4021 overflow-y: auto; 4022 text-align: start; 4023 } 4024 .gktGiftCardEmailValidation,.gktGiftCardDateValidation{ 4025 color: red; 4026 margin: 0; 4027 padding: 0; 4028 font-size: 12px; 4029 } 4030 .gktGiftCardInputFieldsDiv label[required]::after, label[required]:after{ 4031 content: '*'; 4032 margin-right: 4px; 4033 color: red; 4034 } 4035 .gktGiftCardDateLabel{ 4036 margin:0px !important; 4037 padding:0px !important; 4038 } 4039 .gktGiftCardInputRow5{ 4040 padding:0px !important; 4041 } 4042 4043 .gktGiftCardContentHeader{ 4044 4045 } 4046 .gktGiftCardContentFooter{ 4047 margin: 10px auto; 4048 margin-bottom: 30px; 4049 } 4050 .gktGiftCardContentFooterBtn1{ 4051 cursor: pointer; 4052 padding: 12px 12px; 4053 font-weight: 500; 4054 text-align: center; 4055 background-color: #A96668; 4056 color: white; 4057 transition: transform .2s; 4058 font-size:16px; 4059 } 4060 .gktGiftCardContentFooterBtn1:hover { 4061 transform: scale(0.95); 4062} 4063 .gktGiftCardContentFooterBtn2{ 4064 4065 } 4066 4067 4068 4069 .greetingCardMainBody { 4070 height: 100%; 4071 display: grid; 4072 grid-template-columns: 1fr; 4073 overflow-y: hidden; 4074} 4075.greetingCardCategoryListItemText{ 4076 text-align: center; 4077 line-height: 30px; 4078 width: 100%; 4079 display: block; 4080 text-decoration: none; 4081 color: #008060; 4082 font-size: 16px; 4083} 4084 4085.greetingCardImageList .greetingCardImageLabel{ 4086} 4087// css class for the checked image 4088.greetingCardImageList .greetingCardLabel input:checked{ 4089 border:2px solid #A96668; 4090 border-radius:5px; 4091} 4092 4093.greetingCardImagePreview{ 4094 width:100%; 4095 align-self:center; 4096 display:none; 4097} 4098.activeGreetingCardCategory a, .greetingCardCategoryListItem a:hover { 4099 color:black !important; 4100 cursor:pointer; 4101 border-bottom: 1px solid black; 4102} 4103 4104.greetingCardImage:hover{ 4105 transform: scale(1.05); 4106 transition: transform .3s; 4107 border-radius:5px; 4108} 4109 4110OLD .greetingCardCategoryListItem{ 4111 display:inline-block; 4112 font-size:16px; 4113 text-transform:capitalize; 4114 text-transform:uppercase; 4115 padding-right:10px; 4116} 4117 4118.greetingCardCategoryList{ 4119 text-align: left; 4120 list-style: none; 4121 display:grid; 4122 grid-template-columns: repeat(3,max-content); 4123 padding: 0; 4124 margin: 10px 0 15px; 4125 grid-gap:25px; 4126} 4127 4128.greetingCardCategoryListItem{ 4129 display: inline-block; 4130 text-align: center; 4131 height: auto; 4132 line-height: 2em; 4133 padding: 0; 4134 margin: 0; 4135} 4136 4137.activeGreetingCard{ 4138 border:2px solid black; 4139 border-radius:5px; 4140} 4141 4142.greetingCardImageInput{ 4143 position:absolute; 4144 top:0; 4145 left:0; 4146 width:100%; 4147 height:100%; 4148 visibility:hidden; 4149} 4150 4151.greetingCardImageList{ 4152 display:grid; 4153 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 4154 overflow-x: hidden; 4155 overflow-y: auto; 4156 padding-right:5px; 4157 height:350px; 4158 padding:20px; 4159} 4160 4161.gktVideoMsgCheckboxField,.gktVideoMessageFileInput{ 4162 visibility:hidden; 4163} 4164 4165.greetingCardImageList .greetingCardImageLabel img{ 4166 /* max-width:100%; */ 4167 padding:10px; 4168 width: 100%; 4169 width: -moz-available; /* WebKit-based browsers will ignore this. */ 4170 width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */ 4171 width: fill-available; 4172} 4173 4174.greetingCardImageLabel{ 4175 position:relative; 4176 cursor:pointer; 4177 display:inline-block; 4178 width:100%; 4179 align-self:center; 4180 4181} 4182 4183.gktGiftCardSendNowButton, .gktGiftCardSendLaterButton{ 4184 background: inherit ; 4185} 4186.gktGiftCardSendNowButton:hover,.gktGiftCardSendLaterButton:hover{ 4187 background: inherit; 4188} 4189.gktGiftCardSendNowButton, .gktGiftCardSendLaterButton{ 4190 display: inline-block; 4191 justify-content: center; 4192 cursor: pointer; 4193 line-height: 30px; 4194 margin:0px; 4195 padding:6px; 4196 font-weight: 700; 4197 text-transform: uppercase; 4198 font-size: 12px; 4199 color: #585858; 4200 border: 1px solid #f3f3f3; 4201 border-top: 0 solid #f3f3f3; 4202 border-color: #f3f3f3!important; 4203 transition: transform .2s; 4204 font-family:inherit; 4205} 4206 4207.gktGiftCardSendNowButton:hover, .gktGiftCardSendLaterButton:hover{ 4208 4209 transform: scale(0.95); 4210 4211} 4212 4213.activeDeliveryOption{ 4214 border: 1px solid #A2A2A2 !important; 4215} 4216 4217/*** Giftcard Modal Css ***/ 4218.gktGiftCardModalPopupHeading{ 4219 font-size:16px; 4220 margin:0; 4221 padding:10px; 4222} 4223.gktGiftCardModalSubText{ 4224 font-size:16px; 4225 margin-bottom:10px; 4226} 4227.activeContent{ 4228 font-weight:bold; 4229 color:black; 4230} 4231.gktGiftCardModalNavForMobile{ 4232 display:none; 4233} 4234.gktDeliveryOptions{ 4235 display:grid; 4236 grid-template-columns: 1fr 1fr; 4237 margin:10px 0px; 4238 grid-gap: 5px; 4239 text-align: center; 4240} 4241 4242.gktGiftCardModalBackButton{ 4243 cursor:pointer; 4244 font-size: 14px; 4245 position: absolute; 4246 color:black; 4247 top: 10px; 4248 padding-top: 10px; 4249 display: inline-grid; 4250 grid-auto-flow: column; 4251 justify-items: center;
4252 align-items: center; 4253 left: 30px; 4254 top: 10px; 4255 4256} 4257 4258.gktGiftCardModalNav{ 4259 display: flex; 4260 flex-direction: row; 4261 gap: 10px; 4262 padding-bottom: 10px !important; 4263 padding-top:10px !important; 4264} 4265 4266.gktGiftCardModalNav li{ 4267 display:inline-block; 4268 margin:0; 4269 padding:0 10px; 4270 list-style: none; 4271 color: grey; 4272} 4273.gktGiftCardModalNavListItem.activeNavItem{ 4274 color: black; 4275} 4276.gktGiftCardModalNavListItem{ 4277 font-size: 16px; 4278} 4279@media screen and (max-width: 600px) { 4280 .gktGiftCardModal { 4281 top: 25%; 4282 left: 50%; 4283 min-width: 250px; 4284 /* width: 100vw !important; */ 4285 padding: 10px 20px; 4286 margin-top: 0 !important; 4287 top: 0; 4288 left: 0; 4289 transform: translate(0px, 0px); 4290 border-radius: 0px; 4291 height: 100vh !important; 4292 max-height: 100vh !important; 4293 min-width: 100%; 4294 min-width: -moz-available; /* WebKit-based browsers will ignore this. */ 4295 min-width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */ 4296 min-width: fill-available; 4297 } 4298 .gktGiftCardContainer,.gktGiftCardDetailsContent { 4299 height: max-content; 4300 grid-template-rows: auto auto; 4301 } 4302 .greetingCardMainBody{ 4303 grid-template-columns: 1fr; 4304 height: fit-content; 4305 4306 } 4307 .greetingCardImagePreview{ 4308 display:none; 4309 width:0; 4310 } 4311 .greetingCardImageList{ 4312 display:grid; 4313 grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 4314 height: fit-content; 4315 max-height: 65vh; 4316 } 4317 .greetingCardCategoryList{ 4318 grid-template-columns: repeat(3,1fr); 4319 } 4320 .gktDeliveryOptions{ 4321 display:grid; 4322 grid-template-columns: 1fr 1fr; 4323 text-align: center; 4324 } 4325 .gktGiftCardModalNav{ 4326 display:none; 4327 } 4328 .gktGiftCardModalNavForMobile{ 4329 display:block; 4330 padding-top: 20px; 4331 padding-bottom:20px; 4332 } 4333 .gktGiftCardModalBackButton{ 4334 left: 10px; 4335 top: 5px; 4336 } 4337 4338 } 4339 4340 4341/**** Checkmark css ***/ 4342.gkt_checkmark { 4343 display:inline-block; 4344 position:absolute; 4345 top:10px; 4346 left:10px; 4347 width: 22px; 4348 height:22px; 4349 -ms-transform: rotate(45deg); /* IE 9 */ 4350 -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */ 4351 transform: rotate(45deg); 4352} 4353 4354.gkt_checkmark_circle { 4355 display:block !important; 4356 position: absolute; 4357 width:22px; 4358 height:22px; 4359 background-color: green; 4360 border-radius:11px; 4361 left:0; 4362 top:0; 4363 opacity:0.5; 4364} 4365 4366.gkt_checkmark_stem { 4367 display:block !important; 4368 position: absolute; 4369 width:3px; 4370 height:9px; 4371 background-color:#fff; 4372 left:11px; 4373 top:6px; 4374} 4375 4376.gkt_checkmark_kick { 4377 display:block !important; 4378 position: absolute; 4379 width:3px; 4380 height:3px; 4381 background-color:#fff; 4382 left:8px; 4383 top:12px; 4384} 4385.gktGiftCardMessageContent{ 4386 margin:0 !important; 4387 display:grid; 4388 background: #F2F2F2 0% 0% no-repeat padding-box; 4389 grid-gap:20px; 4390 overflow-y: auto; 4391} 4392 4393 4394.gktVideoMessageCheckboxRow{ 4395 display: grid; 4396 grid-auto-flow: column; 4397 4398} 4399.gktVideoMsgCheckboxLabel{ 4400 text-align: left; 4401 letter-spacing: 0px; 4402 color: #000000; 4403} 4404 .gktVideoMsgCheckboxWrapper { 4405 position: relative; 4406 display: inline-block; 4407 width: 44px; 4408 justify-self: end; 4409 height: 26px; 4410 } 4411 4412.gktVideoMsgToggle input{ 4413 opacity: 0; 4414 width: 0; 4415 height: 0; 4416 } 4417 4418.gktVideoMsgSlider, .gktVideoMsgSlider_Mobile { 4419 position: absolute; 4420 cursor: pointer; 4421 top: 0; 4422 left: 0; 4423 right: 0; 4424 bottom: 0; 4425 background-color: #fff; 4426 border: 1px solid black; 4427 -webkit-transition: .4s; 4428 transition: .4s; 4429 } 4430 4431 .gktVideoMsgSlider:before, .gktVideoMsgSlider_Mobile:before { 4432 position: absolute; 4433 content: ""; 4434 height: 20px; 4435 width: 20px; 4436 left: 4px; 4437 bottom: 4px; 4438 top:2px; 4439 background-color: white; 4440 -webkit-transition: .4s; 4441 transition: .4s; 4442 } 4443 4444 input:checked + .gktVideoMsgSlider , 4445 input:checked + .gktVideoMsgSlider_Mobile{ 4446 background-color: black; 4447 } 4448 4449 input:checked + .gktVideoMsgSlider:before, 4450 input:checked + .gktVideoMsgSlider_Mobile:before { 4451 -webkit-transform: translateX(16px); 4452 -ms-transform: translateX(16px); 4453 4454 transform: translateX(16px); 4455 } 4456 4457 .gktGiftCardContent ::-webkit-scrollbar {
4458 width: 5px; 4459 } 4460 4461 /* Track */ 4462 .gktGiftCardContent ::-webkit-scrollbar-track { 4463 background: #f1f1f1; 4464 } 4465 4466 /* Handle */ 4467 .gktGiftCardContent ::-webkit-scrollbar-thumb { 4468 background: #2c2c2c 0% 0% no-repeat padding-box; 4469 } 4470 4471 /* Handle on hover */ 4472 .gktGiftCardContent ::-webkit-scrollbar-thumb:hover { 4473 background: #000000 0% 0% no-repeat padding-box; 4474 } 4475 /* Rounded sliders */ 4476 .slider.round, .gktVideoMsgSlider, 4477 .slider.round, .gktVideoMsgSlider_Mobile { 4478 border-radius: 34px; 4479 } 4480 4481 .slider.round:before, .gktVideoMsgSlider:before , 4482 .slider.round:before, .gktVideoMsgSlider_Mobile:before { 4483 border-radius: 50%; 4484 border: 1px solid black; 4485 } 4486 4487 .gktGiftCardModalNavListItemSpan{ 4488 display: inline-grid; 4489 align-items: center; 4490 } 4491 4492.gktGiftCardModal form { 4493 position: unset; 4494} 4495 4496.gktVideoMessageFileInput{ 4497 visibility: hidden; 4498} 4499 4500/* The container */ 4501.gktGiftCardModalCheckboxContainer{ 4502 position: relative; 4503} 4504 4505 4506.gktGiftCardModalCheckbox { 4507 display: block; 4508 position: relative; 4509 padding-left: 25px; 4510 cursor: pointer; 4511 -webkit-user-select: none; 4512 -moz-user-select: none; 4513 -ms-user-select: none; 4514 user-select: none; 4515} 4516 4517 4518 4519/* Hide the browser's default checkbox */ 4520.gktGiftCardModalCheckbox input { 4521 position: absolute; 4522 opacity: 0; 4523 cursor: pointer; 4524 height: 0; 4525 width: 0; 4526} 4527 4528/* Create a custom checkbox */ 4529 4530.gktCustomCheckboxCheckmarkSmall { 4531 position: absolute; 4532 top: 0px; 4533 left: 0px; 4534 height: 18px; 4535 width: 18px; 4536 border: 1px solid #a2a2a2; 4537 border-radius: 4px; 4538} 4539 4540/* On mouse-over, add a grey background color */ 4541.gktGiftCardModalCheckbox:hover input ~ .gktCustomCheckboxCheckmarkSmall { 4542 background-color: #ccc; 4543} 4544 4545/* When the checkbox is checked, add a blue background 4546.gktGiftCardModalCheckbox input:checked ~ .gktCustomCheckboxCheckmarkSmall { 4547 background-color: #2196F3; 4548} */ 4549 4550/* Create the gktCustomCheckboxCheckmarkSmall/indicator (hidden when not checked) */ 4551.gktCustomCheckboxCheckmarkSmall:after { 4552 content: ""; 4553 position: absolute; 4554 display: none; 4555} 4556 4557/* Show the gktCustomCheckboxCheckmarkSmall when checked */ 4558.gktGiftCardModalCheckbox input:checked ~ .gktCustomCheckboxCheckmarkSmall:after { 4559 display: block; 4560} 4561 4562/* Style the gktCustomCheckboxCheckmarkSmall/indicator */ 4563.gktGiftCardModalCheckbox .gktCustomCheckboxCheckmarkSmall:after { 4564 left: 5px; 4565 top: 1px; 4566 width: 6px; 4567 height: 10px; 4568 border: solid #009c00; 4569 border-width: 0 3px 3px 0; 4570 -webkit-transform: rotate(45deg); 4571 -ms-transform: rotate(45deg); 4572 transform: rotate(45deg); 4573} 4574 4575 4576 4577 4578 4579 4580 4581 4582 .gktGiftMessageContainer { 4583 display: grid; 4584 grid-template-columns: 1fr; 4585 grid-template-rows: auto; 4586 padding: 5px 0px; 4587 } 4588 4589 .gktGiftMessageItemContainer{ 4590 display: grid; 4591 grid-template-columns: 1fr; 4592 grid-template-rows: auto; 4593 padding: 3px 0px; 4594 margin: 3px 0px; 4595 border-radius: 3px; 4596 font-size: 14px; 4597 } 4598 4599 .gktGiftMessageItemContainer label { 4600 margin-bottom: 0px 4601 } 4602 4603 .gktGiftMessageItemContainerLabelText{ 4604 align-self: center; 4605 font-size:14px; 4606 justify-self: left; 4607 text-align: left; 4608 } 4609 4610 .gktGiftMessageItemContainerLabelText > p{ 4611 padding: 0px; 4612 margin: 0px; 4613 } 4614 4615 .gktGiftMessageImage{ 4616 width: 40px; 4617 height: 40px; 4618 border: 1px solid #f1f2f3; 4619 } 4620 .gktGiftMessageItemContainerItem1{ 4621 grid-row: 1 / 5; 4622 } 4623 4624 .gktGiftMessageItemContainerItem2{ 4625 4626 } 4627 4628 .gktGiftMessageItemContainerItem3{ 4629 position: relative; 4630 display: flex; 4631 width: fit-content; 4632 height: 30px; 4633 border-radius: 4px; 4634 overflow: hidden; 4635 } 4636 4637 label.gktCustomCheckboxMsgContainer { 4638 display: grid; 4639 grid-template-columns: 1fr; 4640 min-height: 30px; 4641 font-weight: 600; 4642 } 4643 4644 /* The container */ 4645 .gktCustomCheckboxMsgContainer { 4646 display: block; 4647 position: relative; 4648 padding-left: 35px; 4649 4650 cursor: pointer; 4651 -webkit-user-select: none; 4652 -moz-user-select: none; 4653 -ms-user-select: none; 4654 user-select: none; 4655 } 4656 4657 /* Hide the browser's default checkbox */ 4658 .gktCustomCheckboxMsgContainer input { 4659 position: absolute; 4660 opacity: 0; 4661 cursor: pointer; 4662 height: 0; 4663 width: 0; 4664 } 4665 4666 /* Create a custom checkbox */ 4667 .gktCustomMsgCheckboxCheckmark { 4668 position: absolute; 4669 top: 2px; 4670 left: 0; 4671 height: 25px; 4672 width: 25px; 4673 border: 1px solid #a2a2a2; 4674 border-radius: 4px; 4675 } 4676 4677 /* On mouse-over, add a grey background color */ 4678 .gktCustomCheckboxMsgContainer:hover input ~ .gktCustomMsgCheckboxCheckmark { 4679 background-color: #ccc; 4680 } 4681 4682 /* When the checkbox is checked, add a blue background 4683 .gktCustomCheckboxMsgContainer input:checked ~ .gktCustomMsgCheckboxCheckmark { 4684 background-color: #2196F3; 4685 } */ 4686 4687 /* Create the gktCustomMsgCheckboxCheckmark/indicator (hidden when not checked) */ 4688 .gktCustomMsgCheckboxCheckmark:after { 4689 content: ""; 4690 position: absolute; 4691 display: none; 4692 } 4693 4694 /* Show the gktCustomMsgCheckboxCheckmark when checked */ 4695 .gktCustomCheckboxMsgContainer input:checked ~ .gktCustomMsgCheckboxCheckmark:after { 4696 display: block; 4697 } 4698 4699 /* Style the gktCustomMsgCheckboxCheckmark/indicator */ 4700 .gktCustomCheckboxMsgContainer .gktCustomMsgCheckboxCheckmark:after { 4701 left: 8px; 4702 top: 1px; 4703 width: 8px; 4704 height: 16px; 4705 border: solid #009c00; 4706 border-width: 0 3px 3px 0; 4707 -webkit-transform: rotate(45deg); 4708 -ms-transform: rotate(45deg); 4709 transform: rotate(45deg); 4710 } 4711 4712 4713 textarea.gktGiftMessageTextArea { 4714 display: none; 4715 border: 1px solid #b9babb; 4716 height: 60px; 4717 margin-left: 1px; 4718 -webkit-transition: all 0.6s ease-in-out; 4719 transition: all 0.6s ease-in-out; 4720 font-size: 14px; 4721 4722 } 4723 4724 4725 4726 .openGiftKartModal { 4727 vertical-align: middle; 4728 } 4729 4730 #other { 4731 text-align: right; 4732 width: 100%; 4733 max-width: 100%; 4734 } 4735 4736 .header__inline h1, 4737 .header__inline h2, 4738 .header__inline h3, 4739 .header__inline h4, 4740 .header__inline h5, 4741 .header__inline h6, 4742 .header__inline p { 4743 display: inline; 4744 } 4745 4746 4747 .GiftKartModalbtn:hover, 4748 .gktModalSave:hover { 4749 transform: scale(0.95); 4750 } 4751 4752 4753 .GiftKartContainer { 4754 display: none; 4755 width: 100%; 4756 height: 100vh; 4757 position: fixed; 4758 opacity: 1; 4759 background: #222; 4760 z-index: 999999999; 4761 top: 0; 4762 left: 0; 4763 overflow: hidden; 4764 animation-name: fadeIn_Container; 4765 animation-duration: 1s 4766 } 4767 4768 .GiftKartModal { 4769 display: none; 4770 top: 0; 4771 min-width: 250px; 4772 width: 50vw !important; 4773 margin: 0 auto; 4774 margin-top: 25vh !important; 4775 z-index: 9999999999; 4776 background: #fff; 4777 box-shadow: 0 0 10px #000; 4778 animation-name: fadeIn_Modal; 4779 animation-duration: .8s; 4780 } 4781 4782 .GiftKartheader { 4783 padding: 5px 10px; 4784 width: 100%; 4785 height: 70px; 4786 border-radius: 10px 10px 0 0; 4787 border-bottom: 2px solid #ccc 4788 } 4789 4790 .GiftKartheader a { 4791 text-decoration: none; 4792 float: right; 4793 line-height: 70px; 4794 margin-right: 20px; 4795 color: #aaa 4796 } 4797 4798 .GiftKartcontent { 4799 width: 100%; 4800 } 4801 4802 #first_label { 4803 padding-top: 30px 4804 } 4805 4806 #second_label { 4807 padding-top: 25px 4808 } 4809 4810 .GiftKartfooter, 4811 .gktModalFooter { 4812 padding: 13px 10px; 4813 text-align: right; 4814 width: 100%; 4815 4816 } 4817 4818 4819 4820 4821 @media screen and (max-width: 900px) { 4822 .GiftKartModalContent-left { 4823 display: none; 4824 } 4825 4826 .GiftKartModalContent { 4827 grid-template-columns: 1fr !important; 4828 } 4829 4830 .GiftKartModalContent-right-giftingOptions { 4831 font-size: 15px !important; 4832 } 4833 } 4834
4835 @keyframes fadeIn_Modal { 4836 from { 4837 opacity: 0 4838 } 4839 4840 to { 4841 opacity: 1 4842 } 4843 } 4844 4845 @keyframes fadeIn_Container { 4846 from { 4847 opacity: 0 4848 } 4849 4850 to { 4851 opacity: .9 4852 } 4853 } 4854 4855 #is-a-gift { 4856 margin: 0px; 4857 padding: 10px; 4858 } 4859 4860 #giftnote, 4861 .gktMessageTextarea { 4862 color: #636363; 4863 border: 1px solid #ccc; 4864 width: 100%; 4865 border-radius: 5px; 4866 height: 200px; 4867 padding: 10px; 4868 margin-top: 5px; 4869 resize: none; 4870 font-size: 14px !important; 4871 } 4872 4873 .giftnote-giftKart { 4874 border: 1px solid black !important; 4875 border-radius: 0px !important; 4876 } 4877 4878 .giftnote-giftKart:focus { 4879 outline: 0; 4880 } 4881 4882 .GiftKartModalContent { 4883 display: grid; 4884 grid-template-columns: 1fr 1fr; 4885 grid-template-rows: 1; 4886 } 4887 4888 .GiftKartModalContent-right { 4889 display: grid; 4890 grid-template-columns: 1fr; 4891 grid-template-rows: 30px 50px; 4892 } 4893 4894 .GiftKartModalContent-right-closeButton, 4895 .gktModalClose { 4896 fill: rgba(255, 255, 255, 0.851); 4897 background: rgba(32, 33, 36, 0.1); 4898 -webkit-border-radius: 50%; 4899 border-radius: 50%; 4900 width: 24px; 4901 height: 24px; 4902 padding: 1px; 4903 align-self: baseline; 4904 justify-self: end; 4905 margin-top: 3px; 4906 margin-right: 3px; 4907 cursor: pointer; 4908 } 4909 4910 .GiftKartModalContent-right-header { 4911 align-self: center; 4912 justify-self: center; 4913 font-weight: 1000; 4914 } 4915 4916 .GiftKartModalContent-right-giftingOptions { 4917 font-size: 20px; 4918 padding: 10px; 4919 } 4920 4921 .GiftKartModalContent-right-footer { 4922 margin: 15px 20px; 4923 display: grid; 4924 align-items: center; 4925 } 4926 4927 .GiftKartModalbtn, 4928 .gktModalSave { 4929 cursor: pointer; 4930 padding: 6px 12px; 4931 font-weight: 500; 4932 text-align: center; 4933 background-color: #A96668; 4934 color: white; 4935 transition: transform .2s; 4936 margin: 0 20%; 4937 } 4938 4939 .ql-size-small { 4940 font-size: 11px; 4941 } 4942 4943 .ql-size-large { 4944 font-size: 26px; 4945 } 4946 4947 .ql-size-huge { 4948 font-size: 36px; 4949 } 4950 4951 .gktModalWrapper { 4952 4953 display: none; 4954 width: 100%; 4955 height: 100vh; 4956 position: fixed; 4957 opacity: 1; 4958 background: #222; 4959 z-index: 999999999; 4960 top: 0; 4961 left: 0; 4962 overflow: hidden; 4963 animation-name: fadeIn_Container; 4964 animation-duration: 1s 4965 } 4966 4967 /* Modal Content */ 4968 .gktModal { 4969 4970 position: fixed; 4971 top: 25%; 4972 left: 50%; 4973 min-width: 250px; 4974 width: 50vw !important; 4975 margin: 10px auto; 4976 padding: 10px; 4977 margin-top: 25vh !important; 4978 border-radius: 2%; 4979 background: #fefefe; 4980 box-shadow: 0 0 10px #000; 4981 animation-name: fadeIn_Modal; 4982 animation-duration: .8s; 4983 4984 transform: translate(-50%, -50%); 4985 } 4986 4987 4988 4989 4990 .gktModalClose:hover, 4991 .gktModalClose:focus { 4992 color: #000; 4993 text-decoration: none; 4994 cursor: pointer; 4995 } 4996 4997 4998 4999 .gktPageWrapper { 5000 display: grid; 5001 grid-template-columns: 1fr; 5002 cursor: pointer !important; 5003 margin-bottom: 5px; 5004 /* padding: 0px 10px; */ 5005 } 5006 5007 5008 .gktPageWrapperV2 { 5009 display: grid; 5010 grid-template-columns: 1fr; 5011 cursor: pointer !important; 5012 5013 } 5014 5015 .gktProductPageUpsellWrapper { 5016 display: none; 5017 width: 100% 5018 } 5019 5020 .gktComboWrapper { 5021 display: none; 5022 , 5023 width: 100% 5024 } 5025 5026 .gktGiftMessageWrapper { 5027 display: none; 5028 width: 100% 5029 } 5030 5031 .gktGiftMsgAndWrapWrapper { 5032 display: none; 5033 width: 100% 5034 } 5035 5036 5037 .gktCartUpsellWrapper { 5038 display: none; 5039 width: 100% 5040 } 5041 5042 5043 5044 .gktCartGiftMessageWrapper { 5045 display: none; 5046 width: 100% 5047 } 5048 5049 .gktCartGiftMsgAndWrapWrapper { 5050 display: none; 5051 width: 100% 5052 } 5053 5054 .gktGiftMessageWrapper { 5055 display: none; 5056 width: 100% 5057 } 5058 5059 .gktCartGiftMessageWrapper { 5060 display: none; 5061 width: 100% 5062 } 5063 5064 5065 .gktPageWrapper input { 5066 display: inline-block; 5067 } 5068 5069 .gktPageWrapper label { 5070 margin-left: 1px; 5071 } 5072 5073 .giftCartPageWrapper { 5074 display: grid; 5075 grid-template-columns: 25px 4fr; 5076 align-items: baseline; 5077 justify-items: start; 5078 } 5079 5080 5081 5082 .gktModalHeader { 5083 padding: 10px; 5084 } 5085 5086 .gktContentWrapper { 5087 display: grid; 5088 } 5089 5090 .gktGridLayout { 5091 /* is attached dynamically to gktContentWrapper*/ 5092 grid-template-columns: 1fr 1fr; 5093 } 5094 5095 /*.gktLeftContent and gktRightContent */ 5096 .gktContentWrapper>div { 5097 display: grid; 5098 grid-template-rows: 1fr 3fr; 5099 grid-gap: 10px; 5100 padding: 5px 10px; 5101 margin: 5px 10px; 5102 font-size: 30px; 5103 } 5104 5105 .gktContentWrapper>div:empty { 5106 display: none; 5107 } 5108 5109 .gktMessageCheckboxHeading, 5110 .gktWrapCheckboxHeading { 5111 font-size: 20px !important; 5112 } 5113 5114 .gktModalFooter { 5115 text-align: center; 5116 } 5117 5118 5119 5120 /* Header should be in one line*/ 5121 .gktModalHeader { 5122 display: grid; 5123 grid-template-columns: auto 25px; 5124 } 5125 5126 5127 .gktProductPageWrapper { 5128 position: relative; 5129 justify-items: start; 5130 align-items: end; 5131 } 5132 5133 .gktJustifyCenter { 5134 justify-self: center; 5135 align-self: center; 5136 } 5137 5138 .gktGiftWrapImage { 5139 width: 200px; 5140 height: 200px; 5141 background-repeat: no-repeat; 5142 background-position: 50% 50%; 5143 justify-self: center; 5144 object-fit: cover; 5145 } 5146 5147 5148 .gktCartGiftMsgAndWrapHeader { 5149 display: grid; 5150 justify-items: left; 5151 padding: 3px 0px; 5152 margin: 3px 0px; 5153 5154 } 5155 5156 .gktGiftMsgAndWrapHeader { 5157 display: grid; 5158 justify-items: left; 5159 padding: 3px 0px; 5160 margin: 3px 0px; 5161 } 5162 5163 .gktGiftMsgAndWrapWrapperInnerEle { 5164 display: grid !important; 5165 grid-template-columns: 25px auto; 5166 align-items: center; 5167 justify-items: center; 5168 user-select: none; 5169 } 5170 5171 .gktGiftMsgAndWrapWrapperInnerEle p { 5172 margin: 0 !important; 5173 padding: 0 !important; 5174 } 5175 5176 5177 .gktGiftMsgAndWrapHeader>label { 5178 margin: 0 !important; 5179 padding: 0 !important; 5180 } 5181 5182 .gktCartGiftMsgAndWrapHeader>label { 5183 margin: 0 !important; 5184 padding: 0 !important; 5185 } 5186 5187 .gift-checkbox-giftKart { 5188 align-self: center; 5189 justify-self: center; 5190 } 5191 5192 .gktCheckboxLayout { 5193 display: grid !important; 5194 grid-template-columns: 25px auto; 5195 font-size: 20px; 5196 align-items: center; 5197 } 5198 5199 .gktMessageCheckboxHeading>p, 5200 .gktModalPopupHeading>p, 5201 .gktGiftWrapCheckboxHeading>p { 5202 margin: 0 !important; 5203 } 5204 5205 .gktAlignCenter { 5206 align-self: center; 5207 } 5208 5209 @media screen and (max-width: 900px) { 5210 .gktGridLayout { 5211 grid-template-columns: 1fr; 5212 } 5213 5214 .gktContentWrapper>div { 5215 grid-template-rows: 1fr !important; 5216 } 5217 5218 .gktLeftContent { 5219 grid-template-rows: 1fr 1fr !important; 5220 } 5221 5222 .gktMessageTextarea { 5223 width: 100% !important; 5224 height: 100px !important; 5225 } 5226 5227 .gktModal { 5228 top: 10% !important; 5229 5230 } 5231 5232 .gktDisplayWrapImageOnPhone { 5233 display: block !important; 5234 } 5235 5236 .gktModal { 5237 width: 95vw !important; 5238 } 5239 5240 .gktModalWrapper p, 5241 .gktModal p { 5242 font-size: 20px !important; 5243 } 5244 5245 } 5246 5247 .ql-font-arial { 5248 font-family: 'Arial'; 5249 } 5250 5251 .ql-font-times-new-roman { 5252 font-family: 'Times New Roman'; 5253 } 5254 5255 .ql-font-courier-new { 5256 font-family: 'Courier New'; 5257 } 5258 5259 .ql-font-comic-sans-ms { 5260 font-family: 'Comic Sans MS'; 5261 } 5262 5263 .ql-font-impact { 5264 font-family: 'Impact'; 5265 } 5266 5267 .ql-font-lucida-console { 5268 font-family: 'Lucida Console'; 5269 } 5270 5271 .ql-font-lucida-sans-unicode { 5272 font-family: 'Lucida Sans Unicode'; 5273 } 5274 5275 .ql-font-tahoma { 5276 font-family: 'Tahoma'; 5277 } 5278 5279 .ql-font-verdana { 5280 font-family: 'Verdana'; 5281 } 5282 5283 .ql-font-helvetica { 5284 font-family: 'Helvetica'; 5285 } 5286 5287 .ql-font-trebuchet-ms { 5288 font-family: 'Trebuchet MS'; 5289 } 5290 5291 .ql-font-georgia { 5292 font-family: 'Georgia'; 5293 } 5294 5295 .ql-font-garamond { 5296 font-family: 'Garamond'; 5297 } 5298 5299 .ql-font-brush-script-mt { 5300 font-family: 'Brush Script MT'; 5301 } 5302 5303 .loadingCheckoutPage{ 5304 display:flex; 5305 align-items:center; 5306 justify-content: center; 5307 opacity:0.5; 5308 } 5309 5310 5311 5312 .gktGiftMessageContainer { 5313 display: grid; 5314 grid-template-columns: 1fr; 5315 grid-template-rows: auto; 5316 padding: 5px 0px; 5317 } 5318 5319 .gktGiftMessageItemContainer{ 5320 display: grid; 5321 grid-template-columns: 1fr; 5322 grid-template-rows: auto; 5323 padding: 3px 0px; 5324 margin: 3px 0px; 5325 border-radius: 3px; 5326 font-size: 14px; 5327 } 5328 5329 .gktGiftMessageItemContainer label { 5330 margin-bottom: 0px 5331 } 5332 5333 .gktGiftMessageItemContainerLabelText{
5334 align-self: center; 5335 font-size:14px; 5336 justify-self: left; 5337 text-align: left; 5338 } 5339 .gktGiftMessageImage{ 5340 width: 40px; 5341 height: 40px; 5342 border: 1px solid #f1f2f3; 5343 } 5344 .gktGiftMessageItemContainerItem1{ 5345 grid-row: 1 / 5; 5346 } 5347 5348 .gktGiftMessageItemContainerItem2{ 5349 5350 } 5351 5352 .gktGiftMessageItemContainerItem3{ 5353 position: relative; 5354 display: flex; 5355 width: fit-content; 5356 height: 30px; 5357 border-radius: 4px; 5358 overflow: hidden; 5359 } 5360 5361 label.gktGiftMsgAndWrapWrapperInnerEle { 5362 display: grid; 5363 grid-template-columns: 1fr; 5364 min-height: 30px; 5365 font-weight: 600; 5366 } 5367 5368 /* The container */ 5369 .gktGiftMsgAndWrapWrapperInnerEle { 5370 display: block; 5371 position: relative; 5372 padding-left: 35px; 5373 5374 cursor: pointer; 5375 -webkit-user-select: none; 5376 -moz-user-select: none; 5377 -ms-user-select: none; 5378 user-select: none; 5379 } 5380 5381 /* Hide the browser's default checkbox */ 5382 .gktGiftMsgAndWrapWrapperInnerEle input { 5383 position: absolute; 5384 opacity: 0; 5385 cursor: pointer; 5386 height: 0; 5387 width: 0; 5388 } 5389 5390 /* Create a custom checkbox */ 5391 .gktCustomWrapCheckboxCheckmark { 5392 position: absolute; 5393 top: 2px; 5394 left: 0; 5395 height: 25px; 5396 width: 25px; 5397 border: 1px solid #a2a2a2; 5398 border-radius: 4px; 5399 } 5400 5401 /* On mouse-over, add a grey background color */ 5402 .gktGiftMsgAndWrapWrapperInnerEle:hover input ~ .gktCustomWrapCheckboxCheckmark { 5403 background-color: #ccc; 5404 } 5405 5406 /* When the checkbox is checked, add a blue background 5407 .gktGiftMsgAndWrapWrapperInnerEle input:checked ~ .gktCustomWrapCheckboxCheckmark { 5408 background-color: #2196F3; 5409 } */ 5410 5411 /* Create the gktCustomWrapCheckboxCheckmark/indicator (hidden when not checked) */ 5412 .gktCustomWrapCheckboxCheckmark:after { 5413 content: ""; 5414 position: absolute; 5415 display: none; 5416 } 5417 5418 /* Show the gktCustomWrapCheckboxCheckmark when checked */ 5419 .gktGiftMsgAndWrapWrapperInnerEle input:checked ~ .gktCustomWrapCheckboxCheckmark:after { 5420 display: block; 5421 } 5422 5423 /* Style the gktCustomWrapCheckboxCheckmark/indicator */ 5424 .gktGiftMsgAndWrapWrapperInnerEle .gktCustomWrapCheckboxCheckmark:after { 5425 left: 8px; 5426 top: 1px; 5427 width: 8px; 5428 height: 16px; 5429 border: solid #009c00; 5430 border-width: 0 3px 3px 0; 5431 -webkit-transform: rotate(45deg); 5432 -ms-transform: rotate(45deg); 5433 transform: rotate(45deg); 5434 } 5435 5436 5437 5438 textarea.gktGiftMessageTextArea { 5439 display: none; 5440 border: 1px solid #b9babb; 5441 height: 60px; 5442 margin-left: 1px; 5443 -webkit-transition: all 0.6s ease-in-out; 5444 transition: all 0.6s ease-in-out; 5445 font-size: 14px; 5446 } 5447 5448 5449 5450 5451.gktNotificationWrapper{ 5452 position:fixed; 5453 margin: 0 !important; 5454 padding: 0 !important; 5455 top: 40px; 5456 right: 5px; 5457 display: none; 5458 z-index: 99999999999999; 5459} 5460 5461.gktNotificationItem{ 5462 margin: 4px 0px; 5463 background: white; 5464 color: black; 5465 padding: 4px 8px; 5466 -moz-box-shadow: 10px 10px 16px #000000; 5467 -webkit-box-shadow: 10px 10px 16px #000000; 5468 box-shadow: 0px 15px 30px rgba(0,0,0,0.08); 5469 max-width: 250px; 5470 display:grid; 5471 grid-template-columns: 30px 1fr 20px; 5472 justify-items: center; 5473 align-items: center; 5474 border-left: 5px solid green; 5475 border-radius: 4px; 5476 transform: translateX(300px); 5477 transition: 0.3s; 5478} 5479 5480.gktNotificationItemContent{ 5481 padding-right: 10px; 5482 5483} 5484 5485.gktNotificationItemContent2{ 5486 display: grid; 5487 justify-self: start; 5488 align-self: center; 5489 5490} 5491 5492.gktNotificationItemContent3{ 5493 display: grid; 5494 font-size: 14px; 5495 justify-self: start; 5496} 5497.gktNotificationItemContent4{ 5498 display: grid; 5499 justify-self: end; 5500} 5501 5502 5503 5504 5505.gktNotificationItemContent3SubText{ 5506 font-size: 12px; 5507} 5508 5509 5510 5511 5512 5513 5514.gktOneClickUpsellContainer { 5515 display: grid; 5516 grid-template-columns: 1fr; 5517 grid-template-rows: auto; 5518 padding: 5px 0px; 5519} 5520 5521.gktOneClickUpsellItemContainer{ 5522 display: grid; 5523 grid-template-columns: 1fr; 5524 grid-template-rows: auto; 5525 padding: 3px 0px; 5526 margin: 3px 0px; 5527 border-radius: 3px; 5528 font-size: 14px; 5529} 5530 5531.gktOneClickUpsellItemContainer label { 5532 margin-bottom: 0px 5533} 5534 5535.gktOneClickUpsellItemContainerLabelText{ 5536 align-self: center; 5537 font-size:12px; 5538 justify-self: left; 5539 text-align: left; 5540} 5541.gktOneClickUpsellImage{ 5542 width: 40px; 5543 height: 40px; 5544 border: 1px solid #f1f2f3; 5545} 5546.gktOneClickUpsellItemContainerItem1{ 5547 grid-row: 1 / 5; 5548} 5549 5550.gktOneClickUpsellItemContainerItem2{ 5551 5552} 5553 5554.gktOneClickUpsellItemContainerItem3{ 5555 position: relative; 5556 display: flex; 5557 width: fit-content; 5558 height: 30px; 5559 border-radius: 4px; 5560 overflow: hidden; 5561} 5562 5563 label.gktCustomCheckboxContainer { 5564 display: grid; 5565 grid-template-columns: 5fr 1fr; 5566} 5567 5568/* The container */ 5569.gktCustomCheckboxContainer { 5570 display: block; 5571 position: relative; 5572 padding-left: 35px; 5573 5574 cursor: pointer; 5575 -webkit-user-select: none; 5576 -moz-user-select: none; 5577 -ms-user-select: none; 5578 user-select: none; 5579} 5580 5581/* Hide the browser's default checkbox */ 5582.gktCustomCheckboxContainer input { 5583 position: absolute; 5584 opacity: 0; 5585 cursor: pointer; 5586 height: 0; 5587 width: 0; 5588} 5589 5590/* Create a custom checkbox */ 5591.gktCustomCheckboxCheckmark { 5592 position: absolute; 5593 top: 5px; 5594 left: 0; 5595 height: 25px; 5596 width: 25px; 5597 border: 1px solid #a2a2a2; 5598 border-radius: 4px; 5599} 5600 5601/* On mouse-over, add a grey background color */ 5602.gktCustomCheckboxContainer:hover input ~ .gktCustomCheckboxCheckmark { 5603 background-color: #ccc; 5604} 5605 5606/* When the checkbox is checked, add a blue background 5607.gktCustomCheckboxContainer input:checked ~ .gktCustomCheckboxCheckmark { 5608 background-color: #2196F3; 5609} */ 5610 5611/* Create the gktCustomCheckboxCheckmark/indicator (hidden when not checked) */ 5612.gktCustomCheckboxCheckmark:after {
5613 content: ""; 5614 position: absolute; 5615 display: none; 5616} 5617 5618/* Show the gktCustomCheckboxCheckmark when checked */ 5619.gktCustomCheckboxContainer input:checked ~ .gktCustomCheckboxCheckmark:after { 5620 display: block; 5621} 5622 5623/* Style the gktCustomCheckboxCheckmark/indicator */ 5624.gktCustomCheckboxContainer .gktCustomCheckboxCheckmark:after { 5625 left: 8px; 5626 top: 1px; 5627 width: 8px; 5628 height: 16px; 5629 border: solid #009c00; 5630 border-width: 0 3px 3px 0; 5631 -webkit-transform: rotate(45deg); 5632 -ms-transform: rotate(45deg); 5633 transform: rotate(45deg); 5634} 5635 5636 .gktVideoPlayerHide { 5637 display: none !important; 5638 } 5639 5640 .gktVideoMsgPlayerWrapper { 5641 /* height: 100vh; */ 5642 z-index: 10000000000000; 5643 display: none; 5644 align-items: center; 5645 justify-items: center; 5646 width: 100%; 5647 /* position: fixed; */ 5648 top: 30px; 5649 margin: 10px auto; 5650 } 5651 5652 .gktRecorder { 5653 width: 100%; 5654 min-height: 250px; 5655 position: relative; 5656 border-radius: 2%; 5657 overflow: hidden; 5658 } 5659 5660 .gktVideoPlayer, 5661 .gktVideoPlayerRecording { 5662 width: 100%; 5663 height: auto; 5664 } 5665 5666 .gktRecorderCloseBtn { 5667 position: absolute; 5668 z-index: 1; 5669 left: 2%; 5670 top: 5%; 5671 background: transparent; 5672 border: none; 5673 display: none; 5674 } 5675 5676 .gktRecorderCloseBtn img { 5677 height: 30px; 5678 width: 30px; 5679 filter: invert(90%); 5680 cursor: pointer; 5681 } 5682 5683 .gktVideoPlayerStartBtn, 5684 .gktVideoPlayerStopBtn { 5685 position: absolute; 5686 bottom: 2%; 5687 left: 50%; 5688 transform: translateX(-50%); 5689 cursor: pointer; 5690 height: 60px; 5691 width: 60px; 5692 border-radius: 50%; 5693 border: none; 5694 background-color: transparent; 5695 } 5696 5697 .gktVideoPlayerStartBtn { 5698 background-color: white; 5699 } 5700 5701 .gktVideoPlayerStopBtn { 5702 background-color: red; 5703 } 5704 5705 .gktVideoPlayerRedDot, 5706 .gktVideoPlayerRedSquare { 5707 height: 20px; 5708 width: 20px; 5709 position: absolute; 5710 top: 50%; 5711 left: 50%; 5712 transform: translate(-50%, -50%); 5713 } 5714 5715 .gktVideoPlayerRedDot { 5716 background-color: red; 5717 border-radius: 50%; 5718 } 5719 5720 .gktVideoPlayerRedSquare { 5721 background-color: white; 5722 border-radius: 10%; 5723 } 5724 5725 .gktPermissionDenied { 5726 position: absolute; 5727 top: 50%; 5728 left: 50%; 5729 transform: translate(-50%, -50%); 5730 color: white; 5731 font-size: 16px; 5732 } 5733 5734 .gktVideoPlayerTimeLeft { 5735 position: absolute; 5736 bottom: 4%; 5737 right: 4%; 5738 color: white; 5739 font-size: 12px; 5740 background: black; 5741 padding: 4px; 5742 color: white; 5743 opacity: 0.7; 5744 } 5745 5746 .gktVideoPlayerStatus { 5747 position: absolute; 5748 bottom: 4%; 5749 left: 4%; 5750 font-size: 12px; 5751 padding: 4px; 5752 background-color: black; 5753 color: white; 5754 opacity: 0.7; 5755 } 5756 5757 5758 5759 .gktVideoPlayerControls { 5760 width: 100%; 5761 text-align: center; 5762 position: absolute; 5763 top: 50%; 5764 left: 50%; 5765 transform: translate(-50%, -50%); 5766 z-index: 1; 5767 display: grid; 5768 grid-template-columns: repeat(3, 1fr); 5769 justify-content: space-evenly; 5770 align-items: center; 5771 } 5772 5773 .gktLoadingHeading { 5774 position: absolute; 5775 top: 50%; 5776 left: 50%; 5777 transform: translate(-50%, -50%); 5778 z-index: 1; 5779 color: white; 5780 font-size: 20px; 5781 } 5782 5783 .gktUploadingVideoHeading { 5784 position: absolute; 5785 top: 50%; 5786 left: 50%; 5787 transform: translate(-50%, -50%); 5788 z-index: 1; 5789 color: #e3dada; 5790 font-size: 16px; 5791 text-align: center; 5792 line-height: 40px; 5793 } 5794 5795 .gktVideoPlayerControlsAcceptBtnDiv, 5796 .gktVideoPlayerControlsPlayBtnDiv, 5797 .gktVideoPlayerControlsReStartBtnDiv{ 5798 display: flex; 5799 flex-direction: column; 5800 justify-content: center; 5801 align-items: center; 5802 } 5803 5804 .gktVideoPlayerControlsBtnDivInfo{ 5805 font-size: 12px; 5806 color: white; 5807 margin: 0 0 8px 0; 5808 } 5809 5810 .gktVideoPlayerControlsAcceptBtn, 5811 .gktVideoPlayerControlsPlayBtn, 5812 .gktVideoPlayerControlsReStartBtn { 5813 background-color: transparent; 5814 height: 90px; 5815 width: 90px; 5816 border-radius: 50%; 5817 cursor: pointer; 5818 border:0; 5819 /* margin-right: 20px; */ 5820 } 5821 5822 old.gktVideoPlayerControlsAcceptBtn { 5823 border: 5px solid #3ce669; 5824 } 5825 5826 old.gktVideoPlayerControlsPlayBtn { 5827 border: 5px solid #d3d3d3; 5828 } 5829 5830 old.gktVideoPlayerControlsReStartBtn { 5831 border: 5px solid #e03838; 5832 } 5833 5834 .gktVideoPlayerControlsAcceptBtnImg, 5835 .gktVideoPlayerControlsPlayBtnImg, 5836 .gktVideoPlayerControlsReStartBtnImg { 5837 height: auto; 5838 width: 100%; 5839 } 5840 5841 old.gktVideoPlayerControlsAcceptBtnImg { 5842 filter: invert(69%) sepia(59%) saturate(537%) hue-rotate(80deg) brightness(98%) contrast(93%); 5843 } 5844 5845 old.gktVideoPlayerControlsPlayBtnImg { 5846 filter: invert(100%) sepia(0) saturate(7500%) hue-rotate(116deg) brightness(80%) contrast(109%); 5847 } 5848 5849 old.gktVideoPlayerControlsReStartBtnImg { 5850 filter: invert(23%) sepia(77%) saturate(3858%) hue-rotate(348deg) brightness(98%) contrast(80%); 5851 } 5852 5853 /* 500px and down */ 5854 @media only screen and (max-width: 600px) { 5855 .gktVideoPlayerRecording { 5856 object-fit: cover; 5857 height: 100%; 5858 } 5859 .gktRecorder { 5860 min-height: 36vh; 5861 } 5862 .gktVideoPlayer, 5863 .gktVideoPlayerRecording{ 5864 width: 100%; 5865 object-fit: cover; 5866 position: absolute; 5867 height: 100%; 5868 } 5869 /* .gktVideoPlayerControlsAcceptBtn, 5870 .gktVideoPlayerControlsPlayBtn, 5871 .gktVideoPlayerControlsReStartBtn { 5872 height: 50px; 5873 width: 50px; 5874 } */ 5875 5876 .gktVideoPlayerControlsAcceptBtnImg, 5877 .gktVideoPlayerControlsPlayBtnImg, 5878 .gktVideoPlayerControlsReStartBtnImg { 5879 height: 28px; 5880 width: 28px; 5881 } 5882 } 5883 5884 /* 350px and down */ 5885 @media only screen and (max-width: 600px) { 5886 5887 5888 5889 5890 .gktVideoPlayerStartBtn, 5891 .gktVideoPlayerStopBtn { 5892 height: 40px; 5893 width: 40px; 5894 } 5895 5896 .gktVideoPlayerRedDot, 5897 .gktVideoPlayerRedSquare { 5898 width: 10px; 5899 height: 10px; 5900 } 5901 5902 } 5903 .gktGiftCardMessageContent{ 5904 overflow-y:auto; 5905 } 5906 .gktGiftCardMessageContent ::-webkit-scrollbar {
5907 width: 5px; 5908 } 5909 5910 /* Track */ 5911 .gktGiftCardMessageContent ::-webkit-scrollbar-track { 5912 background: #f1f1f1; 5913 } 5914 5915 /* Handle */ 5916 .gktGiftCardMessageContent ::-webkit-scrollbar-thumb { 5917 background: #2c2c2c 0% 0% no-repeat padding-box; 5918 } 5919 5920 /* Handle on hover */ 5921 .gktGiftCardMessageContent ::-webkit-scrollbar-thumb:hover { 5922 background: #000000 0% 0% no-repeat padding-box; 5923 } 5924 5925 /* Extra small devices (phones, 600px and down) */ 5926 /* @media only screen and (max-width: 800px) { 5927 .gktRecorder { 5928 width: 375px; 5929 height: 650px; 5930 background-color: black; 5931 } 5932 5933 .gktVideoPlayer, 5934 .gktVideoPlayerRecording { 5935 top: 50%; 5936 left: 50%; 5937 transform: translate(-50%, -50%); 5938 } 5939 5940 .gktVideoPlayerRecording { 5941 object-fit: contain; 5942 } 5943 5944 .gktVideoPlayerControls { 5945 width: 80%; 5946 } 5947 5948 .gktVideoPlayerControlsAcceptBtn, 5949 .gktVideoPlayerControlsPlayBtn, 5950 .gktVideoPlayerControlsReStartBtn { 5951 margin-right: 7px; 5952 } 5953 5954 .gktVideoPlayerTimeLeft, 5955 .gktVideoPlayerStatus { 5956 font-size: 18px; 5957 background-color: rgba(0,0,0,0.2); 5958 padding: 2px 4px; 5959 } 5960 5961 } */ 5962 5963 5964 /* @media only screen and (max-width: 850px) {} */ 5965 5966 /* Small devices (portrait tablets and large phones, 600px and up) */ 5967 /* @media only screen and (min-width: 600px) {} */ 5968 5969 /* Medium devices (landscape tablets, 768px and up) */ 5970 /* @media only screen and (min-width: 768px) {} */ 5971 5972 /* Large devices (laptops/desktops, 992px and up) */ 5973 @media only screen and (min-width: 900px) { 5974 .gktRecorder { 5975 min-height: 180px; 5976 height: 100%; 5977 } 5978 .gktRecord,.gktRecorded{ 5979 height: 100%; 5980 } 5981 .gktVideoPlayer, .gktVideoPlayerRecording{ 5982 width: 100%; 5983 object-fit: cover; 5984 height: 100%; 5985 } 5986 .gktVideoMsgPlayerWrapper{ 5987 height: 300px; 5988 } 5989 5990 .gktGiftCardMessageContent{ 5991 max-height: 350px; 5992 } 5993 5994 } 5995 5996 /* Extra large devices (large laptops and desktops, 1200px and up) */ 5997 /* @media only screen and (min-width: 1200px) {} */ 5998 </style> 5999
6000<script async> 6001 // import a file from 6002 let DEFAULT_addToCartBtnSelectors = 'input[name="add"], button[name="add"], form[action*="/cart/add"] input[type="submit"], form[action*="/cart/add"] button[type="submit"], form[action*="/cart/add"] button:not([type="button"]), form[action*="/cart/add"] .gkt__add-to-cart'; 6003 let DEFAULT_checkoutBtnSelectors = 'button[name="checkout"], input[name="checkout"], form[action*="/cart"] a[href="/checkout"], a[href="/checkout"], form[action="/cart"] input[type="submit"][name="checkout"], form[action="/cart"] button[type="submit"][name="checkout"]'; 6004 let DEFAULT_quantityBtnSelectors = '.ajaxcart__qty,quantity-input .quantity,.product-form__input, .product-form__quantity '; 6005 let DEFAULT_sideCartSelectors = '.cart-notification,cart-notification,.cart-notification-wrapper,#cart-notification, #CartDrawer, .drawer, .drawer-cover, .Drawer'; 6006 let DEFAULT_buyNowBtn = '.shopify-payment-button__button, .shopify-payment-button__button--unbranded'; 6007 let DEFAULT_cartForm = 'form[action="/cart"], form[action="/cart/"], form[action="cart"]'; 6008 6009 6010 // window = this.window || {}; 6011 6012 // the below code is liquid code that we are using in our theme.liquid file 6013 // how do i avoid compilation issues with js 6014 6015 // let liquidValues = require('../snippets/shopify-liquid-values.liquid'); 6016 6017 //initialze liquid values 6018 // check if window.shopifyLiquidValues EXISTS , if not then 6019 // if(window.shopifyLiquidValues){ 6020 // console.log("window.shopifyLiquidValues is coming from theme-app-extension",window.shopifyLiquidValues); 6021 // return 6022 // } 6023 6024 6025 // console.log(document?.currentScript?.src); 6026 // old-code should execute when new code isnt prresent 6027 6028 if(!window.shopifyLiquidValues){ 6029 let shopifyLiquidValues = { 6030 product: { handle: null }, 6031 selected_or_first_available_variant: null, 6032 customer: { 6033 first_name: null, 6034 email: null, 6035 id: null, 6036 has_account: null, 6037 total_spent: null 6038 } 6039 } 6040 6041 window.shopifyLiquidValues = shopifyLiquidValues; 6042 } 6043 6044 // {liquidValues} 6045 // // liquidValues 6046 6047 var gktUtils = { 6048 f: {} 6049 } 6050 window.gktUtils = gktUtils; 6051 6052 /* 6053 *fn(param1, param2) => 6054 *param1 is url of script that we suppose to load 6055 *param2 is function that should be called after script is loaded 6056 */ 6057 gktUtils.f.loadScript = function (a, b) { 6058 var c = document.createElement("script"); 6059 c.type = "text/javascript"; 6060 c.src = a; 6061 document.getElementsByTagName("head")[0].appendChild(c) 6062 c.onload = function () { b() }; 6063 }; 6064 6065 /* 6066 * we changed loadScript function - if else block for onload is removed as it was not making sense 6067 *fn(param1) => 6068 *param1 - represents function that should be executed once jquery is loaded 6069 *https://www.w3schools.com/jquery/jquery_noconflict.asp 6070 */ 6071 gktUtils.f.loadJquery = function (b) { 6072 console.log("does this work"); 6073 let flag = false; 6074 if("undefined" === typeof jQuery || 1.9 > parseFloat(jQuery.fn.jquery)){ 6075 flag = true; 6076 } 6077 if("undefined" != typeof jQuery && jQuery.post == undefined){ 6078 flag = true; 6079 } 6080 6081 if(flag){ 6082 gktUtils.f.loadScript("https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js", function () { 6083 gktJquery = jQuery.noConflict(!0); 6084 b(gktJquery) 6085 }) 6086 }else{ 6087 b(jQuery); 6088 } 6089 }; 6090 6091 var gkt = { 6092 debug: [], 6093 version: 1.1, 6094 state: { 6095 submitted: "", 6096 product_added: "", 6097 page_type: "", 6098 insertWrapperOnPage: [], 6099 cartData: undefined, 6100 isOverWriteBuyNowBtnTriggered: false, 6101 timer: undefined, 6102 freeGiftcardPopupModalTriggered: false, 6103 freeGiftcardPopupModalCount : parseInt(sessionStorage.getItem("freeGiftcardPopupModalCount"))|| 0, 6104 freeGiftcardPopupModalMAXCount : 2, 6105 gktFreeGiftcardBuyMoreProductNotificationSubHeadingShown: false,
6106 sendGiftcardOnPageBtnClicked: false, 6107 activeCampaignName: "EMPTY", 6108 }, 6109 constants: { 6110 themesIds: { 6111 DAWN_THEME: 887, 6112 VENTURE_THEME: 775, 6113 EXPRESS_THEME: 885, 6114 CRAVE_THEME: 1363, 6115 SENSE_THEME: 1356, 6116 CRAFT_THEME: 1368, 6117 } 6118 }, 6119 cartInterval: "", 6120 productinterval: "", 6121 f: { 6122 6123 bootstrap: function (settings) { 6124 console.log("bootstap?"); 6125 gkt.f.initDOM(settings); 6126 gkt.f.initThemeCSS(settings); 6127 gkt.f.globalListener(settings) 6128 // gkt.gktGiftMsgAndWrap.init(settings); 6129 gkt.storage.loadValuesFromStorage(gkt.settings); 6130 gkt.themeSpecificCode.init(gkt.settings) 6131 }, 6132 initDOM: function (settings) { 6133 console.log("initDOM?"); 6134 // gkt.$ = jQuery; 6135 gkt.$(document).ready(function () { 6136 gkt.f.initDOMElements(settings); 6137 // gkt.f.initDOMEvents(settings); 6138 }); 6139 }, 6140 initDOMElements: function (settings) { 6141 //insert the string skeletonDOM as html 6142 const skeletonDOM = gkt.$.parseHTML('<div><div class="gktModalWrapper" style="display:none;"><div class="gktModal"><div class="gktModalHeader"><div class="gktModalClose"></div></div><div class="gktContentWrapper"><div class="gktLeftContent"><div class="gktJustifyCenter"><label class="gktCheckboxLayout"><input type="checkbox" checked="true" class="gktGiftMessageCheckbox"><div class="gktMessageCheckboxHeading"></div></label></div><textarea class="gktMessageTextarea gktAlignCenter"></textarea></div><div class="gktRightContent"><div class="gktJustifyCenter"><label class="gktCheckboxLayout"><input type="checkbox" checked="true" class="gktGiftWrapCheckbox"><div class="gktGiftWrapCheckboxHeading"></div></label></div><img class="gktGiftWrapImage gktAlignCenter" loading="lazy"></div></div><div class="gktModalFooter"><div class="gktModalSave"></div></div></div></div></div><div class="gktComboModalWrapper"><div class="gktComboModal"><div class="gktComboModalHeader"><strong class="gktComboModalPopupHeading"></strong><div class="gktComboModalClose"></div></div><div class="gktComboContent"><div class="gktComboContentHeader"></div><div class="gktComboContentFooter"><div class="gktComboContentFooterBtn1"></div><div class="gktComboContentFooterBtn2"></div></div></div></div></div></div><div class="gktGiftCardModalWrapper"><div class="gktGiftCardModal"><div class="gktGiftCardModalHeader"><strong class="gktGiftCardModalPopupHeading"></strong><div class="gktGiftCardModalClose"></div></div><div class="gktGiftCardContent"><div class="gktGiftCardContentHeader"></div><form><div class="gktGiftCardGreetingCardContent"></div><div class="gktGiftCardDetailsContent"></div><div class="gktGiftCardMessageContent"></div></form><div class="gktGiftCardContentFooter"><div class="gktGiftCardContentFooterBtn1"></div></div></div><div class="gktPoweredByBanner"></div></div></div><div class="gktFreeGiftcardPopupModalWrapper"><div class="gktFreeGiftcardPopupModal"></div></div></div><div class="gktNotificationWrapper"></div></div>') 6143 gkt.$("body").append(skeletonDOM); 6144 // gkt.elements.productPageWrapperV2.append(skeletonDOM); 6145 // gkt.elements.cartPageWrapperV2.append(skeletonDOM); 6146 6147 //attach a link to the body 6148 gkt.$("body").append('<link rel="stylesheet" href="https://cdn.quilljs.com/1.2.6/quill.snow.css">'); 6149 }, 6150 getSettings: async function () { 6151 //promise 6152 console.log("GET setting of giftkart fired") 6153 return new Promise(function (resolve, reject) { 6154 6155 console.log("fetching from s3") 6156 gkt.f.getSettingsFromS3().then( 6157 success => { 6158 resolve(success); 6159 } 6160 ).catch(error => { 6161 fetch("/apps/gkt/getTmpCartSettings",{ 6162 method: 'GET', 6163 }).then( 6164 response => response.json() // if the response is a JSON object 6165 ).then( 6166 success => { 6167 if(success.responseCode == 200){ 6168 console.log("success-data", success.data); 6169 } 6170 resolve(success.data); 6171 } 6172 ).catch(error => { 6173 console.log(error) // Handle the error response object 6174 reject(error) 6175 6176 }); 6177 }); 6178 }); 6179 6180 }, 6181 setSelectors: function(){ 6182 let settings = gkt.settings 6183 gkt.selectors = { 6184 addToCart: settings.app.addToCartBtnSelectors, 6185 checkoutBtn: settings.app.checkoutBtnSelectors, 6186 sideCartSelectors: settings.app.sideCartSelectors, 6187 buyNowBtn: settings.app.buyNowBtn, 6188 cartForm: settings.app.cartForm, 6189 productPageWrapperV2: '.gktProductPageWrapperV2', 6190 cartPageWrapperV2: '.gktCartPageWrapperV2', 6191 quantityBtnSelectors : settings.app.quantityBtnSelectors, 6192 } 6193 }, 6194 getSettingsFromS3: async function () { 6195 //promise 6196 let shopName = window.Shopify.shop 6197 console.log("GET setting of giftlab pro fired") 6198 return new Promise(function (resolve, reject) { 6199 fetch("https://giftkart-staging.s3.us-east-2.amazonaws.com/tempCartSettings/"+shopName+`.json?nocache=${(new Date()).getTime()}`,{ 6200 method: 'GET', 6201 }).then( 6202 response => response.json() // if the response is a JSON object 6203 ).then( 6204 success => { 6205 if(success.responseCode == 200){ 6206 console.log("success-data", success); 6207 } 6208 resolve(success); 6209 } 6210 ).catch(error => { 6211 console.log(error) // Handle the error response object 6212 reject(error) 6213 }) 6214 }) 6215 }, 6216 getLoggedInCustomer: async function () { 6217 try{ 6218 if(shopifyLiquidValues && shopifyLiquidValues.customer && shopifyLiquidValues.customer.id){ 6219 let customerData = await fetch(`/apps/gkt/getLoggedInCustomer?email=${shopifyLiquidValues.customer.email}`); 6220 // await new Promise(resolve => setTimeout(resolve, 10000)); //sleep to check loading state 6221 let customerDataJson = await customerData.json(); 6222 customerDataJson = customerDataJson.data; 6223 gkt.settings.customer = customerDataJson; 6224 return customerDataJson; 6225 } 6226 }catch(e){ 6227 console.log("error in getLoggedIncustomer=",e) 6228 console.log("Have you setup /apps/gkt proxy properly?") 6229 return false; 6230 } 6231 }, 6232 addGiftCardToRewardCodeAPI: async function (_id) { 6233 try{ 6234 if(shopifyLiquidValues && shopifyLiquidValues.customer && shopifyLiquidValues.customer.id){ 6235 let addToGiftCardAPI = await fetch(`/apps/gkt/addGiftcardToRewardCode?gktGiftcardId=${_id}`,{ 6236 method: 'POST', 6237 }); 6238 let addToGiftCardAPIJson = await addToGiftCardAPI.json(); 6239 addToGiftCardAPIJson = addToGiftCardAPIJson.data; 6240 gkt.settings.customer = addToGiftCardAPIJson; 6241 return addToGiftCardAPIJson; 6242 } 6243 }catch(e){ 6244 console.log("error in addGiftCardToRewardCodeAPI=",e) 6245 console.log("Have you setup /apps/gkt proxy properly?") 6246 return false; 6247 } 6248 }, 6249 setSettings: function(tmpCartSettings){ 6250 var cart_settings = { 6251 giftWrapProduct: { 6252 productId: tmpCartSettings.productId, 6253 productVairantID: tmpCartSettings.productVariantId, 6254 giftWrapPrice: tmpCartSettings.giftWrapPrice, 6255 giftWrapProductImage: tmpCartSettings.giftWrapImgUrl, 6256 giftWrapShopifyImgUrl: tmpCartSettings.giftWrapShopifyImgUrl, 6257 giftWrapHandle: tmpCartSettings.giftWrapHandle, 6258 isGiftWrapEnabled: tmpCartSettings.isGiftWrap, 6259 isVisibleOnCart: tmpCartSettings.isVisibleOnCart, 6260 isVisibleOnAllProductPages: tmpCartSettings.isVisibleOnAllProductPages, 6261 isVisibleOnSpecificProductPages: tmpCartSettings.isVisibleOnSpecificProductPages, 6262 visibleOnSpecificProductPages: tmpCartSettings.visibleOnSpecificProductPages 6263 }, 6264 giftMessage: tmpCartSettings.giftMessage || {}, 6265 popup: { 6266 popupHeadingText: tmpCartSettings.popupHeadingText, 6267 messageCheckboxHeading: tmpCartSettings.messageCheckboxHeading, 6268 giftWrapCheckboxHeading: tmpCartSettings.giftWrapCheckboxHeading, 6269 messageBoxplaceholder: tmpCartSettings.messageBoxplaceholder,
6270 saveButtonBackgroundColor: tmpCartSettings.saveButtonBackgroundColor, 6271 saveButtonTextColor: tmpCartSettings.saveButtonTextColor, 6272 saveButtonText: tmpCartSettings.saveButtonText, 6273 cartPopupBackgroundColor: tmpCartSettings.cartPopupBackgroundColor, 6274 reloadOnCancelClick: tmpCartSettings.reloadOnCancelClick 6275 }, 6276 giftingOptions: { 6277 isGiftWrapEnabled: tmpCartSettings.isGiftWrap, 6278 isGiftMessageEnabled: tmpCartSettings.isGiftField, 6279 enabledGifiting: tmpCartSettings.enabledGifiting, 6280 shopifyPageinnerHTML: tmpCartSettings.cartPageText 6281 }, 6282 videoMessage: tmpCartSettings.videoMessageData, 6283 pageWrapper: { cartPageText: tmpCartSettings.cartPageText }, 6284 6285 combos: tmpCartSettings.combos || [], 6286 oneClickUpsells: tmpCartSettings.oneClickUpsells || [], 6287 giftCards: tmpCartSettings.giftCards || [], 6288 greetingCards : tmpCartSettings.greetingCardData, 6289 rewardCampaigns: tmpCartSettings.rewardCampaignData, 6290 urlCampaignDataList: tmpCartSettings.urlCampaignDataList, 6291 app: { 6292 disableApp: tmpCartSettings.userData.customSettings.disableApp || false, 6293 disableSideCart: tmpCartSettings.userData.customSettings.disableSideCart || false, 6294 refreshProductPageOnGiftWrap: tmpCartSettings.userData.customSettings.refreshProductPageOnGiftWrap || false, 6295 addToCartBtnSelectors: tmpCartSettings.userData.customSettings.addToCartBtnSelectors || DEFAULT_addToCartBtnSelectors, 6296 checkoutBtnSelectors: tmpCartSettings.userData.customSettings.checkoutBtnSelectors || DEFAULT_checkoutBtnSelectors, 6297 quantityBtnSelectors: tmpCartSettings.userData.customSettings.quantityBtnSelectors || DEFAULT_quantityBtnSelectors, 6298 sideCartSelectors: tmpCartSettings.userData.customSettings.sideCartSelectors || DEFAULT_sideCartSelectors, 6299 // cartDrawerSelectors: tmpCartSettings.userData.customSettings.cartDrawerSelectors || DEFAULT_cartDrawerSelectors, 6300 // sideCartDrawerOverlay: tmpCartSettings.userData.customSettings.sideCartDrawerOverlay || DEFAULT_sideCartDrawerOverlay,
6301 themeBackgroundColor : tmpCartSettings.userData.customSettings.themeBackgroundColor || "", 6302 6303 themeFontFamily: tmpCartSettings.userData.customSettings.themeFontFamily || "", 6304 themeFontColor: tmpCartSettings.userData.customSettings.themeFontColor || "", 6305 6306 themeButtonBackgroundColor: tmpCartSettings.userData.customSettings.themeButtonBackgroundColor || "", 6307 themButtonTextColor: tmpCartSettings.userData.customSettings.themButtonTextColor || "", 6308 themeButtonBorderColor: tmpCartSettings.userData.customSettings.themeButtonBorderColor || "", 6309 themeButtonBoxShadow: tmpCartSettings.userData.customSettings.themeButtonBoxShadow || "", 6310 //button font family 6311 themeButtonFontFamily: tmpCartSettings.userData.customSettings.themeButtonFontFamily || "", 6312 6313 themeHeaderFontFamily: tmpCartSettings.userData.customSettings.themeHeaderFontFamily || "", 6314 themeHeaderFontColor: tmpCartSettings.userData.customSettings.themeHeaderFontColor || "", 6315 6316 themeLabelFontColor: tmpCartSettings.userData.customSettings.themeLabelFontColor || "", 6317 themeLabelFontFamily: tmpCartSettings.userData.customSettings.themeLabelFontFamily || "", 6318 6319 hidePoweredByBanner: tmpCartSettings.userData.customSettings.hidePoweredByBanner || false, 6320 useGiftCardAddToCartButtonOverwrite2: tmpCartSettings.userData?.customSettings?.useGiftCardAddToCartButtonOverwrite2 || false, 6321 6322 buyNowBtn: tmpCartSettings.userData.customSettings.buyNowBtn || DEFAULT_buyNowBtn, 6323 cartForm: tmpCartSettings.userData.customSettings.cartForm || DEFAULT_cartForm, 6324 addAfterAddTocartBtn:tmpCartSettings.userData.customSettings.addAfterAddTocartBtn || false, 6325 addAftercheckoutBtn: tmpCartSettings.userData.customSettings.addAftercheckoutBtn || false, 6326 activeVariantCodes: tmpCartSettings.userData.customSettings.activeVariantCodes || "123456789", 6327 customStyleForGiftcard: tmpCartSettings.userData.customSettings.customStyleForGiftcard || null, 6328 redirectUrlForSendGiftcardBtn: tmpCartSettings.userData.customSettings.redirectUrlForSendGiftcardBtn ? window.location.origin + tmpCartSettings.userData.customSettings.redirectUrlForSendGiftcardBtn : window.location.origin + "/cart/checkout" , 6329 }, 6330 accountWidget: tmpCartSettings.userData.accountWidget, 6331 merchantInfo: tmpCartSettings.userData, 6332 languageData: tmpCartSettings.languageData, 6333 SERVER_URL: tmpCartSettings.SERVER_URL, 6334 urlSearchString: window.location.search ? window.location.search : "" 6335 } 6336 6337 gkt.settings = cart_settings; 6338 console.log("settings assigned") 6339 6340 }, 6341 6342 preparePoweredByBannerUI: function () { 6343 try{ 6344 let brandingToBeShown = ['basic', 'plus', 'basic-alpha', 'plus-alpha', 'basic-beta', 'plus-beta', 'basic-gamma', 'premium-gamma', 'basic-sept8', 'pro-nov7', 'pro-jan16-free', 'pro-jan16-19'] 6345 6346 let showPoweredByBanner = false; 6347 6348 if(gkt.settings.app.hidePoweredByBanner == true){ 6349 showPoweredByBanner = false; 6350 }else{ 6351 for(let i=0;i<brandingToBeShown.length;i++){ 6352 if(gkt.settings.merchantInfo.isSubscription == false || gkt.settings.merchantInfo.isSubscription.name == brandingToBeShown[i]){ 6353 showPoweredByBanner = true; 6354 break; 6355 } 6356 } 6357 } 6358 6359 6360 6361 if(showPoweredByBanner){ 6362 let gktPoweredByBannerHTML = gkt.$("<div>").addClass("gktPoweredByBanner"); 6363 let gktPoweredByBannerPreImageText = gkt.$("<div>").addClass("gktPoweredByBannerPreImageText").html("Powered by "); 6364 let gktPoweredByBannerPostImageText = gkt.$("<div>").addClass("gktPoweredByBannerPostImageText").html(" GiftKart"); 6365 let gktPoweredByBannerLogo = gkt.$("<img>").addClass("gkt-branding-banner-logo"); 6366 gktPoweredByBannerLogo.attr("src","https://d3ks0ngva6go34.cloudfront.net/public/giftkart_logo.jpg"); 6367 gktPoweredByBannerLogo.attr("alt","GiftKart"); 6368 //very smol 6369 gktPoweredByBannerLogo.attr("width","22"); 6370 gktPoweredByBannerLogo.attr("height","22"); 6371 6372 gktPoweredByBannerHTML.append(gktPoweredByBannerPreImageText); 6373 gktPoweredByBannerHTML.append(gktPoweredByBannerLogo); 6374 gktPoweredByBannerHTML.append(gktPoweredByBannerPostImageText); 6375 6376 gktPoweredByBannerHTML.on("click",function(){ 6377 window.open("https://apps.shopify.com/giftkart","_blank"); 6378 }) 6379 6380 return gktPoweredByBannerHTML; 6381 }else{ 6382 gkt.$(".gktPoweredByBanner").remove(); 6383 } 6384 return; 6385 }catch(err){ 6386 console.log("error in preparePoweredByBannerUI",err); 6387 return; 6388 } 6389 }, 6390 initThemeCSS: function (){ 6391 console.log("initThemeCSS?",gkt.selectors.addToCart);
6392 let addToCartBtnEle = gkt.$(document).find(gkt.selectors.addToCart) 6393 let checkoutBtnEle = gkt.$(document).find(gkt.selectors.checkoutBtn) 6394 6395 let buttonToOverRide = gkt.$(addToCartBtnEle).length > 0 ? addToCartBtnEle : checkoutBtnEle; 6396 6397 if(gkt.settings.app.themeFontFamily == "" && gkt.$("body").length>0){ 6398 gkt.settings.app.themeFontFamily = gkt.$("body").css("font-family"); 6399 } 6400 //find the font color of the theme 6401 if(gkt.settings.app.themeFontColor == "" && gkt.$("p").length > 0){ 6402 gkt.settings.app.themeFontColor = gkt.$("p").css("color"); 6403 } 6404 //theme background color 6405 if(gkt.settings.app.themeBackgroundColor == "" && gkt.$("body").length > 0){ 6406 gkt.settings.app.themeBackgroundColor = gkt.$("body").css("background-color"); 6407 } 6408 if(gkt.settings.app.themeLabelFontColor == "" && gkt.$("label").length > 0){ 6409 gkt.settings.app.themeLabelFontColor = gkt.$("label").css("color"); 6410 } 6411 // themeLabelFontFamily 6412 if(gkt.settings.app.themeLabelFontFamily == "" && gkt.$("label").length > 0){ 6413 gkt.settings.app.themeLabelFontFamily = gkt.$("label").css("font-family"); 6414 } 6415 if(gkt.settings.app.themeButtonBackgroundColor == "" && gkt.$(buttonToOverRide).length > 0 ){ 6416 gkt.settings.app.themeButtonBackgroundColor = gkt.$(buttonToOverRide).css("background-color"); 6417 } 6418 if(gkt.settings.app.themButtonTextColor == "" && gkt.$(buttonToOverRide).length > 0){ 6419 gkt.settings.app.themButtonTextColor = gkt.$(buttonToOverRide).css("color"); 6420 } 6421 if(gkt.settings.app.themeButtonBorderColor == "" && gkt.$(buttonToOverRide).length > 0){ 6422 gkt.settings.app.themeButtonBorderColor = gkt.$(buttonToOverRide).css("border-color"); 6423 } 6424 //box shadow 6425 if(gkt.settings.app.themeButtonBoxShadow == "" && gkt.$(buttonToOverRide).length > 0){ 6426 gkt.settings.app.themeButtonBoxShadow = gkt.$(buttonToOverRide).css("box-shadow"); 6427 } 6428 // button font family 6429 if(gkt.settings.app.themeButtonFontFamily == "" && gkt.$(buttonToOverRide).length > 0){ 6430 gkt.settings.app.themeButtonFontFamily = gkt.$(buttonToOverRide).css("font-family"); 6431 } 6432 if(gkt.settings.app.themeHeaderFontFamily == "" && gkt.$("h1").length > 0){ 6433 gkt.settings.app.themeHeaderFontFamily = gkt.$("h1").css("font-family"); 6434 } 6435 if(gkt.settings.app.themeHeaderFontColor == "" && gkt.$("h1").length > 0){ 6436 gkt.settings.app.themeHeaderFontColor = gkt.$("h1").css("color"); 6437 } 6438 6439 }, 6440 getPageType: function () { 6441 var pageType = ""; 6442 if (window.location.pathname.includes("/cart") && !window.location.pathname.includes("/products")) { 6443 pageType = "cart"; 6444 } else if (window.location.pathname.includes("/products")) { 6445 pageType = "product"; 6446 } else if (window.location.pathname.includes("/collections")) { 6447 pageType = "COLLECTION"; 6448 } else if (window.location.pathname.includes("/")) { 6449 pageType = "HOME"; 6450 } else if ("undefined" != typeof Shopify && "undefined" != typeof Shopify.Checkout) { 6451 pageType = "CHECKOUT"; 6452 } else { 6453 pageType = "PAGE_NOT_FOUND"; 6454 } 6455 return pageType; 6456 }, 6457 getProductPageHandle: function () { 6458 if ("product" === gkt.state.page_type && shopifyLiquidValues.product.handle) { 6459 // let pattern = /(?<=\\/products\\/)((?!\\?|\\$).)+/g 6460 // if(window && window.location && window.location.href){ 6461 // return window.location.href.match(pattern)[0] 6462 // } 6463 return shopifyLiquidValues.product.handle 6464 6465 } 6466 return "undefined" 6467 6468 }, 6469 applyPopupCSS: function (element) { 6470 //gktGiftCardModal background-color 6471 // gktGiftCardInputFieldsDiv color of the font 6472 gkt.$(element).css("background-color", gkt.settings.app.themeBackgroun
6472dColor); 6473 }, 6474 applyButtonCSS : function(element){ 6475 6476 //apply gkt.settings.app.themButtonTextColor themeButtonBackgroundColor themeButtonBorderColor to the button 6477 if(gkt.settings.app.themButtonTextColor != ""){ 6478 element.css("color", gkt.settings.app.themButtonTextColor); 6479 } 6480 if(gkt.settings.app.themeButtonBackgroundColor != ""){ 6481 element.css("background-color", gkt.settings.app.themeButtonBackgroundColor); 6482 } 6483 if(gkt.settings.app.themeButtonBorderColor != ""){ 6484 element.css("border","1px solid") 6485 element.css("border-color", gkt.settings.app.themeButtonBorderColor); 6486 } 6487 // box shadow 6488 if(gkt.settings.app.themeButtonBoxShadow != ""){ 6489 element.css("box-shadow", gkt.settings.app.themeButtonBoxShadow); 6490 } 6491 //themeButtonFontFamily 6492 if(gkt.settings.app.themeButtonFontFamily != ""){ 6493 element.css("font-family", gkt.settings.app.themeButtonFontFamily); 6494 } 6495 6496 6497 }, 6498 resetButtonCSS: function (element){ 6499 //reset the button css 6500 element.css("color",""); 6501 element.css("background-color",""); 6502 element.css("border",""); 6503 element.css("border-color",""); 6504 element.css("box-shadow",""); 6505 }, 6506 applyHeaderCSS: function (element){ 6507 //apply gkt.settings.app.themeFontFamily themeFontColor to the header 6508 if(gkt.settings.app.themeHeaderFontFamily != ""){ 6509 element.css("font-family", gkt.settings.app.themeHeaderFontFamily); 6510 } 6511 if(gkt.settings.app.themeHeaderFontColor != ""){ 6512 element.css("color", gkt.settings.app.themeHeaderFontColor); 6513 } 6514 }, 6515 applyLabelCSS: function (element){ 6516 //apply gkt.settings.app.themeLabelFontColor to the label 6517 if(gkt.settings.app.themeLabelFontColor != ""){ 6518 element.css("color", gkt.settings.app.themeLabelFontColor); 6519 } 6520 element.css("font-family","inherit"); 6521 if(gkt.settings.app.themeLabelFontFamily != ""){ 6522 element.css("font-family", gkt.settings.app.themeLabelFontFamily); 6523 } 6524 }, 6525 getSelectedVariant: function () { 6526 if ("product" === gkt.state.page_type) { 6527 6528 let activeCodes = gkt.settings.app.activeVariantCodes; 6529 6530 if(activeCodes.indexOf("1") >= 0){ 6531 const params = Object.fromEntries(new URLSearchParams(location.search)) 6532 if(params && params.variant){ 6533 return params.variant 6534 } 6535 } 6536 6537 if(activeCodes.indexOf("2") >= 0){ 6538 if (ShopifyAnalytics && ShopifyAnalytics.meta && ShopifyAnalytics.meta.selectedVariantId) { 6539 for(let i = 0; i < ShopifyAnalytics.meta.product.variants.length; i++){ 6540 if(ShopifyAnalytics.meta.product.variants[i].id == ShopifyAnalytics.meta.selectedVariantId){ 6541 return ShopifyAnalytics.meta.selectedVariantId 6542 } 6543 } 6544 } 6545 } 6546 if(activeCodes.indexOf("3") >= 0){ 6547 if (document.querySelector('[name="id"]') && document.querySelector('[name="id"]').value) { 6548 return document.querySelector('[name="id"]').value 6549 } 6550 } 6551 6552 if(activeCodes.indexOf("4") >= 0){ 6553 if (shopifyLiquidValues.selected_or_first_available_variant) { 6554 return shopifyLiquidValues.selected_or_first_available_variant.id 6555 } 6556 } 6557 6558 return undefined 6559 } 6560 }, 6561 6562 getProductQuantity: function () { 6563 if (document.querySelector('[name="quantity"]') && document.querySelector('[name="quantity"]').value) { 6564 if(Number(document.querySelector('[name="quantity"]').value) && Number(document.querySelector('[name="quantity"]').value) <= 10){ 6565 return Number(document.querySelector('[name="quantity"]').value) 6566 }else{ 6567 return 1 6568 } 6569 }else { 6570 return 1 6571 } 6572 }, 6573 6574 getElements: function (settings) { 6575 return { 6576 gktGiftMsgAndWrapWrapperParent: gkt.$(gkt.$.parseHTML('<div class="gktGiftMsgAndWrapHeader"><div class="gktGiftMsgAndWrapHeaderItem"><label for="gift-wrapping" class="gktGiftMsgAndWrapWrapperInnerEle"><input id="gift-wrapping" class="gktGiftOptionsCheckbox" type="checkbox" name="addGiftOptions"><span class="gktCustomWrapCheckboxCheckmark"></span><div class="gktGiftMsgAndWrapWrapperInnerEleHeading"></div></label></div></div>')), 6577 gktCartGiftMsgAndWrapWrapperParent: gkt.$(gkt.$.parseHTML('<div class="gktCartGiftMsgAndWrapHeader"><div class="gktCartGiftMsgAndWrapHeaderItem"><label for="gift-wrapping" class="gktGiftMsgAndWrapWrapperInnerEle"><input id="gift-wrapping" class="gktGiftOptionsCheckbox" type="checkbox" name="addGiftOptions"><span class="gktCustomWrapCheckboxCheckmark"></span><div class="gktGiftMsgAndWrapWrapperInnerEleHeading"></div></label></div></div>')),
6578 addToCartBtn: gkt.$(document).find(gkt.selectors.addToCart), 6579 addToCartButtonCloned: undefined, 6580 checkoutBtn: gkt.$(document).find(gkt.selectors.checkoutBtn), 6581 cartForm: gkt.$(document).find(gkt.selectors.cartForm), 6582 productPageWrapperV2: gkt.$(gkt.$.parseHTML('<div class="gktPageWrapper gktProductPageWrapperV2"><div class="gktComboWrapper"></div><div class="gktProductPageUpsellWrapper"></div><div class="gktGiftMsgAndWrapWrapper"></div><div class="gktGiftMessageWrapper"></div><div class="gktGiftCardWrapper"></div></div>')), 6583 cartPageWrapperV2: gkt.$(gkt.$.parseHTML('<div class="gktPageWrapper gktCartPageWrapperV2"><div class="gktCartUpsellWrapper"></div><div class="gktCartGiftMsgAndWrapWrapper"></div><div class="gktCartGiftMessageWrapper"></div><div class="gktAccountWidgetWrapper"></div></div>')), 6584 buyNowBtn: gkt.$(document).find(gkt.selectors.buyNowBtn) 6585 } 6586 }, 6587 6588 initialize: async function (jQuery) { 6589 // gkt.$.ajaxSetup({global: true}); 6590 let tmpCartSettings = await gkt.f.getSettings(); 6591 gkt.f.setSettings(tmpCartSettings) 6592 gkt.f.setSelectors(); 6593 gkt.state.page_type = gkt.f.getPageType(); 6594 gkt.elements = gkt.f.getElements(gkt.settings); 6595 if ("" === gkt.state.page_type) return false; 6596 gkt.utility.setLanguageLocale(); 6597 return gkt.f.bootstrap(gkt.settings); 6598 }, 6599 globalListener: function (settings) { 6600 let isIntervalActive = false 6601 //if app is disabled reurn 6602 if (settings.app.disableApp) { 6603 return 6604 } else { 6605 if ("product" === gkt.state.page_type) { 6606 gkt.productPage.init(settings) 6607 } 6608 6609 if (settings.app.disableSideCart) { 6610 if ("cart" === gkt.state.page_type) { 6611 gkt.cartPage.init(settings) 6612 } 6613 } else { 6614 gkt.cartPage.init(settings) 6615 6616 } 6617 } 6618 6619 if(gkt.state && gkt.state.activeCampaignName == "EMPTY"){ 6620 gkt.utility.getUrlRewardCampaignName() 6621 } 6622 6623 6624 setInterval(async () => { 6625 if (!isIntervalActive) { 6626 // console.log("globalListener-active") 6627 6628 isIntervalActive = true 6629 6630 6631 // insert productpage wrapper if productPage is initialized 6632 if ("product" === gkt.state.page_type && 6633 gkt.elements.addToCartBtn.length > 0 && 6634 gkt.$(document).find(gkt.selectors.productPageWrapperV2).length == 0) { 6635 console.log("productPage-insertWrapperIntoPage1") 6636 gkt.productPage.f.insertWrapperIntoPage(settings) 6637 } 6638 6639 let checkoutBtnEle = gkt.$(document).find(gkt.selectors.checkoutBtn) 6640 6641 // insert cartPage wrapper if cartPage is initialized 6642 if (checkoutBtnEle.length > 0 && 6643 gkt.$(document).find(gkt.selectors.cartPageWrapperV2).length == 0) { 6644 console.log("cartPage-insertWrapperIntoPage") 6645 await gkt.cartPage.f.insertWrapperIntoPage(settings) 6646 } 6647 6648 // check if comboproduct overwrite buyNowButton 6649 if (false && gkt.gktCombo.state.comboHandle != "") { 6650 gkt.gktCombo.f.comboBuyNowButtonOverwrite() 6651 } 6652 6653 // check if giftCard overwrite buyNowButton 6654 if (gkt.gktGiftCard.state.giftCardData) { 6655 if(!gkt.elements.addToCartBtn.is(':visible') || gkt.settings.app.useGiftCardAddToCartButtonOverwrite2 == true){ 6656 gkt.elements.addToCartBtn = gkt.$(document).find(g
6656kt.selectors.addToCart) 6657 if(gkt.settings.app.useGiftCardAddToCartButtonOverwrite2 == true){ 6658 gkt.gktGiftCard.f.giftCardAddToCartButtonOverwrite2(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage) 6659 }else{ 6660 gkt.gktGiftCard.f.giftCardAddToCartButtonOverwrite(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage) 6661 } 6662 } 6663 gkt.gktGiftCard.f.giftCardBuyNowButtonOverwrite() 6664 if(!gkt.state.sendGiftcardOnPageBtnClicked){ 6665 gkt.gktGiftCard.f.changeGiftCardAddToCartButtonText(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.addToCartButtonText)) 6666 } 6667 6668 } 6669 6670 // check if giftwrap, message or oneclick upsell overwrite buyNowButton 6671 if(gkt.state.isOverWriteBuyNowBtnTriggered && gkt.$(document).find(".gkt-overwrite-buy-now-btn").length == 0){ 6672 gkt.utility.overWriteBuyNowBtn() 6673 } 6674 6675 if(gkt.state.activeCampaignName != "" && 6676 gkt.settings.urlCampaignDataList && 6677 gkt.settings.urlCampaignDataList.length && 6678 gkt.settings.urlCampaignDataList.length > 0 6679 ){
6680 let urlRewardCampaignName = gkt.state.activeCampaignName 6681 let rewardCampaign = gkt.settings.urlCampaignDataList.find((campaign) => { 6682 let campaignData = campaign.campaignData 6683 return campaignData.urlBasedCampaign && campaignData.urlBasedCampaign.value && campaignData.urlBasedCampaign.value == urlRewardCampaignName 6684 }) 6685 gkt.settings.rewardCampaigns = rewardCampaign 6686 6687 if(!gkt.state.setCampaignUrlattribute ){ 6688 gkt.state.setCampaignUrlattribute = true 6689 await gkt.utility.updateCart({attributes:{"cb_campaign":gkt.state.activeCampaignName}}) 6690 } 6691 6692 } 6693 6694 if( (gkt.state.page_type == "cart" || "product" === gkt.state.page_type) && 6695 gkt.settings.rewardCampaigns && 6696 gkt.settings.rewardCampaigns.status == "ACTIVE" && 6697 gkt.settings.rewardCampaigns.campaignData && 6698 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct && 6699 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct.length && 6700 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct.length > 0 6701 6702 ){ 6703 await gkt.gktFreeGiftCardPopup.f.addFreeGiftcardProduct() 6704 } 6705 6706 isIntervalActive = false 6707 6708 } 6709 }, 1000) 6710 } 6711 }, 6712 utility: { 6713 getActiveCurrencyRate : function(){ 6714 let currencyRate = 1; 6715 if(window.Shopify && window.Shopify.currency && window.Shopify.currency.rate){ 6716 currencyRate = window.Shopify.currency.rate; 6717 } 6718 return currencyRate; 6719 }, 6720 getCookie: function (cookieName) { 6721 let name = cookieName + "="; 6722 let decodedCookie = decodeURIComponent(document.cookie); 6723 let ca = decodedCookie.split(";"); 6724 for (let i = 0; i < ca.length; i++) { 6725 let c = ca[i]; 6726 while (c.charAt(0) == " ") { 6727 c = c.substring(1); 6728 } 6729 if (c.indexOf(name) == 0) { 6730 return c.substring(name.length, c.length); 6731 } 6732 } 6733 return null; 6734 }, 6735 getLocale: function () { 6736 if (window.Shopify && window.Shopify.locale) { 6737 return window.Shopify.locale 6738 }else{ 6739 return "en" 6740 } 6741 }, 6742 setLanguageLocale: function () { 6743 let locale = gkt.utility.getLocale() 6744 6745 if(gkt.settings.languageData && gkt.settings.languageData.languageMode == "SINGLE"){ 6746 locale = "en" 6747 } 6748 6749 if(!gkt.settings.languageData[locale]){ 6750 locale = "en" 6751 } 6752 gkt.settings.languageData = gkt.settings.languageData[locale] 6753 }, 6754 setCookie: function (cookieName, cookieValue, expiryDays = 7) { 6755 const d = new Date(); 6756 d.setTime(d.getTime() + expiryDays * 24 * 60 * 60 * 1000); 6757 let expires = "expires=" + d.toUTCString(); 6758 document.cookie = cookieName + "=" + cookieValue + ";" + expires + ";path=/"; 6759 }, 6760 addToCart: async function (data) { 6761 6762 try { 6763 // if there is nothing to add in cart..just return true 6764 if (!data.id) { 6765 return true 6766 } 6767 let result = await gkt.$.ajax({
6768 url: "/cart/add.js", 6769 data: data, 6770 type: "POST", 6771 dataType: "json", 6772 }) 6773 return true 6774 } catch (error) { 6775 console.error("gkt-utility-addToCart"); 6776 console.error(error); 6777 return false 6778 } 6779 }, 6780 updateCart: async function (data) { 6781 try { 6782 let result = await gkt.$.ajax({ 6783 type: "POST", 6784 url: "/cart/update.js", 6785 data: data, 6786 dataType: "json", 6787 }); 6788 return result 6789 } catch (error) { 6790 console.error("gkt-utility-updateCart"); 6791 console.error(error); 6792 return false 6793 } 6794 }, 6795 changeCart: async function (data) { 6796 try { 6797 let result = await gkt.$.ajax({ 6798 type: "POST", 6799 url: "/cart/change.js", 6800 data: data, 6801 dataType: "json", 6802 }); 6803 return true 6804 } catch (error) { 6805 console.error("gkt-utility-changeCart"); 6806 console.error(error); 6807 return false 6808 } 6809 }, 6810 6811 getProductData: async function (productName) { 6812 try { 6813 let result = await gkt.$.ajax({ 6814 type: "GET", 6815 url: "/products/" + productName, 6816 // data: data, 6817 dataType: "json", 6818 }); 6819 return result; 6820 } catch (error) { 6821 console.error("gkt-utility-updateCart"); 6822 console.error(error); 6823 return false 6824 } 6825 }, 6826 getProductDataV2: function (productName) { 6827 try { 6828 return new Promise((res, rej) => { 6829 gkt.$.getJSON("/products/" + productName + ".js", function (product) { 6830 console.log("success-productName: ", productName) 6831 res(product) 6832 }).fail(function () { console.log("fail-productName: ", productName); res(false) }) 6833 }) 6834 return result; 6835 } catch (error) { 6836 console.error("gkt-utility-getProductDataV2"); 6837 console.error(error); 6838 return false 6839 } 6840 }, 6841 addToCartV2: function (data) { 6842 try { 6843 return new Promise((res, rej) => { 6844 gkt.$.post('/cart/add.js', data) 6845 .done(function () { console.log("success-/cart/add.js': "); res(true) }) 6846 .fail(function (e) { 6847 console.log("fail-/cart/add.js", e); 6848 res(false) 6849 }) 6850 }) 6851 return result; 6852 } catch (error) { 6853 console.error("gkt-utility-addToCartV2"); 6854 console.error(error); 6855 return false 6856 } 6857 }, 6858 clearCart: function (data) { 6859 try { 6860 return new Promise((res, rej) => { 6861 gkt.$.post('/cart/clear.js', data) 6862 .done(function () { console.log("success-/cart/clear.js': "); res(true) }) 6863 .fail(function () { console.log("fail-/cart/clear.js"); res(false) }) 6864 }) 6865 return result; 6866 } catch (error) { 6867 console.error("gkt-utility-clearCart"); 6868 console.error(error); 6869 return false 6870 } 6871 }, 6872 getCart: async function (data) { 6873 try { 6874 let result = await gkt.$.ajax({
6875 type: "GET", 6876 url: "/cart.js", 6877 dataType: "json", 6878 }); 6879 return result 6880 } catch (error) { 6881 console.error("gkt-utility-getCart"); 6882 console.error(error); 6883 return false 6884 } 6885 }, 6886 getCartTotalQuantity: async function () { 6887 try { 6888 let total = 0 6889 let cartData = await gkt.$.ajax({ 6890 type: "GET", 6891 url: "/cart.js", 6892 dataType: "json", 6893 }); 6894 for (var item of cartData['items']) { 6895 total += item["quantity"] 6896 } 6897 return total 6898 } catch (error) { 6899 console.error("gkt-utility-getCart"); 6900 console.error(error); 6901 return false 6902 } 6903 }, 6904 checkIfItemPresentInCart: function (searchedVariantId) { 6905 if (gkt.state.cartData && gkt.state.cartData.items && gkt.state.cartData.items.length && gkt.state.cartData.items.length > 0) { 6906 for (let i = 0; i < gkt.state.cartData.items.length; i++) { 6907 let item = gkt.state.cartData.items[i] 6908 if (item && item.variant_id && item.variant_id == searchedVariantId) { 6909 return item 6910 } 6911 } 6912 return false 6913 } else { 6914 return false 6915 } 6916 }, 6917 getNoteFromCart: function () { 6918 if (gkt.state.cartData && gkt.state.cartData.note && gkt.state.cartData.note != "") { 6919 6920 return gkt.state.cartData.note 6921 } else { 6922 return false 6923 } 6924 }, 6925 isCartTotalMoreThan: async function(value){ 6926 gkt.state.cartData = await gkt.utility.getCart() 6927 6928 if(gkt.state.cartData && gkt.state.cartData.total_price && ((gkt.state.cartData.total_price)/100 >= parseFloat(value))){ 6929 return true 6930 }else{ 6931 return false 6932 } 6933 }, 6934 cloneAddToCartBtn: function () { 6935 6936 }, 6937 overWriteBuyNowBtn: function (){ 6938 6939 let buyNowBtnEle = gkt.$(document).find(gkt.selectors.buyNowBtn) 6940 6941 if(buyNowBtnEle && buyNowBtnEle.length > 0 && gkt.$(document).find(".gkt-overwrite-buy-now-btn").length == 0){ 6942 // buyNowBtnEle.show() 6943 buyNowBtnEle.unbind().unbind("click").off().off("click"); 6944 newBuyNowBtnEle = buyNowBtnEle.clone() 6945 buyNowBtnEle.before(newBuyNowBtnEle) 6946 // buyNowBtnEle.hide() 6947 newBuyNowBtnEle.addClass("gkt-overwrite-buy-now-btn") 6948 6949 buyNowBtnEle.css("visibility", "hidden") 6950 buyNowBtnEle.css("height", "0") 6951 buyNowBtnEle.css("width", "0") 6952 buyNowBtnEle.css("padding", "0") 6953 buyNowBtnEle.css("margin", "0") 6954 buyNowBtnEle.css("line-height", "0"); 6955 buyNowBtnEle.css("min-height", "0"); 6956 // clone add to cart behavior 6957 // newBuyNowBtnEle.on("click", async function (event) { 6958 // gkt.$(this).attr("disabled", true); 6959 // setTimeout(() => { gkt.$(this).attr("disabled", false); }, 1000) 6960 // event.preventDefault(); 6961 // event.stopPropagation(); 6962 // let selectedVariantId = gkt.f.getSelectedVariant() 6963 // let resAddToCart = await gkt.utility.addToCartV2({ "items": [ 6964 // { 6965 // "id": selectedVariantId, 6966 // "quantity": 1 6967 // } 6968 // ]}) 6969 6970 // window.location.href = window.location.origin + "/cart/checkout" 6971 // return 6972 // }) 6973 6974 6975 newBuyNowBtnEle.on("click", function (event) { 6976 event.preventDefault(); 6977 event.stopPropagation(); 6978 gkt.$(this).attr("disabled", true); 6979 newBuyNowBtnEle.text("loading checkout..."); 6980 setTimeout(() => { gkt.$(this).attr("disabled", false)}, 3000) 6981 addToCartBtnEle = gkt.$(document).find(g
6981kt.selectors.addToCart) 6982 sideCartEle = gkt.$(document).find(gkt.selectors.sideCartSelectors) 6983 6984 // gkt.$(document).find("body").addClass("loadingCheckoutPage") 6985 // gkt.$(document).find("body").text("loading checkout...") 6986 6987 if(sideCartEle && sideCartEle.length > 0){ 6988 sideCartEle.css("display", "none") 6989 } 6990 6991 if(addToCartBtnEle && addToCartBtnEle.length > 0){ 6992 addToCartBtnEle.trigger("click") 6993 } 6994 setTimeout(()=>{ 6995 window.location.href = gkt.settings.app.redirectUrlForSendGiftcardBtn 6996 },1000) 6997 6998 }) 6999 7000 } 7001 }, 7002 emailValidation: function (emailString) { 7003 var atSymbol = emailString.indexOf("@"); 7004 if (atSymbol < 1) return false; 7005 7006 var dot = emailString.lastIndexOf("."); 7007 if (dot <= atSymbol + 2) return false; 7008 7009 // check that the dot is not at the end 7010 if (dot === emailString.length - 1) return false; 7011 7012 return true; 7013 }, 7014 renderLanguageValue: function (parent) { 7015 if (parent){ 7016 return parent.value; 7017 } 7018 return; 7019 }, 7020 7021 slider: { 7022 state: { 7023 slideIndex: 0, 7024 }, 7025 plusSlides: function (selector, n) { 7026 this.showSlides(selector, this.state.slideIndex += n); 7027 }, 7028 //minusSlides 7029 minusSlides: function (selector, n) { 7030 this.showSlides(selector, this.state.slideIndex -= n); 7031 }, 7032 showSlides: function (selector, n) { 7033 var i; 7034 var slides = selector.find(".gktComboItemContainerItem1Img"); 7035 if (slides && slides.length) { 7036 // slides = JSON.parse(slides); 7037 // } 7038 7039 7040 if (n > slides.length) { this.state.slideIndex = 1 } 7041 if (n < 1) { this.state.slideIndex = slides.length } 7042 for (i = 0; i < slides.length; i++) { 7043 slides[i].style.display = "none"; 7044 } 7045 slides[this.state.slideIndex - 1].style.display = "block"; 7046 // plusSlides(1) 7047 } 7048 // setTimeout(function () { plusSlides(n + 1) }, 2000); 7049 }, 7050 }, 7051 7052 isMobileView: function () { 7053 if (window.innerWidth < 768) { 7054 return true; 7055 } else { 7056 return false; 7057 } 7058 }, 7059 displayLoadingSpinner: function () { 7060 let loadingContainer = gkt.$("<div>").addClass("gktLoading"); 7061 let loadingSpinner = gkt.$("<div>").addClass("gktLoadingSpinner"); 7062 loadingContainer.append(loadingSpinner); 7063 return loadingContainer; 7064 }, 7065 dynamicStylesForBranding: function () { 7066 let brandingColor = { 7067 mainTextColor: gkt.settings.accountWidget.customization.mainTextColor, 7068 subTextColor : gkt.settings.accountWidget.customization.subTextColor, 7069 } 7070 let style = 7071 `<style> 7072 .gktAccountWidgetBodyTabActive{ 7073 color: ${brandingColor.mainTextColor} !important; 7074 border-bottom: 2px solid ${brandingColor.mainTextColor} !important; 7075 } 7076 .gktLoadingSpinner-not-used { 7077 border-top: 16px solid ${gkt.settings.accountWidget.customization.buttonColor}; 7078 border-bottom: 16px solid ${gkt.settings.accountWidget.customization.buttonColor}; 7079 } 7080 7081 </style>` 7082 gkt.$('html > head').append(style); 7083 return style; 7084 }, 7085 getLocalDateIn_YYYY_MM_DD: function (date=new Date()) { 7086 const year = date.getFullYear();
7087 const month = ('0' + (date.getMonth() + 1)).slice(-2); 7088 const day = ('0' + date.getDate()).slice(-2) 7089 7090 const dateInLocalTimeZone = `${year}-${month}-${day}`; 7091 return dateInLocalTimeZone; 7092 }, 7093 getUrlRewardCampaignName: function () { 7094 let activeCampaignName = ""; 7095 7096 if(gkt.state.activeCampaignName != "EMPTY"){ 7097 return gkt.state.activeCampaignName; 7098 } 7099 if(sessionStorage.getItem("cb_campaign")){ 7100 activeCampaignName = sessionStorage.getItem("cb_campaign") 7101 gkt.state.activeCampaignName = activeCampaignName; 7102 return activeCampaignName; 7103 } 7104 7105 let campaginString = gkt.settings.urlSearchString.split("cb_campaign=") 7106 if(campaginString && campaginString.length > 1){ 7107 let campaignName = campaginString[1].split("&")[0] 7108 if(campaignName){ 7109 gkt.state.activeCampaignName = campaignName; 7110 sessionStorage.setItem("cb_campaign", campaignName) 7111 return campaignName 7112 }else{ 7113 return "" 7114 } 7115 }else 7116 { 7117 return "" 7118 } 7119 } 7120 }, 7121 storage: { 7122 7123 loadValuesFromStorage: function (settings) { 7124 var gktGiftMessageCheckbox = sessionStorage.getItem("gktGiftMessageCheckbox"); 7125 var gktMessageTextarea = sessionStorage.getItem("gktMessageTextarea"); 7126 var gktGiftWrapCheckbox = sessionStorage.getItem("gktGiftWrapCheckbox"); 7127 var gktGiftOptionsCheckbox = sessionStorage.getItem("gktGiftOptionsCheckbox"); 7128 gkt.$('.gktMessageTextarea').val(gktMessageTextarea); 7129 7130 if (gktGiftMessageCheckbox === null) { 7131 gkt.$('.gktGiftMessageCheckbox').prop('checked', true); 7132 } else { 7133 gkt.$('.gktGiftMessageCheckbox').prop('checked', gktGiftMessageCheckbox === "true"); 7134 } 7135 7136 if (gktGiftWrapCheckbox === null) { 7137 gkt.$('.gktGiftWrapCheckbox').prop('checked', true); 7138 } else { 7139 gkt.$('.gktGiftWrapCheckbox').prop('checked', gktGiftWrapCheckbox === "true"); 7140 } 7141 7142 if (gktGiftOptionsCheckbox === null) { 7143 7144 gkt.elements.cartPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', false) 7145 gkt.elements.productPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', false) 7146 gkt.$(document).find(".gktGiftOptionsCheckbox").prop('checked', false) 7147 } else { 7148 gkt.elements.cartPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', gktGiftOptionsCheckbox === "true") 7149 gkt.elements.productPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', gktGiftOptionsCheckbox === "true") 7150 gkt.$(document).find(".gktGiftOptionsCheckbox").prop('checked', gktGiftOptionsCheckbox === "true") 7151 7152 } 7153 7154 }, 7155 setItem: function (field, value) { 7156 sessionStorage.setItem(field, value) 7157 }, 7158 getItem: function (field) { 7159 return sessionStorage.getItem(field) 7160 } 7161 }, 7162 drawerCart: { 7163 init: function (settings) { 7164 gkt.cartPage.init(settings) 7165 } 7166 }, 7167 themeSpecificCode: { 7168 init: function (settings) { 7169 gkt.themeSpecificCode.f.ventureTheme(settings) 7170 gkt.themeSpecificCode.f.expressTheme(settings) 7171 gkt.themeSpecificCode.f.craveTheme(settings) 7172 gkt.themeSpecificCode.f.craftTheme(settings) 7173 gkt.themeSpecificCode.f.senseTheme(settings) 7174 7175 7176 }, 7177 7178 f: { 7179 ventureTheme: function () { 7180 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.VENTURE_THEME) { 7181 // reload on save 7182 gkt.selectors.sideCartDrawerOverlay = "" 7183 } 7184 }, 7185 expressTheme: function () { 7186 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.EXPRESS_THEME) { 7187 // addd a css property of jusyify-items:cetner to cartpagewrapper 7188 gkt.elements.cartPageWrapperV2.css("justify-items", "center") 7189 if (window.location.pathname.includes("/cart")) { 7190 gkt.selectors.checkoutBtn = ".cart__actions" 7191 } 7192 } 7193 }, 7194 craveTheme: function () { 7195 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.CRAVE_THEME) { 7196 // change css of cart__ctas in the document to block 7197 gkt.$(document).find(".cart__ctas").css("display", "block") 7198 7199 } 7200 }, 7201 craftTheme: function () { 7202 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.CRAFT_THEME) { 7203 // change css of cart__ctas in the document to block 7204 gkt.$(document).find(".cart__ctas").css("display", "block") 7205 7206 } 7207 }, 7208 senseTheme: function () { 7209 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.SENSE_THEME) { 7210 // change css of cart__ctas in the document to block 7211 gkt.$(document).find(".cart__ctas").css("display", "block") 7212 7213 } 7214 }, 7215 7216 } 7217 }, 7218 productPage: { 7219 init: async function (settings) { 7220 console.log("productPage-init") 7221 7222 gkt.state.cartData = await gkt.utility.getCart() 7223 // gkt.state.insertWrapperOnPage.push("PRODUCT_PAGE") 7224 7225 gkt.gktMessage.init(settings, "PRODUCT_PAGE") 7226 7227 // gkt.gktCombo.init(settings) 7228 7229 // gkt.gktGiftMsgAndWrap.init(settings, "PRODUCT_PAGE") 7230 7231 gkt.gktOneClickUpsell.init(settings, "PRODUCT_PAGE") 7232 7233 gkt.gktGiftCard.init(settings, "PRODUCT_PAGE") 7234 7235 gkt.gktAccountWidget.init(settings,"CART_PAGE") 7236 7237 gkt.gktNotification.init(settings, "CART_PAGE") 7238 }, 7239 f: { 7240 insertWrapperIntoPage: function (settings) { 7241 7242 if ("undefined" != typeof gkt.elements.addToCartBtn) { 7243 let addToCartBtnEle = gkt.$(document).find(g
7243kt.elements.addToCartBtn) 7244 addToCartBtnEle.each(function (index) { 7245 if (gkt.$(this).is(":visible")) { 7246 if(gkt.settings.app.addAfterAddTocartBtn){ 7247 gkt.$(this).after(gkt.elements.productPageWrapperV2); 7248 }else{ 7249 gkt.$(this).before(gkt.elements.productPageWrapperV2); 7250 } 7251 7252 } 7253 7254 }); 7255 } 7256 }, 7257 }, 7258 7259 actions: { 7260 insertUpsellModal: function () { 7261 // Gs.$("body").append(Gs.settings._modalHtml); 7262 alert("popModal for upsell action") 7263 }, 7264 }, 7265 }, 7266 cartPage: { 7267 init: async function (settings) { 7268 7269 gkt.state.cartData = await gkt.utility.getCart() 7270 7271 gkt.gktMessage.init(settings, "CART_PAGE") 7272 7273 // gkt.gktGiftMsgAndWrap.init(settings, "CART_PAGE") 7274 7275 gkt.gktOneClickUpsell.init(settings, "CART_PAGE") 7276 7277 gkt.gktFreeGiftCardPopup.init(settings, "CART_PAGE") 7278 7279 gkt.gktAccountWidget.init(settings,"CART_PAGE") 7280 7281 gkt.gktNotification.init(settings, "CART_PAGE") 7282 7283 }, 7284 f: { 7285 insertWrapperIntoPage: function (settings) { 7286 return new Promise((res, rej) => { 7287 if ("undefined" != typeof gkt.elements.checkoutBtn) { 7288 let checkoutBtnEle = gkt.$(document).find(gkt.selectors.checkoutBtn) 7289 checkoutBtnEle.each(function (index) { 7290 // console.log("index", index) 7291 if (gkt.$(this).is(":visible")) { 7292 // check if theme ids matches otherwise add element to default position 7293 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.DAWN_THEME) { 7294 gkt.$(this).parent().before(gkt.elements.cartPageWrapperV2); 7295 } else if(gkt.settings.app.addAftercheckoutBtn) { 7296 gkt.$(this).after(gkt.elements.cartPageWrapperV2); 7297 }else{ 7298 gkt.$(this).before(gkt.elements.cartPageWrapperV2); 7299 } 7300 } 7301 }); 7302 7303 } 7304 res() 7305 }) 7306 }, 7307 }, 7308 events: { 7309 ajaxSuccess: function (cartSettings) { 7310 console.log("register ajax success event") 7311 gkt.$(document).ajaxSuccess(function (event, xhr, settings) { 7312 console.log("ajaxSuccess", settings.url) 7313 if (settings.url == "/change.js?line=1&quantity=0" || settings.url == "change.js?line=1&quantity=0" || settings.url == "change.js" || settings.url == "/change.js" || settings.url == "/cart.js" || settings.url == "cart.js" || settings.url == "cart" || settings.url == "/cart") { 7314 setTimeout(function () { 7315 console.log("ajaxSuccess") 7316 7317 }, 2000); 7318 } 7319 }); 7320 } 7321 } 7322 }, 7323 gktOneClickUpsell: { 7324 init: async function (settings, parent) { 7325 await gkt.gktOneClickUpsell.initialize(settings, parent) 7326 gkt.gktOneClickUpsell.f.registerEvents() 7327 }, 7328 initialize: async function (settings, parent) { 7329 let productHandle = gkt.f.getProductPageHandle(settings) 7330 7331 // write function which return two list 7332 // oneClickUpsell products that need to be shown on this product page 7333 // get the list of oneClickUpsellProducts that need to be shown on cart page 7334 let { oneClickUpsellListForCartPage, oneClickUpsellListForProductPage } = gkt.gktOneClickUpsell.f.segregateOneClickUpsells(settings.oneClickUpsells, productHandle) 7335 7336 if (parent == "PRODUCT_PAGE" && oneClickUpsellListForProductPage && oneClickUpsellListForProductPage.length && oneClickUpsellListForProductPage.length > 0) { 7337 let variantListToBeShownOnProductPage = await gkt.gktOneClickUpsell.f.findVariantListToBeShown(oneClickUpsellListForProductPage) 7338 let oneClickUpsellProductPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnProductPage, parent) 7339 gkt.gktOneClickUpsell.f.insertIntoProductPageWrapper(settings, oneClickUpsellProductPageHTML) 7340 console.log("variantListToBeShownOnProductPage", variantListToBeShownOnProductPage) 7341 gkt.utility.overWriteBuyNowBtn() 7342 gkt.state.isOverWriteBuyNowBtnTriggered = true 7343 console.log("PRODUCT_PAGE") 7344 } 7345 7346 if (parent == "CART_PAGE" && oneClickUpsellListForCartPage && oneClickUpsellListForCartPage.length && oneClickUpsellListForCartPage.length > 0) { 7347 let variantListToBeShownOnCartPage = await gkt.gktOneClickUpsell.f.findVariantListToBeShown(oneClickUpsellListForCartPage) 7348 let oneClickUpsellCartPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnCartPage, parent) 7349 gkt.gktOneClickUpsell.f.insertIntoCartPageWrapper(settings, oneClickUpsellCartPageHTML) 7350 console.log("variantListToBeShownOnCartPage", variantListToBeShownOnCartPage) 7351 console.log("CART_PAGE") 7352 } 7353 7354 }, 7355 f: { 7356 7357 segregateOneClickUpsells: function (oneClickUpsells, currProductHandle) { 7358 let oneClickUpsellListForCartPage = [] 7359 let oneClickUpsellListForProductPage = [] 7360 7361 for (let i = 0; i < oneClickUpsells.length; i++) { 7362 let oneClickUpsell = oneClickUpsells[i] 7363 7364 // add products to cart page list 7365 if (oneClickUpsell.isVisibleOnCart) { 7366 oneClickUpsellListForCartPage.push(oneClickUpsell) 7367 } 7368 7369 // add products to product page list 7370 if (oneClickUpsell.isVisibleOnAllProductPages) { 7371 7372 oneClickUpsellListForProductPage.push(oneClickUpsell) 7373 7374 } else if (oneClickUpsell.isVisibleOnSpecificProductPages && 7375 oneClickUpsell.visibleOnSpecificProductPages && 7376 oneClickUpsell.visibleOnSpecificProductPages.find(x => x.handle === currProductHandle)) { 7377 7378 oneClickUpsellListForProductPage.push(oneClickUpsell) 7379 } 7380 7381 } 7382 7383 return { 7384 oneClickUpsellListForCartPage: oneClickUpsellListForCartPage, 7385 oneClickUpsellListForProductPage: oneClickUpsellListForProductPage 7386 } 7387 }, 7388 findVariantListToBeShown: async function (oneClickUpsellList) { 7389 let responseData = [] 7390 7391 let variantListSelectedByUser = [] 7392 let apiCalls = [] 7393 7394 for (let i = 0; i < oneClickUpsellList.length; i++) { 7395 let oneClickUpsell = oneClickUpsellList[i] 7396 7397 for (let j = 0; j < oneClickUpsell.upsellProducts.length; j++) { 7398 let oneClickUpsellProduct = oneClickUpsell.upsellProducts[j] 7399 apiCalls.push(gkt.utility.getProductDataV2(oneClickUpsellProduct.handle)) 7400 7401 for (let k = 0; k < oneClickUpsellProduct.variants.length; k++) { 7402 variantListSelectedByUser.push(parseInt(oneClickUpsellProduct.variants[k].variantId)) 7403 } 7404 } 7405 7406 } 7407 7408 let oneClickUpsellProducts = await Promise.all(apiCalls) 7409 // get required variants and return 7410 for (let i = 0; i < oneClickUpsellProducts.length; i++) { 7411 let oneClickUpsellProduct = oneClickUpsellProducts[i] 7412 7413 if (!oneClickUpsellProduct) { 7414 continue 7415 } 7416 7417 for (let j = 0; j < oneClickUpsellProduct.variants.length; j++) { 7418 let variant = oneClickUpsellProduct.variants[j] 7419 //if variant.featured_image is null then take the onceClickUpsellProduct.featured_image 7420 if (variant.featured_image) { 7421 variant.featured_image = variant.featured_image.src 7422 } else { 7423 variant.featured_image = oneClickUpsellProduct.featured_image 7424 } 7425 //console.log("ashfaq"); 7426 // if variant is not available dont add it 7427 if (!variant.available) { 7428 continue 7429 } 7430 7431 // if variant is not selected in admin ui, dont add it 7432 if (variantListSelectedByUser.indexOf(variant.id) == -1) { 7433 continue 7434 } 7435 7436 responseData.push(variant) 7437 7438 } 7439 } 7440 7441 return responseData 7442 7443 }, 7444 insertIntoProductPageWrapper: function (settings, oneClickUpsellHTML) { 7445 7446 gkt.elements.productPageWrapperV2.find(".gktProductPageUpsellWrapper").css("display", "block") 7447 7448 // // insert into parent element 7449 // gkt.elements.gktGiftMsgAndWrapWrapperParent.find(".gktGiftMsgAndWrapWrapperInnerEle").append(settings.giftingOptions.shopifyPageinnerHTML); //cartPageText 7450 7451 // insert final element into productPageWrapperV2 7452 gkt.elements.productPageWrapperV2.find(".gktProductPageUpsellWrapper").append(oneClickUpsellHTML); 7453 7454 }, 7455 insertIntoCartPageWrapper: function (settings, oneClickUpsellHTML) { 7456 7457 gkt.elements.cartPageWrapperV2.find(".gktCartUpsellWrapper").css("display", "block") 7458 7459 // insert into parent element 7460 // gkt.elements.gktCartGiftMsgAndWrapWrapperParent.find(".gktGiftMsgAndWrapWrapperInnerEle").append(settings.giftingOptions.shopifyPageinnerHTML); //cartPageText 7461 7462 // insert final element into productPageWrapperV2 7463 // gkt.elements.cartPageWrapperV2.find(".gktCartUpsellWrapper").append(gkt.elements.gktCartGiftMsgAndWrapWrapperParent); 7464 gkt.elements.cartPageWrapperV2.find(".gktCartUpsellWrapper").append(oneClickUpsellHTML); 7465 7466 }, 7467 prepareUI: function (settings, variantListToBeShown, parent) { 7468 let gktOneClickUpsellContainer = gkt.$("<div>").addClass('gktOneClickUpsellContainer') 7469 7470 7471 for (let i = 0; i < variantListToBeShown.length; i++) { 7472 let variant = variantListToBeShown[i] 7473 let gktOneClickUpsellItemContainer = gkt.$("<div>").addClass('gktOneClickUpsellItemContainer') 7474 let gktOneClickUpsellItemContainerCheckboxLable = gkt.$("<label>").addClass('gktCustomCheckboxContainer') 7475 let inputCheckboxEle = gkt.$("<input>").addClass('gktOneClickUpsellInputCheckboxEle') 7476 .attr("type", "checkbox") 7477 .attr("data-variant", JSON.stringify(variant)) 7478 .attr("data-parent", JSON.stringify(parent)) 7479 7480 if (gkt.utility.checkIfItemPresentInCart(variant.id)) { 7481 inputCheckboxEle.attr("checked", true) 7482 } 7483 let gktOneClickUpsellImage = gkt.$("<img>").addClass('gktOneClickUpsellImage') 7484 .attr("src", variant.featured_image) 7485 gktOneClickUpsellImage.css("width", "40px") 7486 gktOneClickUpsellImage.css("height", "40px") 7487 gktOneClickUpsellImage.css("justify-self", "right") 7488 7489 gktOneClickUpsellItemContainerCheckboxLable.append(inputCheckboxEle) 7490 gktOneClickUpsellItemContainerCheckboxLable.append(gkt.$("<span>").addClass("gktCustomCheckboxCheckmark")) 7491 7492 7493 let appendString = "" + variant.name 7494 let price = variant.price > 0 ? parseFloat(variant.price / 100) : variant.price 7495 if (settings.merchantInfo && settings.merchantInfo.currencyInfo && settings.merchantInfo.currencyInfo.symbol) { 7496 appendString = appendString + " + " + settings.merchantInfo.currencyInfo.symbol + price 7497 } 7498 //create a div with appendString 7499 let gktOneClickUpsellItemContainerLableText = gkt.$("<div>").addClass('gktOneClickUpsellItemContainerLabelText') 7500 .text(appendString) 7501 gktOneClickUpsellItemContainerCheckboxLable.append(gktOneClickUpsellItemContainerLableText) 7502 gktOneClickUpsellItemContainer.append(gktOneClickUpsellItemContainerCheckboxLable) 7503 gktOneClickUpsellItemContainerCheckboxLable.append(gktOneClickUpsellImage) 7504 gktOneClickUpsellContainer.append(gktOneClickUpsellItemContainer) 7505 } 7506 7507 return gktOneClickUpsellContainer 7508 }, 7509 registerEvents: function () { 7510 gkt.$(document).on("click", ".gktOneClickUpsellInputCheckboxEle", async function (event) { 7511 await gkt.gktOneClickUpsell.actions.handleOneClickUpsellOnChangEvent(event); 7512 //gktPage type is cartPage then reload page 7513 if (gkt.state.page_type == "cart") { 7514 window.location.reload() 7515 //turn off click events till the page loads 7516 gkt.$("body").css("pointer-events", "none") 7517 } 7518 }) 7519 } 7520 }, 7521 actions: { 7522 handleOneClickUpsellOnChangEvent: async function (cb) { 7523 if (cb && cb.target) { 7524 let variant = JSON.parse(cb.target.getAttribute("data-variant")) 7525 let parent = cb.target.getAttribute("data-parent") 7526 7527 // if true 7528 if (cb.target.checked) { 7529 await gkt.utility.updateCart({ updates: { [variant.id]: 1 }, attributes:{[variant.id]:"gktOneClickUpsellBuy"}}) 7530 } 7531 else { 7532 await gkt.utility.updateCart({ updates: { [variant.id]: 0 }, attributes:{[variant.id]:""} }) 7533 } 7534 7535 } 7536 7537 } 7538 } 7539 7540 }, 7541 gktGiftCard: { 7542 init: async function (settings, parent) { 7543 await gkt.gktGiftCard.initialize(settings, parent) 7544 gk
7544t.gktGiftCard.f.registerEvents() 7545 }, 7546 state: { 7547 isGiftCardAddToCartButtonOverwrite: false, 7548 isGiftCardBuyNowButtonOverwrite: false, 7549 giftCardAddToCartButtonClone: "", 7550 giftCardData: undefined, 7551 giftCardDiv: undefined, 7552 greetingCardActiveImageSrc: undefined, 7553 greetingCardSelectedCategory: undefined, 7554 giftCardDeliveryOption: "sendNow", 7555 greetingCardImageListDiv: undefined, 7556 modalNavList : [], 7557 }, 7558 initialize: async function (settings, parent) { 7559 let productHandle = gkt.f.getProductPageHandle() 7560 let giftCardProduct = gkt.gktGiftCard.f.checkIfGiftCardProduct(productHandle, settings.giftCards) 7561 7562 if (giftCardProduct) { 7563 7564 7565 gkt.gktGiftCard.state.giftCardData = giftCardProduct 7566 gkt.gktGiftCard.state.giftCardData.isEmbededOnPage = gkt.gktGiftCard.state?.giftCardData?.isEmbededOnPage ? true : false; 7567 gkt.gktGiftCard.f.giftCardAddToCartButtonOverwrite(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage) 7568 gkt.gktGiftCard.f.giftCardBuyNowButtonOverwrite() 7569 7570 gkt.gktGiftCard.f.changeGiftCardAddToCartButtonText(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.addToCartButtonText)) 7571 gkt.gktGiftCard.f.initializeModal() 7572 7573 if(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage){ 7574 let productpageUi = gkt.gktGiftCard.f.getProductPageGiftCardUi() 7575 gkt.gktGiftCard.f.insertIntoProductPageWrapper(productpageUi) 7576 } 7577 7578 gkt.gktGiftCard.f.setCustomStylingForGiftcard() 7579 7580 // initialize video messages 7581 gkt.gktVideoMsg.init(settings, parent) 7582 } 7583 console.log("gktGiftCard initialize") 7584 console.log("settings.giftCard") 7585 }, 7586 f: { 7587 insertIntoProductPageWrapper: function (productpageUi) { 7588 gkt.elements.productPageWrapperV2.find(".gktGiftCardWrapper").css("display", "block") 7589 gkt.elements.productPageWrapperV2.find(".gktGiftCardWrapper").append(productpageUi); 7590 7591 }, 7592 getProductPageGiftCardUi: function () { 7593 let { modalHeading, modalDescription, recipientName, recipientNamePlaceholder, recipientEmail, recipientEmailPlaceholder, senderName, senderNamePlaceholder, giftNote, giftNotePlaceholder, buyNowButtonText,backButtonText,deliveryDate,sendNowButtonText,sendLaterButtonText } = gkt.settings.languageData.giftcardV2.purchasePageFields; 7594 let productPageGiftCardUi = gkt.$("<div>").addClass("productPageGiftCardUi") 7595 let gktGiftCardToInputField = gkt.$("<input>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(recipientNamePlaceholder)).addClass("gktGiftCardToInputField"); 7596 let gktGiftCardEmailInputField = gkt.$("<input>").attr("type", "email").attr("placeholder", gkt.utility.renderLanguageValue(recipientEmailPlaceholder)).addClass("gktGiftCardEmailInputField"); 7597 let gktGiftCardMessageInputField = gkt.$("<textarea>").addClass("gktGiftCardMessageInputField").attr("placeholder", gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftNotePlaceholder)) 7598 let gktGiftCardEmailValidation = gkt.$("<p>", { class: "gktGiftCardEmailValidation" }); 7599 7600 productPageGiftCardUi.append(gktGiftCardToInputField) 7601 productPageGiftCardUi.append(gktGiftCardEmailInputField) 7602 productPageGiftCardUi.append(gktGiftCardEmailValidation) 7603 productPageGiftCardUi.append(gktGiftCardMessageInputField) 7604 gkt.productPageGiftCardUi = productPageGiftCardUi; 7605 return productPageGiftCardUi 7606 }, 7607 setCustomStylingForGiftcard: function (){ 7608 let customStyleForGiftcard = gkt.settings.app.customStyleForGiftcard 7609 if(customStyleForGiftcard){ 7610 var styleSheet = document.createElement("style") 7611 styleSheet.innerText = customStyleForGiftcard 7612 document.body.appendChild(styleSheet) 7613 7614 } 7615 }, 7616 checkIfGiftCardProduct: function (currProductHandle, giftCards) { 7617 for (let i = 0; i < giftCards.length; i++) { 7618 if (giftCards[i] && giftCards[i].shopifyData && giftCards[i].shopifyData.handle == currProductHandle) { 7619 return giftCards[i] 7620 } 7621 7622 } 7623 return undefined 7624 }, 7625 giftCardAddToCartButtonOverwrite: function (isEmbededOnPage) { 7626 7627 // set required states 7628 gkt.gktGiftCard.state.isGiftCardAddToCartButtonOverwrite = true 7629 7630 gkt.elements.addToCartBtn.attr("type", "button") 7631 gkt.elements.addToCartBtn.attr("disabled", false) 7632 7633 gkt.elements.addToCartBtn.unbind().unbind("click").off().off("click"); 7634 7635 if(isEmbededOnPage){ 7636 gkt.elements.addToCartBtn.on("click", function (event) { 7637 let formValid = gkt.gktGiftCard.f.performFormValidation(); 7638 if(!formValid){ 7639 return 7640 } 7641 gkt.$(this).attr("disabled", true); 7642 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 7643 gkt.state.sendGiftcardOnPageBtnClicked = true 7644 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 7645 gkt.gktGiftCard.action.onMessageSubmit(event); 7646 7647 }) 7648 }else{ 7649 gkt.elements.addToCartBtn.on("click", function (event) { 7650 // gkt.$(this).attr("disabled", true); 7651 // setTimeout(() => { gkt.$(this).attr("disabled", false); }, 1000) 7652 gkt.gktGiftCard.action.giftCardAddToCartButton(event) 7653 }) 7654 7655 } 7656 7657 }, 7658 giftCardAddToCartButtonOverwrite2: function (isEmbededOnPage) { 7659 // setTimeout(()=>{ 7660 7661 if(gkt.$('.button--add-to-cart-gkt') && gkt.$('.button--add-to-cart-gkt').length && gkt.$('.button--add-to-cart-gkt').length == 1){ 7662 return 7663 } 7664 7665 // set required states 7666 gkt.gktGiftCard.state.isGiftCardAddToCartButtonOverwrite = true 7667 7668 gkt.elements.addToCartBtn.attr("type", "button") 7669 gkt.elements.addToCartBtn.attr("disabled", false) 7670 let oldbutton = gkt.elements.addToCartBtn 7671 let cloneAddToCartBtn = gkt.$("<div>").addClass('button').addClass("button--add-to-cart").addClass("button--add-to-cart-gkt") 7672 cloneAddToCartBtn.append(gkt.$("<span>").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.addToCartButtonText))) 7673 gkt.$(".gktProductPageWrapperV2").append(cloneAddToCartBtn) 7674 7675 oldbutton.css("visibility", "hidden") 7676 oldbutton.css("height", "0") 7677 oldbutton.css("width", "0") 7678 oldbutton.css("padding", "0") 7679 oldbutton.css("margin", "0") 7680 oldbutton.css("line-height", "0"); 7681 oldbutton.css("min-height", "0"); 7682 7683 7684 7685 7686 gkt.elements.addToCartBtn.unbind().unbind("click").off().off("click"); 7687 7688 if(isEmbededOnPage){ 7689 gkt.elements.addToCartBtn.on("click", function (event) { 7690 let formValid = gkt.gktGiftCard.f.performFormValidation(); 7691 if(!formValid){ 7692 return 7693 } 7694 gkt.$(this).attr("disabled", true); 7695 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 7696 gkt.state.sendGiftcardOnPageBtnClicked = true 7697 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 7698 gkt.gktGiftCard.action.onMessageSubmit(event); 7699 7700 }) 7701 }else{ 7702 cloneAddToCartBtn.on("click", function (event) { 7703 // gkt.$(this).attr("disabled", true); 7704 // setTimeout(() => { gkt.$(this).attr("disabled", false); }, 1000) 7705 gkt.gktGiftCard.action.giftCardAddToCartButton(event) 7706 }) 7707 7708 } 7709 7710 // }, 500) 7711 7712 }, 7713 giftCardBuyNowButtonOverwrite: function () { 7714 // set required states 7715 gkt.gktGiftCard.state.isGiftCardBuyNowButtonOverwrite = true 7716
7717 if (gkt.$(document).find(gkt.selectors.buyNowBtn)) { 7718 // gkt.$(document).find(gkt.selectors.buyNowBtn).hide() 7719 let buyNowBtnEle = gkt.$(document).find(gkt.selectors.buyNowBtn) 7720 buyNowBtnEle.css("visibility", "hidden") 7721 buyNowBtnEle.css("height", "0") 7722 buyNowBtnEle.css("width", "0") 7723 buyNowBtnEle.css("padding", "0") 7724 buyNowBtnEle.css("margin", "0") 7725 buyNowBtnEle.css("line-height", "0"); 7726 buyNowBtnEle.css("min-height", "0"); 7727 } 7728 }, 7729 changeGiftCardAddToCartButtonText: function (insideHtml) { 7730 if (gkt.gktGiftCard.state.isGiftCardAddToCartButtonOverwrite) { 7731 gkt.elements.addToCartBtn.html(insideHtml) 7732 } else { 7733 return false 7734 } 7735 7736 }, 7737 openGiftCardModal: function () { 7738 gkt.$('.gktGiftCardModalWrapper').css('display', 'block') 7739 gkt.$('.gktGiftCardModal .gktPoweredByBanner').html(gkt.f.preparePoweredByBannerUI()); 7740 }, 7741 registerEvents: function () { 7742 gkt.$(document).on("click", ".gktGiftCardModalClose", gkt.gktGiftCard.action.onModalClose) 7743 }, 7744 initializeModal: function () { 7745 const isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled && 7746 gkt.settings.greetingCards.greetingCardImgs && 7747 gkt.settings.greetingCards.greetingCardImgs.length>0; 7748 7749 7750 if(isGreetingCardEnabled ){ 7751 gkt.gktGiftCard.f.prepareGreetingCardUI() 7752 gkt.gktGiftCard.f.populateModalNavList(); 7753 gkt.gktGiftCard.f.displayGreetingCardForm() 7754 } 7755 else{ 7756 gkt.$('.greetingCardImageList').remove() 7757 gkt.gktGiftCard.f.populateModalNavList(); 7758 gkt.gktGiftCard.f.displayGiftCardDetailsForm() 7759 } 7760 gkt.gktGiftCard.f.prepareGiftCardUI(); 7761 gkt.gktGiftCard.f.prepareGiftCardMessage(); 7762 }, 7763 renderGreetingCardImages:function(imageList){ 7764 if(imageList){ 7765 let greetingCardImageList = gkt.$("<div>").addClass("greetingCardImageList") 7766 for (let i = 0; i < imageList.length; i++) { 7767 let _img = imageList[i].src; 7768 // add an input event listener to each image of radio type 7769 imageInput = gkt.$("<input>").attr("type", "radio").attr("name", "greetingCardImage").attr("value", imageList[i].src) 7770 imageInput.addClass("greetingCardImageInput") 7771 let imageLabel = gkt.$("<label>").addClass('greetingCardImageLabel') 7772 let image = gkt.$("<img>").addClass('greetingCardImage') 7773 7774 //on click set the current item to the preview image as active image 7775 imageLabel.on("click", gkt.gktGiftCard.action.onGreetingCardImageClick) 7776 7777 //if image is checked then attach activeGreetingCard css to it 7778 if (gkt.gktGiftCard.state.greetingCardActiveImageSrc == imageList[i].src) { 7779 imageInput.attr("checked", true) 7780 imageLabel.addClass("activeGreetingCard") 7781 gkt.gktGiftCard.action.addCheckMarkDivs(imageLabel); 7782 } 7783 image.attr("src", imageList[i].src) 7784 imageLabel.append(imageInput) 7785 imageLabel.append(image) 7786 greetingCardImageList.append(imageLabel) 7787 } 7788 // if greetingCardImageList has no elements then return that there are no Images to display 7789 if (greetingCardImageList.children().length == 0) { 7790 return gkt.$("<div>").addClass('greetingCardImageList').html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.noImagesAvailable)) 7791 } 7792 return greetingCardImageList; 7793 } 7794 7795 }, 7796 7797 changeGreetingCardImageList: function(category){
7798 let imageList = gkt.settings.greetingCards.greetingCardImgs 7799 let imageListFiltered = gkt.gktGiftCard.f.filterGreetingCardImages(imageList,category) 7800 let greetingCardImageList = gkt.gktGiftCard.f.renderGreetingCardImages(imageListFiltered) 7801 // find the div with class greetingCardImageList and replace it with the new one 7802 gkt.gktGiftCard.state.greetingCardImageListDiv = greetingCardImageList; 7803 7804 gkt.$(".greetingCardImageList").replaceWith(greetingCardImageList) 7805 return greetingCardImageList; 7806 }, 7807 filterGreetingCardImages: function(imageList,category){ 7808 let imageListFiltered = [] 7809 for (let i = 0; i < imageList.length; i++) { 7810 if(imageList[i].categoryId == category.id){ 7811 imageListFiltered.push(imageList[i]) 7812 } 7813 } 7814 return imageListFiltered 7815 }, 7816 prepareGreetingCardUI : async function (){ 7817 console.log("gktGiftCard.f.prepareGreetingCardUI") 7818 const greetingCardFields = gkt.settings.languageData.giftcardV2.greetingCardFields 7819 const continueButtonText = greetingCardFields.greetingCardContinueButtonText; 7820 const greetingCardCategory = greetingCardFields.greetingCardCategory; 7821 // This is where we have the greeting card categories, we need to render them in the modal as list items 7822 const greetingCardCategories = [greetingCardFields.greetingCardCategory1,greetingCardFields.greetingCardCategory2,greetingCardFields.greetingCardCategory3] 7823 7824 let greetingCardContainer = gkt.$("<div>").addClass('gktGiftCardContainer') 7825 let greetingCardMainBody = gkt.$("<div>").addClass('greetingCardMainBody') 7826 7827 7828 7829 7830 // add a line of categories which the user can click on 7831 let greetingCardCategoryList = gkt.$("<ul>").addClass('greetingCardCategoryList') 7832 let greetingCardCategoryListItem = gkt.$("<li>").addClass('greetingCardCategoryListItem') 7833 let greetingCardCategoryListItemText = gkt.$("<a>").addClass('greetingCardCategoryListItemText') 7834 let imageInput = undefined; 7835 let imageList = gkt.settings.greetingCards.greetingCardImgs; 7836 7837 // add the image of the gift card as the first item in the list 7838 //find the giftcard associated with this page handle 7839 7840 //find the giftcard associated with this page handle 7841 7842 7843 gkt.f.applyLabelCSS(greetingCardCategoryListItemText) 7844 7845 let productHandle = gkt.f.getProductPageHandle(gkt.settings) 7846 7847 //now get the giftcard associated with this page handle 7848 // let currGiftcardItem = gkt.settings.giftCards.find(giftcardItem => giftcardItem.shopifyData.handle == productHandle) 7849 if(false){ 7850 let currGiftcardItem = await gkt.utility.getProductDataV2(productHandle); 7851 let currGiftcardItemImage = currGiftcardItem.images[0] || currGiftcardItem.featured_image 7852 if(currGiftcardItemImage){ 7853 7854 //add the image of the gift card as the first item in the list 7855 //unshift is supprted by all browsers, checked on MDN 7856 7857 imageList.unshift({ 7858 category: "Occasion", 7859 categoryId: "greetingCardCategory1", 7860 id:0, 7861 src:currGiftcardItemImage 7862 }) 7863 } 7864 7865 // const getFirstImageFromGeneralCategory = imageList.find(x=>x.categoryId=="greetingCardCategory1"); 7866 let defaultGreetingCardSelection; 7867 if(currGiftcardItemImage){ 7868 defaultGreetingCardSelection = imageList[0]; 7869 } 7870 // const letsUseTheGiftCardImage = ; 7871 if(currGiftcardItemImage){ 7872 gkt.gktGiftCard.state.greetingCardActiveImageSrc = defaultGreetingCardSelection.src 7873 } 7874 } 7875 7876 gkt.gktGiftCard.state.greetingCardImageListDiv = gkt.gktGiftCard.f.renderGreetingCardImages(imageList) 7877 7878 for (let i = 0; i < greetingCardCategories.length; i++) { 7879 let greetingCardCategoryListItemClone = gkt.$(greetingCardCategoryListItem).clone() 7880 let greetingCardCategoryListItemTextClone = gkt.$(greetingCardCategoryListItemText).clone() 7881 greetingCardCategoryListItemTextClone.html(gkt.utility.renderLanguageValue(greetingCardCategories[i])) 7882 7883 // Select the first category as default (General) 7884 if(i == 0){ 7885 const _this = greetingCardCategoryListItemClone[0]; 7886 gkt.gktGiftCard.state.greetingCardSelectedCategory = greetingCardCategories[0] 7887 gkt.gktGiftCard.action.onGreetingCardCategoryClick.call(_this) 7888 } 7889 greetingCardCategoryListItemClone.on("click",function(){ 7890 gkt.gktGiftCard.state.greetingCardSelectedCategory=greetingCardCategories[i] 7891 gkt.gktGiftCard.action.onGreetingCardCategoryClick.call(this) 7892 }) 7893 greetingCardCategoryListItemClone.append(greetingCardCategoryListItemTextClone) 7894 greetingCardCategoryList.append(greetingCardCategoryListItemClone) 7895 } 7896 7897 let imageListFiltered = gkt.gktGiftCard.f.filterGreetingCardImages(imageList,greetingCardCategories[0]) 7898 let greetingCardImageListHTML = gkt.gktGiftCard.f.renderGreetingCardImages(imageListFiltered) 7899 greetingCardMainBody.html(greetingCardImageListHTML) 7900 7901 greetingCardContainer.append(greetingCardCategoryList) 7902 greetingCardContainer.append(greetingCardMainBody) 7903 7904 let gktGiftCardGreetingCardContent = gkt.$(".gktGiftCardGreetingCardContent") 7905 gktGiftCardGreetingCardContent.append(greetingCardContainer) 7906 7907 7908 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(continueButtonText)); 7909 }, 7910 prepareGiftCardUI: function () { 7911 console.log("gktGiftCard.f.prepareGiftCardUI") 7912 const inputFieldsHTML = gkt.gktGiftCard.f.renderInputFieldsForGiftCardDetail
7912s(); 7913 let gktGiftCardDetailsContent = gkt.$(".gktGiftCardDetailsContent") 7914 //TODO prepareBackButton() 7915 const isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled 7916 && gkt.settings.greetingCards.greetingCardImgs 7917 && gkt.settings.greetingCards.greetingCardImgs.length>0; 7918 let gktGiftCardModalBackButton; 7919 if(isGreetingCardEnabled){ 7920 gktGiftCardModalBackButton = gkt.gktGiftCard.f.prepareBackButton(gkt.gktGiftCard.f.displayGreetingCardForm); 7921 gktGiftCardDetailsContent.append(gktGiftCardModalBackButton); 7922 } 7923 7924 gktGiftCardDetailsContent.append(inputFieldsHTML) 7925 // gktGiftCardDetailsContent.append(gktVideoMsgButton) 7926 7927 // append close button 7928 gktGiftCardModalCloseDiv = gkt.$(".gktGiftCardModalClose") 7929 let closeButtonSvg = '<svg width="24px" height="24px" enable-background="new 0 0 587.91 587.91" version="1.1" viewBox="0 0 587.91 587.91" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m86.451 501.46c26.937 26.936 58.315 48.088 93.265 62.871 36.207 15.314 74.642 23.078 114.24 23.078 39.596 0 78.032-7.764 114.24-23.078 34.949-14.783 66.328-35.936 93.266-62.871 26.936-26.938 48.09-58.316 62.871-93.266 15.314-36.207 23.08-74.643 23.08-114.24 0-39.598-7.766-78.033-23.08-114.24-14.781-34.95-35.936-66.328-62.871-93.265-26.938-26.937-58.316-48.09-93.266-62.872-36.208-15.315-74.643-23.079-114.24-23.079-39.597 0-78.032 7.765-114.24 23.079-34.95 14.782-66.328 35.936-93.265 62.872s-48.09 58.315-62.873 93.264c-15.313 36.207-23.078 74.642-23.078 114.24 0 39.596 7.765 78.031 23.079 114.24 14.782 34.95 35.936 66.328 62.872 93.266zm207.5-458.12c138.41 0 250.61 112.2 250.61 250.62 0 138.41-112.2 250.61-250.61 250.61s-250.62-112.2-250.62-250.61c0-138.41 112.2-250.62 250.62-250.62z"/><path d="m293.96 587.91c-39.667 0-78.167-7.778-114.43-23.117-35.01-14.809-66.442-35.998-93.423-62.979-26.983-26.984-48.172-58.417-62.979-93.425-15.341-36.269-23.119-74.77-23.119-114.43 0-39.663 7.778-78.165 23.118-114.44 14.807-35.008 35.997-66.44 62.979-93.423s58.415-48.172 93.423-62.979c36.27-15.34 74.771-23.118 114.43-23.118 39.666 0 78.167 7.778 114.43 23.119 35.009 14.807 66.441 35.997 93.425 62.979 26.984 26.985 48.173 58.417 62.979 93.423 15.341 36.27 23.119 74.771 23.119 114.43 0 39.662-7.778 78.163-23.119 114.43-14.806 35.007-35.994 66.439-62.979 93.425-26.982 26.98-58.415 48.169-93.425 62.979-36.266 15.338-74.767 23.116-114.43 23.116zm0-586.91c-39.529 0-77.898 7.751-114.04 23.039-34.889 14.757-66.215 35.874-93.106 62.765-26.892 26.892-48.009 58.217-62.766 93.105-15.288 36.147-23.039 74.517-23.039 114.05 0 39.527 7.751 77.898 23.039 114.04 14.757 34.889 35.874 66.214 62.766 93.106 26.89 26.889 58.215 48.006 93.106 62.765 36.142 15.287 74.512 23.038 114.04 23.038s77.901-7.751 114.04-23.039c34.89-14.758 66.216-35.875 93.106-62.764 26.893-26.895 48.009-58.22 62.764-93.106 15.289-36.146 23.041-74.516 23.041-114.04 0-39.529-7.752-77.899-23.041-114.04-14.754-34.887-35.871-66.212-62.764-93.106-26.892-26.891-58.218-48.008-93.106-62.765-36.144-15.289-74.514-23.04-114.04-23.04zm0 544.07c-67.075 0-130.14-26.12-177.56-73.549-47.429-47.43-73.55-110.49-73.55-177.56s26.12-130.14 73.55-177.56c47.429-47.429 110.49-73.55 177.56-73.55s130.14 26.121 177.56 73.55c47.43 47.43 73.55 110.49 73.55 177.56s-26.12 130.14-73.55 177.56c-47.429 47.429-110.49 73.549-177.56 73.549zm0-501.23c-66.808 0-129.62 26.017-176.86 73.257-47.24 47.241-73.257 110.05-73.257 176.86s26.017 129.62 73.257 176.86c47.24 47.24 110.05 73.257 176.86 73.257s129.62-26.017 176.86-73.257c47.24-47.239 73.257-110.05 73.257-176.86 0-66.808-26.017-129.62-73.257-176.86-47.241-47.241-110.05-73.257-176.86-73.257z"/><path d="m184.92 402.99c4.183 4.184 9.664 6.275 15.146 6.275s10.964-2.092 15.146-6.275l78.742-78.742 78.743 78.742c4.182 4.184 9.664 6.275 15.146 6.275s10.963-2.092 15.146-6.275c8.365-8.363 8.365-21.926 0-30.291l-78.744-78.742 78.742-78.743c8.365-8.365 8.365-21.928 0-30.292-8.363-8.365-21.926-8.365-30.291 0l-78.743 78.743-78.742-78.743c-8.365-8.365-21.928-8.365-30.292 0-8.365 8.365-8.365 21.927 0 30.292l78.743 78.743-78.743 78.742c-8.364 8.365-8.364 21.928 1e-3 30.291z"/><path d="m387.84 409.76c-5.856 0-11.36-2.28-15.5-6.422l-78.389-78.389-78.388 78.389c-4.14 4.142-9.645 6.422-15.5 6.422s-11.36-2.28-15.5-6.422c-4.14-4.14-6.42-9.644-6.42-15.498 0-5.855 2.28-11.359 6.42-15.5l78.389-78.389-78.389-78.389c-8.546-8.547-8.546-22.453 0-31 4.14-4.14 9.644-6.42 15.5-6.42 5.855 0 11.36 2.28 15.5 6.42l78.389 78.389 78.389-78.389c4.141-4.14 9.645-6.42 15.5-6.42 5.854 0 11.358 2.28 15.498 6.42 4.141 4.14 6.42 9.645 6.42 15.5s-2.279 11.36-6.42 15.5l-78.389 78.389 78.391 78.389c4.141 4.141 6.421 9.645 6.421 15.5 0 5.854-2.28 11.358-6.421 15.498-4.143 4.141-9.647 6.422-15.501 6.422zm-93.889-86.225 79.096 79.096c3.95 3.952 9.204 6.129 14.793 6.129 5.587 0 10.841-2.177 14.793-6.
7929129 3.951-3.95 6.128-9.203 6.128-14.791s-2.177-10.842-6.128-14.793l-79.098-79.096 79.096-79.096c3.951-3.951 6.127-9.205 6.127-14.793s-2.176-10.841-6.127-14.792c-3.95-3.951-9.203-6.127-14.791-6.127s-10.842 2.176-14.793 6.127l-79.096 79.096-79.096-79.096c-3.951-3.951-9.205-6.127-14.793-6.127s-10.841 2.176-14.792 6.127c-8.156 8.157-8.156 21.428 0 29.585l79.096 79.096-79.096 79.096c-3.951 3.951-6.127 9.205-6.127 14.793s2.176 10.841 6.127 14.791c3.952 3.952 9.205 6.129 14.793 6.129s10.841-2.177 14.793-6.129l79.095-79.096z"/></svg>' 7930 gktGiftCardModalCloseDiv.append(closeButtonSvg) 7931 }, 7932 prepareBackButton: function (callback){ 7933 let gktGiftCardModalBackButton = gkt.$("<div>").addClass("gktGiftCardModalBackButton") 7934 let gktGiftCardModalBackButtonSVG = gkt.$("<div>").addClass("gktGiftCardModalBackButtonSVG") 7935 gktGiftCardModalBackButtonSVG.append('<svg class="svg-icon" style="width: 16px; height: 16px;vertical-align: middle;fill: currentColor;overflow: hidden; transform: rotate(180deg);" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M682.666667 533.333333a21.333333 21.333333 0 0 1-15.146667-6.186666l-298.666667-298.666667a21.333333 21.333333 0 0 1 30.293334-30.293333l298.666666 298.666666a21.333333 21.333333 0 0 1 0 30.293334A21.333333 21.333333 0 0 1 682.666667 533.333333z" fill="#333333" /><path d="M384 832a21.333333 21.333333 0 0 1-15.146667-6.186667 21.333333 21.333333 0 0 1 0-30.293333l298.666667-298.666667a21.333333 21.333333 0 0 1 30.293333 30.293334l-298.666666 298.666666A21.333333 21.333333 0 0 1 384 832z" fill="#333333" /></svg>') 7936 let gktGiftCardModalBackButtonText = gkt.$("<div>").addClass("gktGiftCardModalBackButtonText").append(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.backButtonText)) 7937 gktGiftCardModalBackButton.append(gktGiftCardModalBackButtonSVG) 7938 gktGiftCardModalBackButton.append(gktGiftCardModalBackButtonText) 7939 gktGiftCardModalBackButton.on("click", function () { 7940 callback() 7941 }) 7942 return gktGiftCardModalBackButton; 7943 }, 7944 renderInputFieldsForGiftCardDetails: function(){ 7945 let { modalHeading, modalDescription, recipientName, recipientNamePlaceholder, recipientEmail, recipientEmailPlaceholder, senderName, senderNamePlaceholder, giftNote, giftNotePlaceholder, buyNowButtonText,backButtonText,deliveryDate,sendNowButtonText,sendLaterButtonText } = gkt.settings.languageData.giftcardV2.purchasePageFields; 7946 7947 let gktGiftCardModalPopupHeading = gkt.$("gktGiftCardModalPopupHeading") 7948 let gktGiftCardModalHeader = gkt.$(".gktGiftCardModalHeader") 7949 7950 let gktGiftCardToInputField = gkt.$("<input>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(recipientNamePlaceholder)).addClass("gktGiftCardToInputField"); 7951 let gktGiftCardEmailInputField = gkt.$("<input>").attr("type", "email").attr("placeholder", gkt.utility.renderLanguageValue(recipientEmailPlaceholder)).addClass("gktGiftCardEmailInputField"); 7952 let gktGiftCardFromInputField = gkt.$("<input>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(senderNamePlaceholder)).addClass("gktGiftCardFromInputField"); 7953 7954 // attach a checkbox, 7955 let gktGiftCardModalCheckboxContainer = gkt.$("<div>").addClass("gktGiftCardModalCheckboxContainer") 7956 let gktGiftCardModalCheckbox = gkt.$("<label>").addClass("gktGiftCardModalCheckbox") 7957 let gktGiftCardInputCheckbox = gkt.$("<input>").attr("type","checkbox").addClass("gktGiftCardModalCheckboxInput").attr("name","gktGiftCardModalCheckbox") 7958 .on("change",function(){ 7959 gkt.gktGiftCard.action.onSendSelfClick(); 7960 }) 7961 7962 let gktCustomCheckboxCheckmarkSmall = gkt.$("<span>").addClass("gktCustomCheckboxCheckmarkSmall").attr("for","gktGiftCardModalCheckbox") 7963 let gktGiftCardModalCheckboxLabel = gkt.$("<span>").addClass("gktGiftCardModalCheckboxLabel").attr("for","gktGiftCardModalCheckbox") 7964 gktGiftCardModalCheckboxContainer.append(gktGiftCardModalCheckbox) 7965 7966 // a date picker 7967 let gktGiftCardDatePicker = gkt.$("<input>").attr("type", "date").addClass("gktGiftCardDatePicker"); 7968 // todays date is the default value 7969 // gktGiftCardDatePicker.attr("value", new Date().toISOString().slice(0, 10)); 7970 gktGiftCardDatePicker.attr("value", gkt.utility.getLocalDateIn_YYYY_MM_DD()); 7971 let gktGiftCardMessageInputField = gkt.$("<textarea>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(giftNotePlaceholder)).addClass("gktGiftCardMessageInputField").attr("rows", "4"); 7972 7973 7974 let gktGiftCardEmailValidation = gkt.$("<p>", { class: "gktGiftCardEmailValidation" });
7975 let gktGiftCardDateValidation = gkt.$("<p>", { class: "gktGiftCardDateValidation" }); 7976 // add a label to all of these fields 7977 let gktGiftCardToLabel = gkt.$("<label>").addClass("gktGiftCardToLabel").html(gkt.utility.renderLanguageValue(recipientName)); 7978 let gktGiftCardFromLabel = gkt.$("<label>").addClass("gktGiftCardFromLabel").html(gkt.utility.renderLanguageValue(senderName)) 7979 let gktGiftCardEmailLabel = gkt.$("<label>").addClass("gktGiftCardEmailLabel").html(gkt.utility.renderLanguageValue(recipientEmail)) 7980 // let gktGiftCardMessageLabel = gkt.$("<label>").addClass("gktGiftCardMessageLabel").html(giftNote.value) 7981 let gktGiftCardDateLabel = gkt.$("<label>").addClass("gktGiftCardDateLabel").html(gkt.utility.renderLanguageValue(deliveryDate)) 7982 7983 // applyLabelCSS to all of these fields 7984 gkt.f.applyLabelCSS(gktGiftCardToLabel) 7985 gkt.f.applyLabelCSS(gktGiftCardFromLabel) 7986 gkt.f.applyLabelCSS(gktGiftCardEmailLabel) 7987 gkt.f.applyLabelCSS(gktGiftCardDateLabel) 7988 7989 // create two buttons, detailing Delivery Options 7990 let gktDeliveryOptions = gkt.$("<div>").addClass("gktDeliveryOptions") 7991 let gktGiftCardSendNowButton = gkt.$("<button>").addClass("gktGiftCardSendNowButton").html(gkt.utility.renderLanguageValue(sendNowButtonText)); 7992 let gktGiftCardSendLaterButton = gkt.$("<button>").addClass("gktGiftCardSendLaterButton").html(gkt.utility.renderLanguageValue(sendLaterButtonText)); 7993 7994 7995 // type as button else they autosubmit the form. 7996 gktGiftCardSendNowButton.attr("type", "button"); 7997 7998 gktGiftCardSendLaterButton.attr("type", "button"); 7999 8000 gktDeliveryOptions.append(gktGiftCardSendNowButton) 8001 gktDeliveryOptions.append(gktGiftCardSendLaterButton) 8002 // add all of these to the gktGiftCardDateLabel 8003 gktGiftCardDateLabel.append(gktDeliveryOptions) 8004 8005 gktGiftCardSendNowButton.addClass("activeDeliveryOption"); 8006 8007 gktGiftCardSendNowButton.css("font-family", gkt.settings.app.themeButtonFontFamily); 8008 gktGiftCardSendLaterButton.css("font-family", gkt.settings.app.themeButtonFontFamily); 8009 gkt.f.applyButtonCSS(gktGiftCardSendNowButton) 8010 8011 //add onClickFunctionality to Send Later which opens up a date picker 8012 gktGiftCardSendLaterButton.on("click", function () { 8013 gktGiftCardDatePicker.css("display", "block"); 8014 gkt.f.applyButtonCSS(gktGiftCardSendLaterButton); 8015 8016 gkt.f.resetButtonCSS(gktGiftCardSendNowButton) 8017 gktGiftCardSendLaterButton.addClass("activeDeliveryOption"); 8018 gktGiftCardSendNowButton.removeClass("activeDeliveryOption"); 8019 gkt.gktGiftCard.state.giftCardDeliveryOption = "sendLater" 8020 gktGiftCardDateLabel.append(gktGiftCardDatePicker).append(gktGiftCardDateValidation) 8021 }) 8022 8023 gktGiftCardSendNowButton.on("click", function () { 8024 gktGiftCardDatePicker.css("display", "none"); 8025 gkt.f.applyButtonCSS(gktGiftCardSendNowButton) 8026 //add activeDeliveryOption class to the button 8027 gktGiftCardSendNowButton.addClass("activeDeliveryOption"); 8028 gkt.f.resetButtonCSS(gktGiftCardSendLaterButton) 8029 gktGiftCardSendLaterButton.removeClass("activeDeliveryOption"); 8030 gkt.gktGiftCard.state.giftCardDeliveryOption = "sendNow" 8031 }) 8032 8033 gktGiftCardToLabel.attr("required", true) 8034 gktGiftCardFromLabel.attr("required", true) 8035 gktGiftCardEmailLabel.attr("required", true) 8036 // gktGiftCardMessageLabel.attr("required", true) 8037 // add todays date as default value 8038 8039 // gktGiftCardDatePicker.attr("value", new Date().toISOString().slice(0, 10)) 8040 gktGiftCardDatePicker.attr("value", gkt.utility.getLocalDateIn_YYYY_MM_DD()); 8041 8042 8043 //attach a date min and max value attr to the date picker 8044 // gktGiftCardDatePicker.attr("min", new Date().toISOString().slice(0, 10)); 8045 gktGiftCardDatePicker.attr("min", gkt.utility.getLocalDateIn_YYYY_MM_DD()); 8046 8047 8048 // and max date is set to the 60 days after 8049 // gktGiftCardDatePicker.attr("max", new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000).toISOString().slice(0, 10)); 8050 8051 const _maxDate = new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000); 8052 gktGiftCardDatePicker.attr("max", gkt.utility.getLocalDateIn_YYYY_MM_DD(_maxDate)); 8053 8054 // add all of these fields to a div 8055 let gktGiftCardInputFieldsDiv = gkt.$("<div>").addClass("gktGiftCardInputFieldsDiv") 8056 8057 let gktGiftCardInputReceiverName = gkt.$("<div>").addClass("gktGiftCardInputReceiverName") 8058 // let gktGiftCardInputRow1Div1 = gkt.$("<div>").addClass("gktGiftCardInputRow1Div1") 8059 // let gktGiftCardInputRow1Div2 = gkt.$("<div>").addClass("gktGiftCardInputRow1Div2") 8060 let gktGiftCardInputReceiverEmail = gkt.$("<div>").addClass("gktGiftCardInputReceiverEmail") 8061 let gktGiftCardInputRow3Div1 = gkt.$("<div>").addClass("gktGiftCardInputRow3Div1") 8062 let gktGiftCardInputSenderName = gkt.$("<div>").addClass("gktGiftCardInputSenderName") 8063 8064 let gktGiftCardInputRow5 = gkt.$("<div>").addClass("gktGiftCardInputRow5") 8065 8066 // gktGiftCardInputRow1.append(gktGiftCardInputRow1Div1).append(gktGiftCardInputRow1Div2) 8067 gktGiftCardInputReceiverName.append(gktGiftCardToLabel).append(gktGiftCardToInputField) 8068 gktGiftCardInputReceiverEmail.append(gktGiftCardEmailLabel).append(gktGiftCardEmailInputField).append(gktGiftCardEmailValidation) 8069 // gktGiftCardInputRow3Div1. 8070 gktGiftCardInputSenderName.append(gktGiftCardFromLabel).append(gktGiftCardFromInputField) 8071 gktGiftCardInputRow5.append(gktGiftCardDateLabel) 8072 8073 gktGiftCardModalCheckboxLabel.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.sendToSelfText)); 8074 8075 gktGiftCardModalCheckbox.append(gktGiftCardInputCheckbox) 8076 gktGiftCardModalCheckbox.append(gktCustomCheckboxCheckmarkSmall) 8077 gktGiftCardModalCheckbox.append(gktGiftCardModalCheckboxLabel) 8078 8079 gktGiftCardInputFieldsDiv.append(gktGiftCardModalCheckboxContainer) 8080 gktGiftCardInputFieldsDiv.append(gktGiftCardInputReceiverName) 8081 gktGiftCardInputFieldsDiv.append(gktGiftCardInputReceiverEmail) 8082 gktGiftCardInputFieldsDiv.append(gktGiftCardInputSenderName) 8083 gktGiftCardInputFieldsDiv.append(gktGiftCardInputRow5) 8084 8085 return gktGiftCardInputFieldsDiv; 8086 }, 8087 prepareGiftCardMessage : function (){ 8088 8089 let gktGiftCardMessage = gkt.$(".gktGiftCardMessageContent"); 8090 // a label field 8091 let gktGiftCardMessageLabel = gkt.$("<label>").addClass("gktGiftCardMessageLabel").attr("for", "gktGiftCardMessage").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftNote)); 8092 let gktGiftCardMessageInputField = gkt.$("<textarea>").addClass("gktGiftCardMessageInputField").attr("placeholder", gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftNotePlaceholder)) 8093 let gktVideoMsgButton; 8094 8095 8096 gkt.f.applyLabelCSS(gktGiftCardMessageLabel) 8097 8098 // create an empty divider to separate the message and the video message button 8099 let gktGiftCardMessageDivider = gkt.$("<div>").addClass("gktGiftCardMessageDivider")
8100 let gktVideoMsgCheckboxWrapper; 8101 let gktVideoMsgCheckboxLabel; 8102 if(gkt.settings.videoMessage.isVideoMessagingEnabled ){ 8103 //gktVideoMsgButton = gkt.$("<button>").addClass("gktVideoMsgButton").attr("type", "button").text(gkt.settings.languageData.videoMessage.sendVideoMessageText.value); 8104 gktVideoMsgButton = gkt.$("<button>").addClass("gktVideoMsgButton").attr("type", "button").text("Video Msg"); 8105 gktVideoMsgCheckboxLabel = gkt.$("<label>").addClass("gktVideoMsgCheckboxLabel").attr("for", "gktVideoMsgCheckbox").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.recordVideoLabel)); 8106 // create a label with switch classname 8107 8108 gkt.f.applyLabelCSS(gktVideoMsgCheckboxLabel) 8109 8110 gktVideoMsgCheckboxWrapper = gkt.$("<label>").addClass("gktVideoMsgCheckboxWrapper").attr("for", "gktVideoMsg") 8111 8112 //input which is type of checkbox 8113 8114 let gktVideoMsgCheckboxField; 8115 8116 // a span which is round and slider css 8117 let gktVideoMsgSlider = gkt.$("<span>").addClass("gktVideoMsgSlider").attr("id", "gktVideoMsgSlider"); 8118 8119 8120 8121 if(gkt.utility.isMobileView()){ 8122 //create a checkbox and a dropzone to upload a video 8123 gktVideoMsgSlider = gkt.$("<span>").addClass("gktVideoMsgSlider_Mobile").attr("id", "gktVideoMsgSlider_Mobile"); 8124 let gktVideoMessageFileInput = gkt.$("<input>").attr("type", "file").addClass("gktVideoMessageFileInput").attr("id", "gktVideoMessageFileInput").attr("capture", "user").attr("accept", "video/*"); 8125 // gktVideoMsgCheckboxField = gktVideoMessageFileInput; 8126 gktVideoMsgCheckboxField = gkt.$("<input>").addClass("gktVideoMsgCheckboxField_Mobile").attr("type", "checkbox").attr("id", "gktVideoMsg_Mobile"); 8127 8128 gktVideoMsgSlider.on("click", function(){ 8129 gktVideoMsgCheckboxField.trigger("click") 8130 if(gktVideoMsgCheckboxField.is(":checked")){ 8131 gktVideoMsgSlider.addClass("gktVideoMsgSliderActive") 8132 gktVideoMessageFileInput.click(); 8133 }else{ 8134 gktVideoMsgSlider.removeClass("gktVideoMsgSliderActive") 8135 gkt.gktVideoMsg.f.clickClose(event); 8136 } 8137 }) 8138 8139 gktVideoMessageFileInput.on("change", async function({target}){ 8140 console.log("file input changed target", target) 8141 if (target.files && target.files.length) { 8142 try { 8143 gkt.gktVideoMsg.f.prepareVideoMsgPlayer() 8144 8145 console.log("target.files[0]", target.files[0]) 8146 gkt.gktVideoMsg.state.recordedBlob = target.files[0]; 8147 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording.attr("src",URL.createObjectURL(gkt.gktVideoMsg.state.recordedBlob)); 8148 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].load(); 8149 // await gkt.gktVideoMsg.f.covertBlobToBase64(target.files[0]); 8150 //do something with above data string 8151 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'grid') 8152 } catch(error) { 8153 //handle error 8154 console.log(error,"error occured while uploading file") 8155 } 8156 }else{ 8157 gktVideoMsgSlider.removeClass("gktVideoMsgSliderActive") 8158 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'none') 8159 } 8160 }) 8161 //append gktVideoMessageFileInput to gktVideoMsg
8161CheckboxWrapper 8162 gktVideoMessageFileInput.css("display", "none"); 8163 gktVideoMsgCheckboxWrapper.append(gktVideoMessageFileInput); 8164 }else{ 8165 gktVideoMsgCheckboxField = gkt.$("<input>").addClass("gktVideoMsgCheckboxField").attr("type", "checkbox").attr("id", "gktVideoMsg"); 8166 gktVideoMsgCheckboxField.on("change", function(event){ 8167 if(gktVideoMsgCheckboxField.is(":checked")){ 8168 console.log("it is checked"); 8169 gkt.gktVideoMsg.actions.gktVideoMsgButton(event); 8170 }else{ 8171 gktVideoMsgSlider.removeClass("gktVideoMsgSliderActive") 8172 gkt.gktVideoMsg.f.clickClose(event); 8173 } 8174 }) 8175 } 8176 gktVideoMsgCheckboxWrapper.append(gktVideoMsgCheckboxField) 8177 gktVideoMsgCheckboxWrapper.append(gktVideoMsgSlider) 8178 } 8179 // gktGiftCardMessageInputField and gktGiftCardMessageLabel are added to same parent div 8180 let gktVideoMessageCheckboxRow = gkt.$("<div>").addClass("gktVideoMessageCheckboxRow") 8181 gktVideoMessageCheckboxRow.append(gktVideoMsgCheckboxLabel).append(gktVideoMsgCheckboxWrapper) 8182 let gktGiftCardMessageInputFieldsDiv = gkt.$("<div>").addClass("gktGiftCardMessageInputFieldsDiv") 8183 gktGiftCardMessageInputFieldsDiv.append(gktGiftCardMessageLabel).append(gktGiftCardMessageInputField) 8184 gktGiftCardModalBackButton = gkt.gktGiftCard.f.prepareBackButton(gkt.gktGiftCard.f.displayGiftCardDetailsForm); 8185 gktGiftCardMessage.append(gktGiftCardModalBackButton); 8186 gktGiftCardMessage.append(gktGiftCardMessageInputFieldsDiv) 8187 gktGiftCardMessage.append(gktGiftCardMessageDivider) 8188 // gktGiftCardMessage.append(gktVideoMsgButton) 8189 gktGiftCardMessage.append(gktVideoMessageCheckboxRow) 8190 // gkt.$(".gktGiftCardModalPopupHeading").append(gktGiftCardModalBackButton) 8191 8192 8193 }, 8194 populateModalNavList : function(){ 8195 let isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled && 8196 gkt.settings.greetingCards.greetingCardImgs && 8197 gkt.settings.greetingCards.greetingCardImgs.length>0; 8198 let isSendToSelfChecked =gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8199 if(isGreetingCardEnabled){ 8200 gkt.gktGiftCard.state.modalNavList.push({id:"GREETING_CARD", name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.greetingCardNavItem), visited:false,active:false}); 8201 } 8202 //("Gift Card Details"); 8203 gkt.gktGiftCard.state.modalNavList.push({id:"GIFT_CARD_DETAILS", name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.giftCardDetailsNavItem), visited:false,active:false}); 8204 if(!isSendToSelfChecked){ 8205 gkt.gktGiftCard.state.modalNavList.push({id:"GIFT_MESSAGE", name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.giftcardMessageNavItem), visited:false,active:false}); 8206 } 8207 8208 }, 8209 renderGiftCardModalNav: function(){ 8210 console.log("rendering gift card modal nav"); 8211 let gktGiftCardModalNavHTML = gkt.$("<div>").addClass("gktGiftCardModalNav"); 8212 let gktGiftCardModalNavForMobileHTML = gkt.$("<div>").addClass("gktGiftCardModalNavForMobile"); 8213 const isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled && 8214 gkt.settings.greetingCards.greetingCardImgs && 8215 gkt.settings.greetingCards.greetingCardImgs.length>0; 8216
8217 if (gkt.gktGiftCard.state.modalNavList.length<1){ 8218 gkt.gktGiftCard.f.populateModalNavList(); 8219 } 8220 8221 gktGiftCardModalNavList = gkt.gktGiftCard.state.modalNavList; 8222 8223 // now create the nav list and append it to the modal nav while attaching a span for ">" 8224 for(let i=0; i<gktGiftCardModalNavList.length; i++){ 8225 let gktGiftCardModalNavListItem = gkt.$("<div>").addClass("gktGiftCardModalNavListItem").html(gktGiftCardModalNavList[i].name); 8226 gkt.f.applyHeaderCSS(gktGiftCardModalNavListItem); 8227 8228 //if modal the item has visited true then set it as activeNavItem 8229 if(gktGiftCardModalNavList[i].visited){ 8230 gktGiftCardModalNavListItem.addClass("activeNavItem"); 8231 } 8232 8233 let gktGiftCardModalNavListItemSpan; 8234 if(i < gktGiftCardModalNavList.length-1){ 8235 gktGiftCardModalNavListItemSpan = gkt.$("<div>").addClass("gktGiftCardModalNavListItemSpan").html('<svg class="svg-icon" style="width: 16px; height: 16px;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M682.666667 533.333333a21.333333 21.333333 0 0 1-15.146667-6.186666l-298.666667-298.666667a21.333333 21.333333 0 0 1 30.293334-30.293333l298.666666 298.666666a21.333333 21.333333 0 0 1 0 30.293334A21.333333 21.333333 0 0 1 682.666667 533.333333z" fill="#333333" /><path d="M384 832a21.333333 21.333333 0 0 1-15.146667-6.186667 21.333333 21.333333 0 0 1 0-30.293333l298.666667-298.666667a21.333333 21.333333 0 0 1 30.293333 30.293334l-298.666666 298.666666A21.333333 21.333333 0 0 1 384 832z" fill="#333333" /></svg>'); 8236 } 8237 if(gktGiftCardModalNavList[i].active){ 8238 gktGiftCardModalNavListItem.addClass("activeNavItem"); 8239 gktGiftCardModalNavForMobileHTML.html(gktGiftCardModalNavListItem.clone()) 8240 } 8241 gktGiftCardModalNavHTML.append(gktGiftCardModalNavListItem) 8242 gktGiftCardModalNavHTML.append(gktGiftCardModalNavListItemSpan) 8243 } 8244 // if gktGiftCardModalNav is not present in the DOM, then append it else replace it 8245 if(gkt.$(".gktGiftCardModalNav").length){ 8246 gkt.$(".gktGiftCardModalNav").replaceWith(gktGiftCardModalNavHTML) 8247 } 8248 else{ 8249 gkt.$(".gktGiftCardModalHeader").append(gktGiftCardModalNavHTML) 8250 } 8251 8252 if(gkt.$(".gktGiftCardModalNavForMobile").length){ 8253 gkt.$(".gktGiftCardModalNavForMobile").replaceWith(gktGiftCardModalNavForMobileHTML) 8254 } 8255 else{ 8256 gkt.$(".gktGiftCardModalHeader").append(gktGiftCardModalNavForMobileHTML) 8257 } 8258 8259 }, 8260 attachEventsToDetailsForm: function () { 8261 // cleanup the previous attached events 8262 gkt.$(".gktGiftCardContentFooterBtn1").off("
8262click"); 8263 8264 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftcardDetailsButton)); 8265 gkt.f.applyButtonCSS(gkt.$(".gktGiftCardContentFooterBtn1")); 8266 gkt.$(".gktGiftCardContentFooterBtn1").on("click", function (event) { 8267 gkt.$(this).attr("disabled", true); 8268 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 8269 gkt.gktGiftCard.action.onDetailsSubmit(event) 8270 }) 8271 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8272 gkt.$(".gktGiftCardContentFooter").append(gkt.gktGiftCard.state.giftCardAddToCartButtonClone) 8273 }, 8274 attachEventsToGreetingCardForm : function(){ 8275 // cleanup the previous attached events 8276 gkt.$(".gktGiftCardContentFooterBtn1").off("click"); 8277 8278 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.greetingCardFields.greetingCardContinueButtonText)); 8279 gkt.f.applyButtonCSS(gkt.$(".gktGiftCardContentFooterBtn1")); 8280 gkt.$(".gktGiftCardContentFooterBtn1").on("click", function (event) { 8281 gkt.$(this).attr("disabled", true); 8282 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 8283 gkt.gktGiftCard.action.onGreetingCardSubmit(event) 8284 }) 8285 // set the first nav item as active 8286 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8287 }, 8288 attachEventsToMessageForm : function (){ 8289 // cleanup the previous attached events 8290 gkt.$(".gktGiftCardContentFooterBtn1").off("
8290click"); 8291 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonText)); 8292 gkt.f.applyButtonCSS(gkt.$(".gktGiftCardContentFooterBtn1")); 8293 gkt.$(".gktGiftCardContentFooterBtn1").on("click", function (event) { 8294 gkt.$(this).attr("disabled", true); 8295 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 8296 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 8297 gkt.gktGiftCard.action.onMessageSubmit(event) 8298 }) 8299 8300 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8301 }, 8302 displayGreetingCardForm:function(){ 8303 gkt.gktGiftCard.action.hideGiftCardMessageBody(); 8304 gkt.gktGiftCard.action.hideGiftCardDetailsBody(); 8305 8306 gkt.gktGiftCard.state.modalNavList.find(function(item){ 8307 if(item.id == "GREETING_CARD"){ 8308 item.visited = true; 8309 item.active = true; 8310 } 8311 else{ 8312 item.active = false; 8313 } 8314 }) 8315 gkt.gktGiftCard.action.showGreetingCardBody(); 8316 gkt.gktGiftCard.f.attachEventsToGreetingCardForm(); 8317 }, 8318 displayGiftCardDetailsForm : function (){ 8319 gkt.gktGiftCard.action.hideGreetingCardBody(); 8320 gkt.gktGiftCard.action.hideGiftCardMessageBody(); 8321 gkt.gktGiftCard.state.modalNavList.find(function(item){ 8322 if(item.id == "GIFT_CARD_DETAILS"){ 8323 item.visited = true; 8324 item.active = true; 8325 } 8326 else{ 8327 item.active = false; 8328 } 8329 }); 8330 gkt.gktGiftCard.action.showGiftCardDetailsBody() 8331 gkt.gktGiftCard.f.attachEventsToDetailsForm(); 8332 }, 8333 displayMessageForm: function(){ 8334 gkt.gktGiftCard.action.hideGreetingCardBody(); 8335 gkt.gktGiftCard.action.hideGiftCardDetailsBody(); 8336 gkt.gktGiftCard.state.modalNavList.find(function(item){ 8337 if(item.id == "GIFT_MESSAGE"){ 8338 item.visited = true; 8339 item.active = true; 8340 }else{ 8341 item.active = false; 8342 } 8343 }); 8344 //and all the other nav items are inactive 8345 8346 gkt.gktGiftCard.action.showGiftCardMessageBody(); 8347 gkt.gktGiftCard.f.attachEventsToMessageForm(); 8348 }, 8349 validateForm: function () { 8350 let isValid = true 8351 console.log("validateForm"); 8352 // run validation on all fields which are visible 8353 gkt.$(".gktGiftCardInputFieldsDiv input").each(function () { 8354 if(gkt.$(this).is(":visible")){ 8355 if (gkt.$(this).val().trim() == "") { 8356 gkt.$(this).css("border", "1px solid red") 8357 isValid = false 8358 } else { 8359 gkt.$(this).css("border", "1px solid #cccccc") 8360 } 8361 } 8362 }) 8363 return isValid; 8364 }, 8365 emailValidation: function (emailString) { 8366 var atSymbol = emailString.indexOf("@"); 8367 if (atSymbol < 1) return false; 8368 8369 var dot = emailString.lastIndexOf("."); 8370 if (dot <= atSymbol + 2) return false; 8371 8372 // check that the dot is not at the end 8373 if (dot === emailString.length - 1) return false; 8374 8375 return true; 8376 }, 8377 dateValidation : function (date){ 8378 // if deliveryOption is sendNow then send date should be today 8379 if(gkt.gktGiftCard.state.giftCardDeliveryOption == "sendNow"){ 8380 date = new Date(); 8381 } 8382 // let today = new Date().toISOString().slice(0, 10) 8383 let today = gkt.utility.getLocalDateIn_YYYY_MM_DD(); 8384 // let dateToCompare = new Date(date).toISOString().slice(0, 10) 8385 let dateToCompare = gkt.utility.getLocalDateIn_YYYY_MM_DD(new Date(date)); 8386 if (dateToCompare < today) { 8387 return false 8388 } 8389 // else if (dateToCompare > new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000).toISOString().slice(0, 10)) { 8390 else if (dateToCompare > gkt.utility.getLocalDateIn_YYYY_MM_DD(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000))) { 8391 return false 8392 } 8393 else { 8394 return true 8395 } 8396 }, 8397 performFormValidation : function (e){ 8398 8399 // let gkGifttCardEmailValueIsValid = gkt.f.validateEmail(gkGifttCardEmailValue) 8400 let gkGifttCardEmailValue = gkt.$(".gktGiftCardEmailInputField").val() 8401 let gkGifttCardDateValue = gkt.$(".gktGiftCardDatePicker").val() 8402 let emailValid = gkt.gktGiftCard.f.emailValidation(gkGifttCardEmailValue); 8403 let isFormValid = gkt.gktGiftCard.f.validateForm(); 8404 let dateValid = gkt.gktGiftCard.f.dateValidation(gkGifttCardDateValue); 8405 if (isFormValid && emailValid && dateValid) { 8406 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 8407 return true; 8408 } else if (!emailValid) { 8409 //TODO 8410 gkt.$(".gktGiftCardEmailValidation").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.emailValidationError)); 8411 return; 8412 }
8412else if (!dateValid){ 8413 gkt.$(".gktGiftCardDateValidation").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.dateValidationError)); 8414 return; 8415 } 8416 else { 8417 return; 8418 } 8419 8420 }, 8421 }, 8422 action: { 8423 giftCardAddToCartButton: async function (e) { 8424 e.preventDefault(); 8425 e.stopPropagation(); 8426 8427 gkt.gktGiftCard.f.openGiftCardModal() 8428 8429 console.log("giftCardAddToCartButton-clicked") 8430 }, 8431 onModalClose: function (e) { 8432 // hide the modal 8433 gkt.$(".gktGiftCardModalWrapper").hide(); 8434 }, 8435 onModalBack:function(e){ 8436 gkt.gktGiftCard.action.showGreetingCardBody() 8437 gkt.gktGiftCard.action.hideGiftCardDetailsBody() 8438 }, 8439 removeCheckmarkDivsFromSiblings: function(element){ 8440 element.siblings().find(".gkt_checkmark").remove() 8441 element.siblings().removeClass("activeGreetingCard") 8442 }, 8443 addCheckMarkDivs: function (element) { 8444 let checkMarkDiv = gkt.$("<span>").addClass("gkt_checkmark") 8445 checkMarkDiv.append(gkt.$("<div>").addClass("gkt_checkmark_circle")) 8446 checkMarkDiv.append(gkt.$("<div>").addClass("gkt_checkmark_stem")) 8447 checkMarkDiv.append(gkt.$("<div>").addClass("gkt_checkmark_kick")) 8448 element.append(checkMarkDiv) 8449 }, 8450 onGreetingCardImageClick : function(image){ 8451 // Pass either the image or just trigger this as a callback on Onclick 8452 let imageSrc; 8453 if (false) { 8454 imageSrc = image 8455 8456 } else { 8457 imageSrc = gkt.$(this).find("img").attr("src") 8458 } 8459 console.log("onclick triggered") 8460 // gkt.$('.greetingCardImagePreview').attr("src", imageSrc) 8461 gkt.gktGiftCard.state.greetingCardActiveImageSrc = imageSrc 8462 8463 gkt.$(this).find("input").prop("checked", true) 8464 gkt.$(this).addClass("activeGreetingCard") 8465 // add an icon on top of it 8466 gkt.gktGiftCard.action.addCheckMarkDivs(gkt.$(this)) 8467 gkt.gktGiftCard.action.removeCheckmarkDivsFromSiblings(gkt.$(this)) 8468 8469 }, 8470 onGreetingCardCategoryClick : function(){ 8471 // empty the active state greeting card 8472 console.log("onGreetingCardCategoryClick"); 8473 gkt.$(this).addClass("activeGreetingCardCategory") 8474 // remove activeCategory class from other categories 8475 gkt.$(this).siblings().removeClass("activeGreetingCardCategory") 8476 gkt.gktGiftCard.f.changeGreetingCardImageList(gkt.gktGiftCard.state.greetingCardSelectedCategory); 8477 }, 8478 onSendSelfClick : function(){ 8479 // todo 8480 let isSendToSelfChecked =gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8481 if(!isSendToSelfChecked){ 8482 gkt.$(".gktGiftCardInputSenderName").show(); 8483 gkt.$(".gktGiftCardInputReceiverName").show(); 8484 //find id GIFT_MESSAGE if not found then push 8485 if (gkt.gktGiftCard.state.modalNavList.indexOf("GIFT_MESSAGE") == -1) { 8486 gkt.gktGiftCard.state.modalNavList.push({id:"GIFT_MESSAGE",name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.giftcardMessageNavItem),visited:false,active:false}) 8487 } 8488 } 8489 else{ 8490 gkt.$(".gktGiftCardInputSenderName").hide(); 8491 gkt.$(".gktGiftCardInputReceiverName").hide();
8492 gkt.gktGiftCard.state.modalNavList.find(function(element){ 8493 if(element.id == "GIFT_MESSAGE"){ 8494 gkt.gktGiftCard.state.modalNavList.splice(gkt.gktGiftCard.state.modalNavList.indexOf(element),1) 8495 } 8496 }) 8497 } 8498 //remove array element assoicated with the id = GIFT_MESSAGE in gkt.gktgiftCard.state.modalNavList 8499 8500 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8501 }, 8502 onMessageSubmit: async function (e) { 8503 e.preventDefault(); 8504 e.stopPropagation(); 8505 let greetingCardSelected = undefined; 8506 let categorySelected = ""; 8507 if(gkt.settings.greetingCards.isGreetingCardEnabled){ 8508 greetingCardSelected = gkt.gktGiftCard.state.greetingCardActiveImageSrc; 8509 categorySelected = gkt.gktGiftCard.state.greetingCardSelectedCategory; 8510 } 8511 // TODO: Do we need a validation for the form on the final page aswell? 8512 let selectedVariantId = gkt.f.getSelectedVariant() 8513 let quantity = gkt.f.getProductQuantity() 8514 let gkGifttCardFromValue = gkt.$(".gktGiftCardFromInputField").val() 8515 let gkGifttCardToValue = gkt.$(".gktGiftCardToInputField").val() 8516 let gkGifttCardMessageValue = gkt.$(".gktGiftCardMessageInputField").val() 8517 let gkGifttCardEmailValue = gkt.$(".gktGiftCardEmailInputField").val() 8518 // if sendNow then set date to today 8519 let gkGifttCardDateValue = gkt.$(".gktGiftCardDatePicker").val() 8520 // check if deliveryOption is set to sendNow, if yes then reassign date to today 8521 if (gkt.gktGiftCard.state.giftCardDeliveryOption == "sendNow") { 8522 gkGifttCardDateValue = new Date().toISOString().slice(0, 10); 8523 } 8524 8525 const isSendToSelfChecked = gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8526 8527 if(isSendToSelfChecked){ 8528 gkGifttCardFromValue = null; 8529 gkGifttCardToValue = null; 8530 } 8531 if(gkt.$(".gktVideoMsgCheckboxField").is(":checked")!=true && gkt.$(".gktVideoMsgCheckboxField_Mobile").is(":checked")!=true){ 8532 gkt.gktVideoMsg.state.uploadedVideoId = null; 8533 } 8534 //redirectUrlForSendGiftcardBtn includes cart keyword 8535 if(gkt.settings.app.redirectUrlForSendGiftcardBtn.includes("checkout")){ 8536 let clearCart = await gkt.utility.clearCart() 8537 } 8538 8539 let resAddToCart = await gkt.utility.addToCartV2({ 8540 "items": [ 8541 { 8542 "id": selectedVariantId, 8543 "quantity": quantity ? quantity : 1, 8544 "properties": { 8545 "To": gkGifttCardToValue, 8546 "From": gkGifttCardFromValue, 8547 "Note": gkGifttCardMessageValue, 8548 "Recipient Email": gkGifttCardEmailValue, 8549 "Delivery Date": gkGifttCardDateValue, 8550 "_Greeting Card Image": greetingCardSelected, 8551 "Greeting Card Selected": greetingCardSelected? "yes" : null, 8552 "Video Recorded" : gkt.gktVideoMsg.state.uploadedVideoId ? "yes": null, 8553 "_Video Id": gkt.gktVideoMsg.state.uploadedVideoId, 8554 "_Send To Myself": isSendToSelfChecked 8555 8556 } 8557 } 8558 ], 8559 }) 8560 8561 8562 8563 window.location.href = gkt.settings.app.redirectUrlForSendGiftcardBtn 8564 8565 console.log("onMessageSubmit-clicked") 8566 }, 8567 onGreetingCardSubmit: async function (e){ 8568 e.preventDefault(); 8569 e.stopPropagation(); 8570 let greetingCardSelected = gkt.gktGiftCard.state.greetingCardActiveImageSrc; 8571 let categorySelected = gkt.gktGiftCard.state.greetingCardSelectedCategory; 8572
8573 gkt.gktGiftCard.f.displayGiftCardDetailsForm(); 8574 }, 8575 onDetailsSubmit: async function (e){ 8576 e.preventDefault(); 8577 console.log("onDetailsSubmit-clicked") 8578 let formValid = gkt.gktGiftCard.f.performFormValidation(); 8579 let isSendToSelfChecked = gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8580 8581 if(formValid){ 8582 if(isSendToSelfChecked){ 8583 gkt.gktGiftCard.action.onMessageSubmit(e); 8584 return; 8585 } 8586 gkt.gktGiftCard.f.displayMessageForm(); 8587 } 8588 else return; 8589 }, 8590 hideGreetingCardBody: function () { 8591 gkt.$(".gktGiftCardGreetingCardContent").hide(); 8592 8593 }, 8594 showGreetingCardBody: function () { 8595 gkt.$(".gktGiftCardGreetingCardContent").show(); 8596 }, 8597 showGiftCardDetailsBody: function () { 8598 gkt.$(".gktGiftCardDetailsContent").show(); 8599 }, 8600 hideGiftCardDetailsBody: function () { 8601 gkt.$(".gktGiftCardDetailsContent").hide(); 8602 }, 8603 hideGiftCardMessageBody: function () { 8604 gkt.$(".gktGiftCardMessageContent").hide(); 8605 }, 8606 showGiftCardMessageBody: function () { 8607 gkt.$(".gktGiftCardMessageContent").show(); 8608 }, 8609 }, 8610 }, 8611 gktAccountWidget: { 8612 state: { 8613 isLoading: null, 8614 }, 8615 init: function (settings, parent) { 8616 if(shopifyLiquidValues && shopifyLiquidValues.customer && shopifyLiquidValues.customer.id){ 8617 gkt.gktAccountWidget.initialize(settings, parent) 8618 } 8619 }, 8620 initialize: function (settings, parent) { 8621 let {isEnabledOnCartPage} = gkt.gktAccountWidget.f.checkifAccountWidgetEnabled() 8622 if (parent == "CART_PAGE" && isEnabledOnCartPage){ 8623 let accountWidgetCartPageHTML = gkt.gktAccountWidget.f.prepareUI() 8624 gkt.gktAccountWidget.f.insertIntoCartPageWrapper(settings, accountWidgetCartPageHTML) 8625 } 8626 gkt.utility.dynamicStylesForBranding(); 8627 }, 8628 f: { 8629 checkifAccountWidgetEnabled: function () { 8630 8631 let isEnabledOnCartPage = false; 8632 //isEnabledOnCartPage is the only one that matters 8633 if (gkt.settings.accountWidget.isEnabled){ 8634 isEnabledOnCartPage = true 8635 } 8636 return {isEnabledOnCartPage} 8637 8638 }, 8639 prepareWidgetModal: function () { 8640 8641 let modalWrapper; 8642 if(gkt.$(".gktAccountWidgetModal").length == 0){ 8643 modalWrapper = gkt.$("<div>").addClass("gktAccountWidgetModal") 8644 } else{ 8645 modalWrapper = gkt.$(".gktAccountWidgetModal") 8646 modalWrapper.html(" "); 8647 } 8648 8649 let modalContent = gkt.$("<div>").addClass("gktAccountWidgetModalContent") 8650 8651 let closeButtonSvg = '<svg width="16px" height="16px" enable-background="new 0 0 587.91 587.91" version="1.1" viewBox="0 0 587.91 587.91" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m86.451 501.46c26.937 26.936 58.315 48.088 93.265 62.871 36.207 15.314 74.642 23.078 114.24 23.078 39.596 0 78.032-7.764 114.24-23.078 34.949-14.783 66.328-35.936 93.266-62.871 26.936-26.938 48.09-58.316 62.871-93.266 15.314-36.207 23.08-74.643 23.08-114.24 0-39.598-7.766-78.033-23.08-114.24-14.781-34.95-35.936-66.328-62.871-93.265-26.938-26.937-58.316-48.09-93.266-62.872-36.208-15.315-74.643-23.079-114.24-23.079-39.597 0-78.032 7.765-114.24 23.079-34.95 14.782-66.328 35.936-93.265 62.872s-48.09 58.315-62.873 93.264c-15.313 36.207-23.078 74.642-23.078
8651114.24 0 39.596 7.765 78.031 23.079 114.24 14.782 34.95 35.936 66.328 62.872 93.266zm207.5-458.12c138.41 0 250.61 112.2 250.61 250.62 0 138.41-112.2 250.61-250.61 250.61s-250.62-112.2-250.62-250.61c0-138.41 112.2-250.62 250.62-250.62z"/><path d="m293.96 587.91c-39.667 0-78.167-7.778-114.43-23.117-35.01-14.809-66.442-35.998-93.423-62.979-26.983-26.984-48.172-58.417-62.979-93.425-15.341-36.269-23.119-74.77-23.119-114.43 0-39.663 7.778-78.165 23.118-114.44 14.807-35.008 35.997-66.44 62.979-93.423s58.415-48.172 93.423-62.979c36.27-15.34 74.771-23.118 114.43-23.118 39.666 0 78.167 7.778 114.43 23.119 35.009 14.807 66.441 35.997 93.425 62.979 26.984 26.985 48.173 58.417 62.979 93.423 15.341 36.27 23.119 74.771 23.119 114.43 0 39.662-7.778 78.163-23.119 114.43-14.806 35.007-35.994 66.439-62.979 93.425-26.982 26.98-58.415 48.169-93.425 62.979-36.266 15.338-74.767 23.116-114.43 23.116zm0-586.91c-39.529 0-77.898 7.751-114.04 23.039-34.889 14.757-66.215 35.874-93.106 62.765-26.892 26.892-48.009 58.217-62.766 93.105-15.288 36.147-23.039 74.517-23.039 114.05 0 39.527 7.751 77.898 23.039 114.04 14.757 34.889 35.874 66.214 62.766 93.106 26.89 26.889 58.215 48.006 93.106 62.765 36.142 15.287 74.512 23.038 114.04 23.038s77.901-7.751 114.04-23.039c34.89-14.758 66.216-35.875 93.106-62.764 26.893-26.895 48.009-58.22 62.764-93.106 15.289-36.146 23.041-74.516 23.041-114.04 0-39.529-7.752-77.899-23.041-114.04-14.754-34.887-35.871-66.212-62.764-93.106-26.892-26.891-58.218-48.008-93.106-62.765-36.144-15.289-74.514-23.04-114.04-23.04zm0 544.07c-67.075 0-130.14-26.12-177.56-73.549-47.429-47.43-73.55-110.49-73.55-177.56s26.12-130.14 73.55-177.56c47.429-47.429 110.49-73.55 177.56-73.55s130.14 26.121 177.56 73.55c47.43 47.43 73.55 110.49 73.55 177.56s-26.12 130.14-73.55 177.56c-47.429 47.429-110.49 73.549-177.56 73.549zm0-501.23c-66.808 0-129.62 26.017-176.86 73.257-47.24 47.241-73.257 110.05-73.257 176.86s26.017 129.62 73.257 176.86c47.24 47.24 110.05 73.257 176.86 73.257s129.62-26.017 176.86-73.257c47.24-47.239 73.257-110.05 73.257-176.86 0-66.808-26.017-129.62-73.257-176.86-47.241-47.241-110.05-73.257-176.86-73.257z"/><path d="m184.92 402.99c4.183 4.184 9.664 6.275 15.146 6.275s10.964-2.092 15.146-6.275l78.742-78.742 78.743 78.742c4.182 4.184 9.664 6.275 15.146 6.275s10.963-2.092 15.146-6.275c8.365-8.363 8.365-21.926 0-30.291l-78.744-78.742 78.742-78.743c8.365-8.365 8.365-21.928 0-30.292-8.363-8.365-21.926-8.365-30.291 0l-78.743 78.743-78.742-78.743c-8.365-8.365-21.928-8.365-30.292 0-8.365 8.365-8.365 21.927 0 30.292l78.743 78.743-78.743 78.742c-8.364 8.365-8.364 21.928 1e-3 30.291z"/><path d="m387.84 409.76c-5.856 0-11.36-2.28-15.5-6.422l-78.389-78.389-78.388 78.389c-4.14 4.142-9.645 6.422-15.5 6.422s-11.36-2.28-15.5-6.422c-4.14-4.14-6.42-9.644-6.42-15.498 0-5.855 2.28-11.359 6.42-15.5l78.389-78.389-78.389-78.389c-8.546-8.547-8.546-22.453 0-31 4.14-4.14 9.644-6.42 15.5-6.42 5.855 0 11.36 2.28 15.5 6.42l78.389 78.389 78.389-78.389c4.141-4.14 9.645-6.42 15.5-6.42 5.854 0 11.358 2.28 15.498 6.42 4.141 4.14 6.42 9.645 6.42 15.5s-2.279 11.36-6.42 15.5l-78.389 78.389 78.391 78.389c4.141 4.141 6.421 9.645 6.421 15.5 0 5.854-2.28 11.358-6.421 15.498-4.143 4.141-9.647 6.422-15.501 6.422zm-93.889-86.225 79.096 79.096c3.95 3.952 9.204 6.129 14.793 6.129 5.587 0 10.841-2.177 14.793-6.129 3.951-3.95 6.128-9.203 6.128-14.791s-2.177-10.842-6.128-14.793l-79.098-79.096 79.096-79.096c3.951-3.951 6.127-9.205 6.127-14.793s-2.176-10.841-6.127-14.792c-3.95-3.951-9.203-6.127-14.791-6.127s-10.842 2.176-14.793 6.127l-79.096 79.096-79.096-79.096c-3.951-3.951-9.205-6.127-14.793-6.127s-10.841 2.176-14.792 6.127c-8.156 8.157-8.156 21.428 0 29.585l79.096 79.096-79.096 79.096c-3.951 3.951-6.127 9.205-6.127 14.793s2.176 10.841 6.127 14.791c3.952 3.952 9.205 6.129 14.793 6.129s10.841-2.177 14.793-6.129l79.095-79.096z"/></svg>' 8652 let modalCloseBtn = gkt.$("<div>").addClass("gktAccountWidgetModalClose").append(closeButtonSvg) 8653 8654 8655 modalCloseBtn.on("click", gkt.gktAccountWidget.action.closeAccountWidgetModal) 8656 8657
8658 let gktAccountWidgetRewardDetailsHTML = gkt.gktAccountWidget.f.prepareRewardGiftCardDetails() 8659 8660 let gktAccountWidgetBuyWithRewardsButton = gkt.gktAccountWidget.f.prepareBuyWithRewardsButton() 8661 8662 let gktAccountWidgetBody = gkt.$("<div>").addClass("gktAccountWidgetBody") 8663 8664 // let gktAccountWidgetTabs = two tabs - rewards and gift cards 8665 8666 let gktAccountWidgetBodyTabs = gkt.$("<div>").addClass("gktAccountWidgetBodyTabs") 8667 8668 let gktAccountWidgetBodyTabRewards = gkt.$("<div>").addClass("gktAccountWidgetBodyTabRewards").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.rewardSection.rewardsTabText)) 8669 8670 let gktAccountWidgetBodyTabGiftCards = gkt.$("<div>").addClass("gktAccountWidgetBodyTabGiftCards").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.giftCardsTabText)) 8671 8672 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetBodyTabs); 8673 8674 8675 gktAccountWidgetBodyTabs.append(gktAccountWidgetBodyTabRewards) 8676 gktAccountWidgetBodyTabs.append(gktAccountWidgetBodyTabGiftCards) 8677 8678 //gktAccountWidgetBodyTabs write css, add event listeners 8679 8680 gktAccountWidgetBodyTabRewards.on("click", gkt.gktAccountWidget.action.showRewardSection); 8681 gktAccountWidgetBodyTabGiftCards.on("click", gkt.gktAccountWidget.action.showGiftCardSection); 8682 8683 8684 gktAccountWidgetBody.append(gktAccountWidgetBodyTabs) 8685 8686 let gktAccountWidgetRewardSection = gkt.gktAccountWidget.f.prepareRewardSection() 8687 let gktAccountWidgetGiftCardSection = gkt.gktAccountWidget.f.prepareGiftCardSection() 8688 8689 gktAccountWidgetBody.append(gktAccountWidgetRewardSection) 8690 gktAccountWidgetBody.append(gktAccountWidgetGiftCardSection) 8691 8692 // gktAccountWidgetBody.append(gktAccountWidgetGiftCardSection) 8693 // gktAccountWidgetRewardDetails.append(gktAccountWidgetBuyWithRewardsButton) 8694 modalContent.append(gktAccountWidgetRewardDetailsHTML) 8695 modalContent.append(gktAccountWidgetBuyWithRewardsButton) 8696 modalContent.append(gktAccountWidgetBody) 8697 modalWrapper.append(modalCloseBtn) 8698 modalWrapper.append(modalContent) 8699 modalWrapper.append(gkt.f.preparePoweredByBannerUI()) 8700 8701 return modalWrapper; 8702 }, 8703 fetchLoggedInUserAndUpdateUI: async function () { 8704 gkt.gktAccountWidget.state.isLoading = true; 8705 8706 //this is to show loading spinner 8707 gkt.gktAccountWidget.f.reRenderModalUI(); 8708 8709 await gkt.f.getLoggedInCustomer(); 8710 gkt.gktAccountWidget.state.isLoading = false; 8711 gkt.gktAccountWidget.f.reRenderModalUI(); 8712 }, 8713 prepareUI: function () { 8714 //a div which is has properties of a button and on click, it opens a modal 8715 let accountWidgetHTML = gkt.$("<div>"); 8716 let widgetActivator = gkt.$("<div>").addClass("gktAccountWidgetActivator"); 8717 gkt.gktAccountWidget.f.applyButtonCSS(widgetActivator); 8718 widgetActivator.text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.generalSettings.accountWidgetDisplayText) || "Account Widget") 8719 //css -> cursor: pointer 8720 widgetActivator.css("cursor", "pointer"); 8721 widgetActivator.on("click", gkt.gktAccountWidget.action.openAccountWidgetModal) 8722 8723 let widgetModalWrapper = gkt.$("<div>").addClass("gktAccountWidgetModalWrapper") 8724 widgetModalWrapper.append(gkt.gktAccountWidget.f.prepareWidgetModal()) 8725 8726 8727 accountWidgetHTML.append(widgetActivator) 8728 console.log("prepare ui called") 8729 gkt.$("body").append(widgetModalWrapper) 8730 8731 8732 return accountWidgetHTML; 8733 },
8734 prepareRewardGiftCardDetails: function () { 8735 let gktAccountWidgetRewardDetails; 8736 if(gkt.$(".gktAccountWidgetRewardDetails").length > 0) { 8737 gkt.$(".gktAccountWidgetRewardDetails").html(" ") 8738 gktAccountWidgetRewardDetails = gkt.$(".gktAccountWidgetRewardDetails") 8739 } else { 8740 gktAccountWidgetRewardDetails = gkt.$("<div>").addClass("gktAccountWidgetRewardDetails") 8741 } 8742 let generalSettingsLanguageData = gkt.settings.languageData.accountWidget.generalSettings; 8743 let gktAccountWidgetRewardBalance = gkt.$("<div>").addClass("gktAccountWidgetRewardBalance").html( gkt.utility.renderLanguageValue(generalSettingsLanguageData.rewardBalanceLabel)|| "Reward Balance 1") 8744 8745 gkt.gktAccountWidget.f.applyMainTextColorCSS(gktAccountWidgetRewardBalance) 8746 // now another span with value of the balance 8747 let gktAccountWidgetRewardBalanceValue = gkt.$("<span>").addClass("gktAccountWidgetRewardBalanceValue"); 8748 8749 let rewardBalanceValue = `--`; 8750 if(gkt.gktAccountWidget.state.isLoading == false){ 8751 if (gkt.settings.customer && gkt.settings.customer.rewardgiftcard && gkt.settings.customer.rewardgiftcard.balance) { 8752 rewardBalanceValue = `${gkt.settings.merchantInfo.currencyInfo.code} ${gkt.settings.customer.rewardgiftcard.balance}` 8753 }else { 8754 rewardBalanceValue = `${gkt.settings.merchantInfo.currencyInfo.code} 0` 8755 } 8756 } 8757 8758 8759 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetRewardBalanceValue) 8760 8761 gktAccountWidgetRewardBalanceValue.text(rewardBalanceValue) 8762 8763 gktAccountWidgetRewardBalance.append(gktAccountWidgetRewardBalanceValue) 8764 8765 let gktRewardCode = gkt.$("<div>").addClass("gktRewardCode").text( gkt.utility.renderLanguageValue(generalSettingsLanguageData.rewardCodeLabel) || "Reward Code 1") 8766 8767 let gktAccountWidgetRewardCodeValue = gkt.$("<span>").addClass("gktAccountWidgetRewardCodeValue"); 8768 8769 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetRewardCodeValue) 8770 8771 8772 let rewardCodeValue = "----"; 8773 8774 if(gkt.gktAccountWidget.state.isLoading == false && gkt.settings.customer && gkt.settings.customer.rewardgiftcard && gkt.settings.customer.rewardgiftcard.decryptCode){ 8775 rewardCodeValue = gkt.settings.customer.rewardgiftcard.decryptCode; 8776 } 8777 8778 gkt.gktAccountWidget.f.applyMainTextColorCSS(gktRewardCode) 8779 8780 gktAccountWidgetRewardCodeValue.text(rewardCodeValue) 8781 8782 gktRewardCode.append(gktAccountWidgetRewardCodeValue) 8783 8784 8785 // let gktAccountWidgetRewardCodeCopyBtn = gkt.$("<div>").addClass("gktAccountWidgetRewardCodeCopyBtn").html("Copy") 8786 // gktAccountWidgetRewardCodeCopyBtn.on("click", gkt.gktAccountWidget.action.copyRewardCode) 8787 // gktRewardCode.append(gktAccountWidgetRewardCodeCopyBtn) 8788 8789 8790 gktAccountWidgetRewardDetails.append(gktAccountWidgetRewardBalance) 8791 gktAccountWidgetRewardDetails.append(gktRewardCode) 8792 return gktAccountWidgetRewardDetails; 8793 }, 8794 prepareRewardSection: function () { 8795 8796 let gktAccountWidgetRewardSection; 8797 if(gkt.$(".gktAccountWidgetRewardSection").length > 0){ 8798 gktAccountWidgetRewardSection = gkt.$(".gktAccountWidgetRewardSection"); 8799 gkt.$(".gktAccountWidgetRewardSection").html(" ") 8800 }else{ 8801 gktAccountWidgetRewardSection = gkt.$("<div>").addClass("gktAccountWidgetRewardSection") 8802 } 8803 8804 let gktAccountWidgetRewardSectionBody = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBody") 8805 8806 let rewardSectionLanguageData = gkt.settings.languageData.accountWidget.rewardSection; 8807 8808 let gktAccountWidgetRewardSectionBodyListHTML = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyList") 8809 8810 if(gkt.gktAccountWidget.state.isLoading == false ){ 8811 let rewardTransactions = gkt.settings.customer ? gkt.settings.customer.rewardgiftcardTransaction : []; 8812 8813 let gktAccountWidgetRewardSectionBodyListHeader = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListHeader") 8814 8815 let gktAccountWidgetHeaderForCode = gkt.$("<div>").addClass("gktAccountWidgetHeaderForCode").text(gkt.utility.renderLanguageValue(rewardSectionLanguageData.balanceHeaderLabel) || "Balance" ) 8816 let gktAccountWidgetHeaderForExpirationDate = gkt.$("<div>").addClass("gktAccountWidgetHeaderForExpirationDate").text(gkt.utility.renderLanguageValue(rewardSectionLanguageData.expirationDateLabel)|| "Exp. Date1" ) 8817 let gktAccountWidgetHeaderForRemarks = gkt.$("<div>").addClass("gktAccountWidgetHeaderForRemarks").text(gkt.utility.renderLanguageValue(rewardSectionLanguageData.remarksLabel) || "Remarks 1") 8818 8819 gktAccountWidgetRewardSectionBodyListHeader.append(gktAccountWidgetHeaderForCode) 8820 gktAccountWidgetRewardSectionBodyListHeader.append(gktAccountWidgetHeaderForExpirationDate) 8821 gktAccountWidgetRewardSectionBodyListHeader.append(gktAccountWidgetHeaderForRemarks) 8822 8823 8824 gktAccountWidgetRewardSectionBodyListHTML.append(gktAccountWidgetRewardSectionBodyListHeader) 8825 8826 8827 8828 if(rewardTransactions.length > 0){ 8829 rewardTransactions.forEach(function (rewardTransaction) { 8830 let expiryDateFormatted = ' - '; 8831 if(rewardTransaction.expiryDate){ 8832 expiryDateFormatted = rewardTransaction.expiryDate && rewardTransaction.expiryDate.length > 10 ? rewardTransaction.expiryDate.substring(0,10) : rewardTransaction.expiryDate; 8833 } 8834 let minusSymbol = rewardTransaction.action == "Remove" ? " -" : " "; 8835 let balanceFormatted = rewardTransaction.currency + minusSymbol + parseFloat(rewardTransaction.amount).toFixed(2); 8836 let gktAccountWidgetRewardSectionBodyListItem = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItem") 8837 let balanceFieldDiv = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItemBalance").html(balanceFormatted) 8838 if(rewardTransaction.action == "Remove"){ 8839 balanceFieldDiv.addClass("gktAccountWidgetRewardSectionBodyListItemBalanceRemove") 8840 expiryDateFormatted = " - " 8841 } 8842 gktAccountWidgetRewardSectionBodyListItem.append(balanceFieldDiv) 8843 gktAccountWidgetRewardSectionBodyListItem.append(gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItemExpirationDate").html(expiryDateFormatted || "-")) 8844 gktAccountWidgetRewardSectionBodyListItem.append(gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItemRemarks").html(rewardTransaction.note).text()) 8845 gktAccountWidgetRewardSectionBodyListHTML.append(gktAccountWidgetRewardSectionBodyListItem)
8846 gkt.gktAccountWidget.f.applyMainTextColorCSS(gktAccountWidgetRewardSectionBodyListItem); 8847 }) 8848 8849 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetRewardSectionBodyListHeader); 8850 }else{ 8851 //handle empty state 8852 let noRewardFound = gkt.gktAccountWidget.f.prepareEmptyStateForRewardSection(); 8853 gktAccountWidgetRewardSectionBodyListHTML.html(noRewardFound) 8854 } 8855 gktAccountWidgetRewardSectionBody.append(gktAccountWidgetRewardSectionBodyListHTML) 8856 }else{ 8857 gktAccountWidgetRewardSectionBody.html(gkt.utility.displayLoadingSpinner()) 8858 } 8859 8860 gktAccountWidgetRewardSection.append(gktAccountWidgetRewardSectionBody) 8861 8862 return gktAccountWidgetRewardSection 8863 8864 }, 8865 prepareGiftCardSection: function () { 8866 let gktAccountWidgetGiftCardSection; 8867 8868 if(gkt.$(".gktAccountWidgetGiftCardSection").length > 0){ 8869 gktAccountWidgetGiftCardSection = gkt.$(".gktAccountWidgetGiftCardSection"); 8870 gkt.$(".gktAccountWidgetGiftCardSection").html(" ") 8871 }else{ 8872 gktAccountWidgetGiftCardSection = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSection") 8873 } 8874 8875 let giftcardSectionLanguageData = gkt.settings.languageData.accountWidget.giftcardSection; 8876 8877 let gktAccountWidgetGiftCardSectionBodyListHTML = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyList") 8878 if(gkt.gktAccountWidget.state.isLoading == false){ 8879 const customerGiftCards = gkt.settings.customer.giftcards; 8880 8881 if(customerGiftCards.length > 0){ 8882 8883 gkt.gktAccountWidget.state.activeTabFn = gkt.gktAccountWidget.action.showGiftCardSection; 8884 let gktAccountWidgetGiftCardSectionListHeader = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeader") 8885 8886 let gktAccountWidgetGiftCardSectionListHeaderForCode = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForCode").html(gkt.utility.renderLanguageValue(giftcardSectionLanguageData.codeHeaderLabel)||"Code1" ) 8887 8888 let gktAccountWidgetGiftCardSectionListHeaderForBalance = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForBalance").html( gkt.utility.renderLanguageValue(giftcardSectionLanguageData.balanceHeaderLabel) || "Balance1") 8889 8890 let gktAccountWidgetGiftCardSectionListHeaderForExpirationDate = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForExpirationDate").html(gkt.utility.renderLanguageValue(giftcardSectionLanguageData.expirationDateLabel)|| "Exp. Date1") 8891 8892 let gktAccountWidgetGiftCardSectionListHeaderForAction = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForAction").html( gkt.utility.renderLanguageValue(giftcardSectionLanguageData.actionHeaderLabel)|| "Action1") 8893 8894 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForCode) 8895 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForBalance) 8896 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForExpirationDate) 8897 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForAction) 8898 8899 gktAccountWidgetGiftCardSectionBodyListHTML.append(gktAccountWidgetGiftCardSectionListHeader) 8900 8901 customerGiftCards.forEach(function (customerGiftCard) { 8902 let gktAccountWidgetGiftCardSectionBodyListItem = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItem") 8903 let gktAccountWidgetGiftCardSectionBodyListItemForCode = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForCode").html("**" + customerGiftCard.code) 8904 let gktAccountWidgetGiftCardSectionBodyListItemForBalance = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForBalance").html(`${gkt.settings.merchantInfo.currencyInfo.code} ${customerGiftCard.balance}`) 8905 let gktAccountWidgetGiftCardSectionBodyListItemForExpirationDate = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForExpirationDate").html(customerGiftCard.expiresOn || "-" ) 8906 let gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount"); 8907 8908 8909 8910 if(customerGiftCard.gktGiftcardId){ 8911 let addToAccountButton = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForAddToAccountButton").html( gkt.utility.renderLanguageValue(giftcardSectionLanguageData.addToAccountButtonText)|| "Add To Account1"); 8912 //attach data attribute to the button 8913 gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount.append(addToAccountButton) 8914 gkt.gktAccountWidget.f.applyButtonCSS(addToAccountButton); 8915 8916 gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount.attr("data-giftcard-id", customerGiftCard.gktGiftcardId); 8917 gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount.on("click", gkt.gktAccountWidget.action.addGiftCardToRewardCode) 8918 } 8919 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForCode) 8920 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForBalance) 8921 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForExpirationDate) 8922 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount) 8923 gktAccountWidgetGiftCardSectionBodyListHTML.append(gktAccountWidgetGiftCardSectionBodyListItem) 8924 }) 8925 8926 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetGiftCardSectionListHeader); 8927 gktAccountWidgetGiftCardSection.append(gktAccountWidgetGiftCardSectionBodyListHTML) 8928 8929 }else{ 8930 //empty state data 8931 let noGiftcardFoundHTML = gkt.gktAccountWidget.f.prepareEmptyStateForGiftCardSection(); 8932 gktAccountWidgetGiftCardSectionBodyListHTML.html(noGiftcardFoundHTML) 8933 } 8934 gktAccountWidgetGiftCardSection.append(gktAccountWidgetGiftCardSectionBodyListHTML) 8935 }else{ 8936 gktAccountWidgetGiftCardSection.html(gkt.utility.displayLoadingSpinner()) 8937 } 8938 8939 return gktAccountWidgetGiftCardSection; 8940 8941 }, 8942 prepareEmptyStateForGiftCardSection: function () { 8943 let giftcardSectionLanguageData = gkt.settings.languageData.accountWidget.giftcardSection; 8944 let noGiftcardFoundHTML = gkt.$("<div>").addClass("gktAccountWidgetNoGiftCardDataFound") 8945 let noDataFoundMainText = giftcardSectionLanguageData.noGiftcardFoundMainText.value || "No Gift Cards Found1"; 8946 let noDataFoundSubText = giftcardSectionLanguageData.noGiftcardFoundSubText.value || " "; 8947 8948 let noGiftcardFoundMainTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoGiftCardDataFoundMainText").html(noDataFoundMainText) 8949 let noGiftcardFoundSubTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoGiftCardDataFoundSubText").html(noDataFoundSubText) 8950
8951 gkt.gktAccountWidget.f.applyMainTextColorCSS(noGiftcardFoundMainTextHTML); 8952 gkt.gktAccountWidget.f.applySubTextColorCSS(noGiftcardFoundSubTextHTML); 8953 noGiftcardFoundHTML.append(noGiftcardFoundMainTextHTML).append("<br/>").append(noGiftcardFoundSubTextHTML); 8954 return noGiftcardFoundHTML; 8955 }, 8956 prepareEmptyStateForRewardSection: function () { 8957 let rewardSectionLanguageData = gkt.settings.languageData.accountWidget.rewardSection; 8958 let noRewardsFound = gkt.$("<div>").addClass("gktAccountWidgetNoRewardDataFound") 8959 let noDataFoundMainText = rewardSectionLanguageData.noRewardFoundMainText.value || "No Rewards Found1"; 8960 let noDataFoundSubText = rewardSectionLanguageData.noRewardFoundSubText.value || " "; 8961 8962 let noRewardFoundMainTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoRewardDataFoundMainText").html(noDataFoundMainText) 8963 let noRewardFoundSubTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoRewardDataFoundSubText").html(noDataFoundSubText) 8964 8965 gkt.gktAccountWidget.f.applyMainTextColorCSS(noRewardFoundMainTextHTML); 8966 gkt.gktAccountWidget.f.applySubTextColorCSS(noRewardFoundSubTextHTML); 8967 noRewardsFound.append(noRewardFoundMainTextHTML).append("<br/>").append(noRewardFoundSubTextHTML); 8968 return noRewardsFound; 8969 }, 8970 insertIntoCartPageWrapper: function (settings, accountWidgetCartPageHTML) { 8971 gkt.elements.cartPageWrapperV2.find(".gktAccountWidgetWrapper").html(accountWidgetCartPageHTML) 8972 }, 8973 refreshRewardSection_and_RewardDetails: function () { 8974 gkt.gktAccountWidget.f.prepareRewardSection() 8975 gkt.gktAccountWidget.f.prepareRewardGiftCardDetails(); 8976 gkt.gktAccountWidget.f.prepareBuyWithRewardsButton(); 8977 }, 8978 applyMainTextColorCSS: function (element) { 8979 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.mainTextColor){ 8980 let mainTextColor = gkt.settings.accountWidget.customization.mainTextColor; 8981 element.css("color", mainTextColor) 8982 } 8983 }, 8984 applySubTextColorCSS: function (element) { 8985 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.subTextColor){ 8986 let subTextColor = gkt.settings.accountWidget.customization.subTextColor; 8987 element.css("color", subTextColor) 8988 } 8989 }, 8990 applyButtonCSS: function (element) { 8991 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.buttonColor){ 8992 let buttonColor = gkt.settings.accountWidget.customization.buttonColor; 8993 element.css("background-color", buttonColor) 8994 } 8995 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.buttonTextColor){ 8996 let buttonTextColor = gkt.settings.accountWidget.customization.buttonTextColor; 8997 element.css("color", buttonTextColor) 8998 } 8999 }, 9000 reRenderModalUI: function () { 9001 gkt.gktAccountWidget.f.prepareWidgetModal(); 9002 if(gkt.gktAccountWidget.state.activeTabFn){ 9003 gkt.gktAccountWidget.state.activeTabFn(); 9004 } 9005 }, 9006 prepareBuyWithRewardsButton: function () { 9007 9008 let generalSettingsLanguageData = gkt.settings.languageData.accountWidget.generalSettings; 9009 let gktAccountWidgetBuyWithRewardsButton; 9010 if(gkt.$(".gktAccountWidgetBuyWithRewardsButton").length > 0){ 9011 gktAccountWidgetBuyWithRewardsButton = gkt.$(".gktAccountWidgetBuyWithRewardsButton"); 9012 gktAccountWidgetBuyWithRewardsButton.html(""); 9013 }else{ 9014 gktAccountWidgetBuyWithRewardsButton = gkt.$("<div>").addClass("gktAccountWidgetBuyWithRewardsButton") 9015 } 9016 9017 gktAccountWidgetBuyWithRewardsButton.text(gkt.utility.renderLanguageValue(generalSettingsLanguageData.buyWithRewardsButtonText || "Buy with Rewards")) 9018 9019 if(gkt.settings.customer && gkt.settings.customer.rewardgiftcard && gkt.settings.customer.rewardgiftcard.balance > 0 && gkt.settings.customer.rewardgiftcard.decryptCode) { 9020 gktAccountWidgetBuyWithRewardsButton.on("click", gkt.gktAccountWidget.action.buyWithRewardsClicked); 9021 gktAccountWidgetBuyWithRewardsButton.removeClass("gktDisabled"); 9022 }else{ 9023 gktAccountWidgetBuyWithRewardsButton.addClass("gktDisabled"); 9024 } 9025 9026 gkt.gktAccountWidget.f.applyButtonCSS(gktAccountWidgetBuyWithRewardsButton); 9027 return gktAccountWidgetBuyWithRewardsButton; 9028 }, 9029 9030 }, 9031 action: { 9032 openAccountWidgetModal: function () { 9033 gkt.gktAccountWidget.state.isLoading = true; 9034 gkt.gktAccountWidget.f.fetchLoggedInUserAndUpdateUI(); 9035 // gkt.elements.cartPageWrapperV2.find(".gktAccountWidgetModalWrapper").css("display", "grid"); 9036 gkt.$(".gktAccountWidgetModalWrapper").css("display", "grid"); 9037 gkt.gktAccountWidget.action.showRewardSection(); 9038 }, 9039 closeAccountWidgetModal: function () { 9040 // gkt.elements.cartPageWrapperV2.find(".gktAccountWidgetModalWrapper").css("display", "none") 9041 gkt.$(".gktAccountWidgetModalWrapper").css("display", "none") 9042 }, 9043 copyRewardCode: function () { 9044 let rewardCode = gkt.$(this).parent().find(".gktRewardCode").html() 9045 //use native javascript to copy to clipboard 9046 let rewardCodeInput = gkt.$("<input>").val(rewardCode) 9047 gkt.$("body").append(rewardCodeInput) 9048 rewardCodeInput.select() 9049 document.execCommand("copy") 9050 rewardCodeInput.remove() 9051 gkt.$(this).html("Copied") 9052 }, 9053 showRewardSection: function () { 9054 console.log("showRewardsTab"); 9055 gkt.$(".gktAccountWidgetRewardSection").css("display", "grid") 9056 //hide other sections 9057 gkt.$(".gktAccountWidgetGiftCardSection").css("display", "none") 9058 gkt.$(".gktAccountWidgetBodyTabRewards").siblings().removeClass("gktAccountWidgetBodyTabActive") 9059 gkt.$(".gktAccountWidgetBodyTabRewards").addClass("gktAccountWidgetBodyTabActive") 9060 gkt.gktAccountWidget.state.activeTabFn = gkt.gktAccountWidget.action.showRewardSection; 9061 }, 9062 showGiftCardSection: function () { 9063 console.log("showGiftCardsTab") 9064 gkt.$(".gktAccountWidgetGiftCardSection").css("display", "grid"); 9065 //hide other sections 9066 gkt.$(".gktAccountWidgetRewardSection").css("display", "none") 9067 // remove gktAccountWidgetBodyTabActive from other siblings 9068 gkt.$(".gktAccountWidgetBodyTabGiftCards").siblings().removeClass("gktAccountWidgetBodyTabActive") 9069 gkt.$(".gktAccountWidgetBodyTabGiftCards").addClass("gktAccountWidgetBodyTabActive") 9070 gkt.gktAccountWidget.state.activeTabFn = gkt.gktAccountWidget.action.showGiftCardSection; 9071 9072 }, 9073 addGiftCardToRewardCode: async function () { 9074 //read the giftcardID from the button data attribute 9075 //read the attribute data-giftcard-id from the button or its parent 9076 let giftCardId = gkt.$(this).attr("data-giftcard-id") || gkt.$(this).parent().attr("data-giftcard-id"); 9077 //get the reward code 9078 console.log("giftCardId", giftCardId); 9079 9080 //when this button is clicked, we need to change this buttons text to loading... using renderLanguageValue 9081 // and also disable this button for clicks 9082 // by attaching gktDisabled class 9083 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.addingCodeToRewardsText) || "adding...1") 9084 gkt.$(this).addClass("gktDisabled") 9085 9086 //attachh the class to all other buttons in the list 9087 gkt.$(this).parent().siblings().addClass("gktDisabled") 9088 9089 const addToReward = await gkt.f.addGiftCardToRewardCodeAPI(giftCardId) 9090 9091 9092 if(addToReward){ 9093 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.addedCodeToRewardText) || "Added1"); 9094 gkt.$(this).off("click") 9095 //add opacity to the button of 0.6 9096 gkt.$(this).css("opacity", "0.5") 9097 gkt.$(this).children().css("border-radius", "2px") 9098 gkt.gktAccountWidget.f.refreshRewardSection_and_RewardDetail
9098s() 9099 }else{ 9100 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.generalSettings.errorMessage) || "Error occured! Try again"); 9101 await new Promise(resolve => setTimeout(resolve, 1500)); 9102 9103 gkt.$(this).on("click", gkt.gktAccountWidget.action.addGiftCardToRewardCode) 9104 // setTimeout(function(){ 9105 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.addToAccountButtonText) || "Add To Account1"); 9106 // }, 100) 9107 } 9108 9109 gkt.$(this).removeClass("gktDisabled") 9110 gkt.$(this).parent().siblings().removeClass("gktDisabled") 9111 9112 9113 9114 }, 9115 buyWithRewardsClicked: async function () { 9116 try{ 9117 gkt.$(this).addClass("gktDisabled") 9118 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.generalSettings.buyWithRewardsButtonLoadingText) || "Loading Checkout...1") 9119 window.location.href = window.location.origin + "/cart/checkout?discount=" + gkt.settings.customer.rewardgiftcard.decryptCode 9120 }catch(e){ 9121 console.log("error", e) 9122 gkt.$(this).removeClass("gktDisabled") 9123 } 9124 }, 9125 9126 }, 9127 }, 9128 gktMessage:{ 9129 init: function (settings, parent) { 9130 gkt.gktMessage.initialize(settings, parent) 9131 }, 9132 initialize: function (settings, parent) { 9133 let productHandle = gkt.f.getProductPageHandle(settings) 9134 let {isEnabledOnProductPage, isEnabledOnCartPage} = gkt.gktMessage.f.checkifGiftMessageEnabled(settings.giftMessage, productHandle, parent) 9135 9136 if (parent == "PRODUCT_PAGE" && isEnabledOnProductPage){ 9137 // let oneClickUpsellProductPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnProductPage, parent) 9138 let giftMessageProductPageHTML = gkt.gktMessage.f.prepareUI(settings, productHandle, parent) 9139 gkt.gktMessage.f.insertIntoProductPageWrapper(settings, giftMessageProductPageHTML) 9140 gkt.utility.overWriteBuyNowBtn() 9141 gkt.state.isOverWriteBuyNowBtnTriggered = true 9142 } 9143 9144 if (parent == "CART_PAGE" && isEnabledOnCartPage && productHandle == "undefined"){ 9145 let giftMessageCartPageHTML = gkt.gktMessage.f.prepareUI(settings, productHandle, parent) 9146 gkt.gktMessage.f.insertIntoCartPageWrapper(settings, giftMessageCartPageHTML) 9147 } 9148 9149 9150 }, 9151 f: { 9152 checkifGiftMessageEnabled: function (giftMessage, currProductHandle, parent) { 9153 let isEnabledOnProductPage = false 9154 let isEnabledOnCartPage = false 9155 9156 if(!giftMessage.isGiftMessageEnabled){ 9157 return {isEnabledOnProductPage, isEnabledOnCartPage} 9158 } 9159 9160 if (giftMessage.isVisibleOnCart) { 9161 isEnabledOnCartPage = true 9162 } 9163 9164 if (giftMessage.isVisibleOnAllProductPages) { 9165 isEnabledOnProductPage = true 9166 } else if (giftMessage.isVisibleOnSpecificProductPages && 9167 giftMessage.visibleOnSpecificProductPages && 9168 giftMessage.visibleOnSpecificProductPages.find(x => x.handle === currProductHandle)) { 9169 9170 isEnabledOnProductPage = true 9171 } 9172 9173 return {isEnabledOnProductPage, isEnabledOnCartPage} 9174 }, 9175 prepareUI: function(settings, currProductHandle, parent){ 9176 let gktGiftMessageContainer = gkt.$("<div>").addClass('gktGiftMessageContainer') 9177 9178 let gktGiftMessageItemContainer = gkt.$("<div>").addClass('gktGiftMessageItemContainer') 9179 let gktGiftMessageTextArea = gkt.$("<textarea>").addClass('gktGiftMessageTextArea') 9180 .attr("placeholder", settings.languageData.giftMessage.giftMessagePlaceholderText) 9181 9182 9183 let gktGiftMessageItemContainerCheckboxLable = gkt.$("<label>").addClass('gktCustomCheckboxMsgContainer') 9184 let inputCheckboxEle = gkt.$("<input>").addClass('gktGiftMessageInputCheckboxEle') 9185 .attr("type", "checkbox") 9186 9187 if (gkt.utility.getNoteFromCart()) { 9188 inputCheckboxEle.attr("checked", true) 9189 let noteVal = gkt.utility.getNoteFromCart() 9190 gktGiftMessageTextArea.val(noteVal) 9191 // gktGiftMessageTextArea.css("display", "block") 9192 } 9193 9194 9195 gktGiftMessageItemContainerCheckboxLable.append(inputCheckboxEle) 9196 gktGiftMessageItemContainerCheckboxLable.append(gkt.$("<span>").addClass("gktCustomMsgCheckboxCheckmark")) 9197 9198 9199 //create a div with appendString 9200 let gktGiftMessageItemContainerLableText = gkt.$("<div>").addClass('gktGiftMessageItemContainerLabelText') 9201 .html(sett
9201ings.languageData.giftMessage.giftMessageHeadingLabel) 9202 gktGiftMessageItemContainerCheckboxLable.append(gktGiftMessageItemContainerLableText) 9203 gktGiftMessageItemContainer.append(gktGiftMessageItemContainerCheckboxLable) 9204 gktGiftMessageContainer.append(gktGiftMessageItemContainer) 9205 9206 9207 gktGiftMessageContainer.append(gktGiftMessageTextArea) 9208 9209 gkt.$(document).on("click", ".gktGiftMessageInputCheckboxEle",async (e)=>{ 9210 // window.eventCick = e 9211 // let isChecked = gkt.$(e.currentTarget).find(".gktGiftMessageInputCheckboxEle").is(":checked") 9212 // if(gkt.$(this).prop('checked') == true){ 9213 // console.log("gktCustomCheckboxMsgContainer") 9214 // } 9215 if(!e.currentTarget.checked){ 9216 let updateCartData = { } 9217 updateCartData.note = null 9218 updateCartData.attributes = {"gktGiftMessage": ""} 9219 await gkt.utility.updateCart(updateCartData) 9220 // if(gkt.$(".gktGiftMessageTextArea")){ 9221 // gkt.$(".gktGiftMessageTextArea").val("") 9222 // } 9223 9224 }else{ 9225 // if(gkt.$(".gktGiftMessageTextArea")){ 9226 // let updateCartData = { } 9227 // updateCartData.note = gkt.$(".gktGiftMessageTextArea").val() 9228 // await gkt.utility.updateCart(updateCartData) 9229 // } 9230 } 9231 gkt.$(document).find('.gktGiftMessageTextArea').css("display", "block") 9232 }) 9233 9234 gkt.$(document).on("keyup ", ".gktGiftMessageTextArea", ((event)=>{gkt.gktMessage.action.onGiftMessageTextAreakeyup(event,settings, parent)})) 9235 9236 return gktGiftMessageContainer 9237 }, 9238 insertIntoProductPageWrapper: function (settings, giftMessageHTML) { 9239 9240 gkt.elements.productPageWrapperV2.find(".gktGiftMessageWrapper").css("display", "block") 9241 9242 9243 gkt.elements.productPageWrapperV2.find(".gktGiftMessageWrapper").append(giftMessageHTML); 9244 9245 }, 9246 insertIntoCartPageWrapper: function (settings, giftMessageHTML) { 9247 9248 gkt.elements.cartPageWrapperV2.find(".gktCartGiftMessageWrapper").css("display", "block") 9249 9250 gkt.elements.cartPageWrapperV2.find(".gktCartGiftMessageWrapper").append(giftMessageHTML); 9251 9252 }, 9253 }, 9254 action: { 9255 onGiftMessageTextAreakeyup: function (event,settings, parent){ 9256 let giftMessageValue = event.target.value 9257 let updateCartData = { } 9258 updateCartData.note = giftMessageValue 9259 updateCartData.attributes = {"gktGiftMessage": giftMessageValue} 9260 if(gkt.state.timer){ 9261 clearTimeout(gkt.state.timer); 9262 gkt.state.timer = undefined 9263 } 9264 9265 gkt.state.timer = setTimeout(()=>{ 9266 gkt.utility.updateCart(updateCartData).then((data) => { 9267 console.log("gift message updated") 9268 }) 9269 },1000) 9270 9271 // gkt.utility.updateCart(updateCartData).then((data) => { 9272 // // console.log("gift message updated") 9273 // }) 9274 } 9275 } 9276 9277 }, 9278 gktVideoMsg: { 9279 init: function (settings, parent) { 9280 gkt.gktVideoMsg.initialize(settings, parent) 9281 9282 }, 9283 state: { 9284 elements: {}, 9285 uploadedVideoId: null, 9286 recordingTimeMS: 60000, 9287 recordingTime: "1:00", 9288 recordedBlob: "", 9289 mediaRecorder: null, 9290 interval: undefined 9291 }, 9292 initialize: function (settings, parent) { 9293 let productHandle = gkt.f.getProductPageHandle(settings) 9294 console.log("videoMesageInitialize"); 9295 if(gkt.settings.videoMessage.isVideoMessagingEnabled){ 9296 gkt.gktVideoMsg.f.registerEvents() 9297 gkt.gktVideoMsg.f.prepareVideoMsgPlayer() 9298 // // let oneClickUpsellProductPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnProductPage, parent) 9299 // let giftMessageProductPageHTML = gkt.gktMessage.f.prepareUI(settings, productHandle, parent) 9300 // gkt.gktMessage.f.insertIntoProductPageWrapper(settings, giftMessageProductPageHTML) 9301 // gkt.utility.overWriteBuyNowBtn() 9302 // gkt.state.isOverWriteBuyNowBtnTriggered = true 9303 } 9304 9305 }, 9306 f:{ 9307 registerEvents: function () { 9308 gkt.$(document).on("click", ".gktVideoMsgButton", gkt.gktVideoMsg.actions.gktVideoMsgButton) 9309 }, 9310 prepareVideoMsgPlayer: function () { 9311 9312 let gktVideoMsgPlayerWrapper = gkt.$("<div>").addClass("gktVideoMsgPlayerWrapper"); 9313 9314 let gktRecorder = gkt.$("<div>").addClass("gktRecorder") 9315 console.log("prepareVideoMsgPlayer"); 9316 let gktRecorderCloseBtn = gkt.$("<button>").addClass("gktRecorderCloseBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickClose(e) }) 9317 let gktRecorderCloseBtnImg = gkt.$("<img>").attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/close-video.svg") 9318 gktRecorderCloseBtn.append(gktRecorderCloseBtnImg) 9319 9320 9321 let gktRecord = gkt.$("<div>").addClass("gktRecord") 9322 let gktVideoPlayer = gkt.$("<video>").addClass("gktVideoPlayer") 9323 .attr("autoplay", true) 9324 .prop("muted", true) 9325 .attr("poster", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/free-video.jpg") 9326 let gktPermissionDenied = gkt.$("<div>").addClass("gktPermissionDenied gktVideoPlayerHide").text( gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.permissionDenied)) 9327 let gktVideoPlayerStatus = gkt.$("<div>").addClass("gktVideoPlayerStatus").html( gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.pressToRecord)) 9328 9329 9330
9331 //let gktVideoPlayerEmptyPTag = gkt.$("<p>"); 9332 9333 let gktVideoPlayerStartBtn = gkt.$("<button>").addClass("gktVideoPlayerStartBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickStart(e) }) 9334 let gktVideoPlayerRedDot = gkt.$("<div><p></p></div>").addClass("gktVideoPlayerRedDot") 9335 //gktVideoPlayerRedDot.append(gktVideoPlayerEmptyPTag); 9336 gktVideoPlayerStartBtn.append(gktVideoPlayerRedDot) 9337 9338 let gktVideoPlayerStopBtn = gkt.$("<button>").addClass("gktVideoPlayerStopBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickStop(e) }) 9339 let gktVideoPlayerRedSquare = gkt.$("<div><p></p></div>").addClass("gktVideoPlayerRedSquare") 9340 //gktVideoPlayerRedSquare.append(gktVideoPlayerEmptyPTag); 9341 gktVideoPlayerStopBtn.append(gktVideoPlayerRedSquare) 9342 9343 9344 let gktVideoPlayerTimeLeft = gkt.$("<div>").addClass("gktVideoPlayerTimeLeft gktVideoPlayerHide") 9345 9346 gktRecord.append(gktVideoPlayer) 9347 gktRecord.append(gktPermissionDenied) 9348 gktRecord.append(gktVideoPlayerStatus) 9349 gktRecord.append(gktVideoPlayerStartBtn) 9350 gktRecord.append(gktVideoPlayerStopBtn) 9351 gktRecord.append(gktVideoPlayerTimeLeft) 9352 9353 9354 let gktRecorded = gkt.$("<div>").addClass("gktRecorded") 9355 9356 let gktVideoPlayerRecording = gkt.$("<video>").addClass("gktVideoPlayerRecording") 9357 .attr("preload", "none") 9358 .attr("poster", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/free-video.jpg") 9359 9360 let gktLoadingHeading = gkt.$("<div>").addClass("gktLoadingHeading gktVideoPlayerHide").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.loading)) 9361 let gktUploadingVideoHeading = gkt.$("<div>").addClass("gktUploadingVideoHeading gktVideoPlayerHide").html( gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.uploading)) 9362 9363 let gktVideoPlayerControls = gkt.$("<div>").addClass("gktVideoPlayerControls") 9364 9365 let gktVideoPlayerControlsAcceptBtnDiv = gkt.$("<div>").addClass("gktVideoPlayerControlsAcceptBtnDiv"); 9366 9367 let gktVideoPlayerControlsAcceptBtnDivInfo = gkt.$("<p>").addClass("gktVideoPlayerControlsBtnDivInfo").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.startUploadText)); 9368 9369 gktVideoPlayerControlsAcceptBtnDiv.append(gktVideoPlayerControlsAcceptBtnDivInfo); 9370 9371 let gktVideoPlayerControlsAcceptBtn = gkt.$("<button>").addClass("gktVideoPlayerControlsAcceptBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickAccept(e) }) 9372 let gktVideoPlayerControlsAcceptBtnImg = gkt.$("<img>").addClass("gktVideoPlayerControlsAcceptBtnImg") 9373 .attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/confirm-video.png") 9374 gktVideoPlayerControlsAcceptBtn.append(gktVideoPlayerControlsAcceptBtnImg) 9375 gktVideoPlayerControlsAcceptBtnDiv.append(gktVideoPlayerControlsAcceptBtn); 9376 9377 9378 9379 let gktVideoPlayerControlsPlayBtnDiv = gkt.$("<div>").addClass("gktVideoPlayerControlsPlayBtnDiv"); 9380 9381 let gktVideoPlayerControlsPlayBtnDivInfo = gkt.$("<p>").addClass("gktVideoPlayerControlsBtnDivInfo").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.playText)); 9382 9383 gktVideoPlayerControlsPlayBtnDiv.append(gktVideoPlayerControlsPlayBtnDivInfo); 9384 9385 let gktVideoPlayerControlsPlayBtn = gkt.$("<button>").addClass("gktVideoPlayerControlsPlayBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickPlay(e) }) 9386 let gktVideoPlayerControlsPlayBtnImg = gkt.$("<img>").addClass("gktVideoPlayerControlsPlayBtnImg") 9387 .attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/play-video.png") 9388 gktVideoPlayerControlsPlayBtn.append(gktVideoPlayerControlsPlayBtnImg) 9389 gktVideoPlayerControlsPlayBtnDiv.append(gktVideoPlayerControlsPlayBtn); 9390 9391 9392 let gktVideoPlayerControlsReStartBtnDiv = gkt.$("<div>").addClass("gktVideoPlayerControlsReStartBtnDiv"); 9393 9394 let gktVideoPlayerControlsReStartBtnDivInfo = gkt.$("<p>").addClass("gktVideoPlayerControlsBtnDivInfo").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.reRecordVideoText)); 9395 9396 gktVideoPlayerControlsReStartBtnDiv.append(gktVideoPlayerControlsReStartBtnDivInfo); 9397 9398 let gktVideoPlayerControlsReStartBtn = gkt.$("<button>").addClass("gktVideoPlayerControlsReStartBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickReStart(e) }) 9399 let gktVideoPlayerControlsReStartBtnImg = gkt.$("<img>").addClass("gktVideoPlayerControlsReStartBtnImg") 9400 .attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/redo-video.png") 9401 gktVideoPlayerControlsReStartBtn.append(gktVideoPlayerControlsReStartBtnImg) 9402 gktVideoPlayerControlsReStartBtnDiv.append(gktVideoPlayerControlsReStartBtn); 9403 9404 gktVideoPlayerControls.append(gktVideoPlayerControlsReStartBtnDiv) 9405 gktVideoPlayerControls.append(gktVideoPlayerControlsPlayBtnDiv) 9406 gktVideoPlayerControls.append(gktVideoPlayerControlsAcceptBtnDiv) 9407 9408 9409 gktRecorded.append(gktVideoPlayerRecording) 9410 gktRecorded.append(gktLoadingHeading) 9411 gktRecorded.append(gktUploadingVideoHeading) 9412 gktRecorded.append(gktVideoPlayerControls) 9413 9414 9415 gktRecorder.append(gktRecorderCloseBtn) 9416 gktRecorder.append(gktRecord) 9417 gktRecorder.append(gktRecorded) 9418 9419 if(gkt.$(".gktVideoMsgPlayerWrapper").length > 0){ 9420 gkt.$(".gktVideoMsgPlayerWrapper").remove(); 9421 } 9422 if(gkt.$(".gktRecorder").length > 0){ 9423 gkt.$(".gktRecorder").remove(); 9424 } 9425 9426 9427 gkt.$(".gktGiftCardMessageContent").append(gktVideoMsgPlayerWrapper); 9428 gkt.$(".gktVideoMsgPlayerWrapper").append(gktRecorder) 9429 gkt.gktVideoMsg.state.elements.gktRecorder = gktRecorder 9430 gkt.gktVideoMsg.state.elements.gktRecord = gktRecord 9431 gkt.gktVideoMsg.state.elements.gktRecorded = gktRecorded 9432 gkt.gktVideoMsg.state.elements.gktVideoPlayer = gktVideoPlayer 9433 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn = gktVideoPlayerStartBtn 9434 gkt.gktVideoMsg.state.elements.gktVideoPlayerStopBtn = gktVideoPlayerStopBtn 9435 gkt.gktVideoMsg.state.elements.gktVideoPlayerControlsReStartBtn = gktVideoPlayerControlsReStartBtn 9436 gkt.gktVideoMsg.state.elements.gktVideoPlayerControlsPlayBtn = gktVideoPlayerControlsPlayBtn 9437 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording = gktVideoPlayerRecording 9438 gkt.gktVideoMsg.state.elements.gktRecorderCloseBtn = gktRecorderCloseBtn 9439 gkt.gktVideoMsg.state.elements.gktVideoPlayerControlsAcceptBtn = gktVideoPlayerControlsAcceptBtn 9440 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls = gktVideoPlayerControls 9441 gkt.gktVideoMsg.state.elements.gktLoadingHeading = gktLoadingHeading 9442 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft = gktVideoPlayerTimeLeft 9443 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus = gktVideoPlayerStatus 9444 gkt.gktVideoMsg.state.elements.gktPermissionDenied = gktPermissionDenied 9445 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading = gktUploadingVideoHeading 9446 9447 9448 }, 9449 createRecorder: function() { 9450 gkt.gktVideoMsg.state.elements.gktRecorder.removeClass("gktVideoPlayerHide"); 9451 gkt.gktVideoMsg.state.elements.gktRecord.removeClass("gktVideoPlayerHide"); 9452 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn.removeClass("gktVideoPlayerHide"); 9453 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.removeClass("gktVideoPlayerHide"); 9454 gkt.gktVideoMsg.state.elements.gktPermissionDenied.addClass("gktVideoPlayerHide"); 9455 gkt.gktVideoMsg.state.elements.gktRecorded.addClass("gktVideoPlayerHide"); 9456 gkt.gktVideoMsg.state.elements.gktVideoPlayerStopBtn.addClass("gktVideoPlayerHide"); 9457 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide"); 9458 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.html(gkt.gktVideoMsg.state.recordingTime); 9459 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.pressToRecord)); 9460 gkt.gktVideoMsg.state.recordingTime = "1:00"; 9461 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.uploading)); 9462 navigator.mediaDevices 9463 .getUserMedia({ 9464 audio: true, 9465 video: true, 9466 })
9467 .then((stream) => { 9468 gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject = stream; 9469 }) 9470 .catch((error) => { 9471 console.log("navigator", error) 9472 console.log(error); 9473 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn.addClass("gktVideoPlayerHide"); 9474 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.addClass("gktVideoPlayerHide"); 9475 gkt.gktVideoMsg.state.elements.gktPermissionDenied.removeClass("gktVideoPlayerHide"); 9476 }); 9477 }, 9478 clickClose: function(e){ 9479 e.preventDefault(); 9480 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'none') 9481 // gkt.gktVideoMsg.state.elements.gktRecorder.addClass("gktVideoPlayerHide"); 9482 if(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject){ 9483 gkt.gktVideoMsg.f.stopRecording(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject); 9484 } 9485 9486 gkt.gktVideoMsg.f.revokeObjectUrl(); 9487 }, 9488 stopRecording: function (stream) { 9489 if(gkt.gktVideoMsg.state.interval) { 9490 clearInterval(gkt.gktVideoMsg.state.interval); 9491 } 9492 if(gkt.gktVideoMsg.state.mediaRecorder && gkt.gktVideoMsg.state.mediaRecorder.state !== "inactive") { 9493 gkt.gktVideoMsg.state.mediaRecorder.stop(); 9494 } 9495 stream.getTracks().forEach(function (track) { 9496 if (track.readyState == "live") { 9497 console.log("hello - stop"); 9498 track.stop(); 9499 } 9500 }) 9501 }, 9502 clearTracks: function (stream) { 9503 stream.getTracks().forEach(function (track) { 9504 if (track.readyState == "live") { 9505 console.log("hello - stop"); 9506 track.stop(); 9507 } 9508 }) 9509 }, 9510 revokeObjectUrl: function () { 9511 URL.revokeObjectURL(gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording.src); 9512 }, 9513 clickStart: function async (e){ 9514 e.preventDefault(); 9515 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn.addClass("gktVideoPlayerHide"); 9516 gkt.gktVideoMsg.state.elements.gktRecorderCloseBtn.addClass("gktVideoPlayerHide"); 9517 gkt.gktVideoMsg.state.elements.gktVideoPlayerStopBtn.removeClass("gktVideoPlayerHide"); 9518 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.removeClass("gktVideoPlayerHide"); 9519 // the below field for the text 9520 //hide the toggle 9521 //gktVideoMsgCheckboxWrapper 9522 9523 gkt.gktVideoMsg.f.clearTracks(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject); 9524 9525 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.recording)); 9526 navigator.mediaDevices 9527 .getUserMedia({ 9528 video: true, 9529 audio: true, 9530 }) 9531 .then((stream) => { 9532 console.log("1 - navigator"); 9533 gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject = stream; 9534 // gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream = gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream || gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].mozCaptureStream ; 9535 // use HTMLCanvasElement.captureStream() 9536 // gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream = gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream || gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].mozCaptureStream ; 9537 return new Promise((resolve) => ( 9538 gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].onplaying = resolve 9539 )); 9540 }) 9541 .then(() => { 9542 console.log("2 - onplaying"); 9543 return gkt.gktVideoMsg.f.startRecording(e, gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject) 9544 }) 9545 .then((recordedChunks) => { 9546 console.log("3 - startRecording"); 9547 console.log(recordedChunks); 9548 9549 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.removeClass("gktVideoPlayerHide"); 9550 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.addClass("gktVideoPlayerHide"); 9551 gkt.gktVideoMsg.state.elements.gktLoadingHeading.addClass("gktVideoPlayerHide"); 9552 gkt.gktVideoMsg.state.recordedBlob = new Blob(recordedChunks, { type: "video/mp4" }); 9553 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording.attr("src",URL.createObjectURL(gkt.gktVideoMsg.state.recordedBlob)); 9554 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].load(); 9555 }) 9556 .catch( 9557 (error) => 9558 console.log(error) 9559 ); 9560 }, 9561 startRecording: function (e, stream) { 9562 return new Promise ((resolve, reject) => { 9563 9564 let mediaRecorder = new MediaRecorder(stream); 9565 gkt.gktVideoMsg.state.mediaRecorder = mediaRecorder; 9566 let parts = []; 9567 mediaRecorder.ondataavailable = (event) => { 9568 parts.push(event.data); 9569 }; 9570 mediaRecorder.start(1000); 9571 9572 mediaRecorder.onerror = (event) => reject(event.name); 9573 9574 gkt.gktVideoMsg.f.wait(mediaRecorder); 9575 9576 mediaRecorder.onstop = function(){ 9577 console.log("mediaRecorder.onstop() func called"); 9578 resolve(parts); 9579 } 9580 }) 9581 }, 9582 clickStop: function (e) { 9583 e.preventDefault(); 9584 gkt.gktVideoMsg.state.elements.gktRecord.addClass("gktVideoPlayerHide"); 9585 gkt.gktVideoMsg.state.elements.gktRecorded.removeClass("gktVideoPlayerHide"); 9586 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide"); 9587 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.addClass("gktVideoPlayerHide"); 9588 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.addClass("gktVideoPlayerHide"); 9589 gkt.gktVideoMsg.state.elements.gktRecorderCloseBtn.removeClass("gktVideoPlayerHide"); 9590 gkt.gktVideoMsg.state.elements.gktLoadingHeading.removeClass("gktVideoPlayerHide"); 9591 gkt.gktVideoMsg.f.stopRecording(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject); 9592 }, 9593 covertBlobToBase64: async function (recordedBlob){ 9594 9595 const reader = new FileReader();
9596 reader.readAsDataURL(recordedBlob); 9597 9598 reader.onloadend = function () { 9599 9600 var arrayBuffer = reader.result; 9601 9602 console.log(arrayBuffer); 9603 9604 var formData = new FormData(); 9605 // gkt.settings.SERVER_URL = "https://dev.api.giftkart.app" 9606 formData.append("upload_data", recordedBlob, "video.txt"); 9607 formData.append("shopName", gkt.settings.merchantInfo.shopName); 9608 9609 console.time('Video upload Time'); 9610 fetch(gkt.settings.SERVER_URL+"/api/proxy/upload/video?shopName="+gkt.settings.merchantInfo.shopName,{ 9611 method: 'POST', 9612 body: formData 9613 }).then( 9614 response => response.json() // if the response is a JSON object 9615 ).then( 9616 success => { 9617 if(success.responseCode == 200){ 9618 gkt.gktVideoMsg.state.uploadedVideoId = success.data.videoMsgId; 9619 console.log(success) // Handle the success response object 9620 console.timeEnd('Video upload Time'); 9621 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.uploadConfirmation)); 9622 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'grid') 9623 // Show feedback that it got uploaded 9624 // gkt.gktVideoMsg.state.elements.gktRecorder.addClass("gktVideoPlayerHide"); 9625 } 9626 /* 9627 * @Abhishek, the below if else condition is added to handle the 9628 * condition where the api fails in sending over responseCode 200. 9629 */ 9630 else{ 9631 console.log(success) // Handle the error response object 9632 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.errorMessage)); 9633 } 9634 9635 } 9636 ).catch( 9637 error => { 9638 console.log(error) // Handle the error response object 9639 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.errorMessage)); 9640 } 9641 ); 9642 } 9643 }, 9644 clickAccept: function(e) { 9645 e.preventDefault(); 9646 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide") 9647 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.removeClass("gktVideoPlayerHide") 9648 gkt.gktVideoMsg.f.covertBlobToBase64(gkt.gktVideoMsg.state.recordedBlob); 9649 }, 9650 wait: function(mediaRecorder){ 9651 var now = new Date().getTime(); 9652 var deadline = new Date(now + gkt.gktVideoMsg.state.recordingTimeMS).getTime(); 9653 var interval = setInterval(() => { 9654 now = new Date().getTime(); 9655 var t = deadline - now; 9656 console.log(t); 9657 var minutes = Math.floor((t % (1000 * 60 * 60)) / (1000 * 60)); 9658 var seconds = Math.floor((t % (1000 * 60)) / 1000); 9659 if (t < 0) { 9660 gkt.$('.gktVideoPlayerStopBtn').click(); 9661 } 9662 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.html(minutes + " : " + seconds) 9663 }, 1000); 9664 gkt.gktVideoMsg.state.interval = interval; 9665 }, 9666 clickReStart: function (e) { 9667 e.preventDefault(); 9668 if(gkt.utility.isMobileView()){ 9669 // gktVideoMessageFileInput.click(); 9670 // find this class in the document and trigger a click 9671 gkt.gktVideoMsg.f.revokeObjectUrl() 9672 gkt.$('.gktVideoMessageFileInput').click(); 9673 }else{ 9674 gkt.gktVideoMsg.f.revokeObjectUrl() 9675 gkt.gktVideoMsg.f.createRecorder(); 9676 } 9677 }, 9678 clickPlay: async function(e) { 9679 e.preventDefault(); 9680 try { 9681 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide"); 9682 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].play(); 9683 let isEnded = new Promise((resolve, reject) => { 9684 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].onended = resolve; 9685 }); 9686 await isEnded; 9687 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].load(); 9688 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.removeClass("gktVideoPlayerHide"); 9689 9690 } catch (error) { 9691 console.log(error) 9692 } 9693 }, 9694 scrollToVideoDiv: function() { 9695 // gkt.$(".gktGiftCardMessageContent").animate({scrollTop: 9999},1000); 9696 gkt.$(".gktGiftCardMessageContent").animate({scrollTop: 200},2000, 'swing'); 9697 }, 9698 }, 9699 actions: { 9700 gktVideoMsgButton: function(e){
9701 e.preventDefault() 9702 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'grid') 9703 gkt.gktVideoMsg.f.createRecorder() 9704 gkt.gktVideoMsg.f.scrollToVideoDiv() 9705 }, 9706 }, 9707 events: { 9708 9709 }, 9710 9711 }, 9712 gktFreeGiftCardPopup:{ 9713 init:function(settings,parent){ 9714 // gkt.gktFreeGiftCardPopup.initialize(settings,parent) 9715 }, 9716 state:{ 9717 gktFreeGiftcardName:null, 9718 gktFreeGiftcardEmail:null, 9719 gktFreeGiftcardMessage:null, 9720 }, 9721 initialize: async function(settings,parent){ 9722 // let productHandle = gkt.f.getProductPageHandle(settings) 9723 // gkt.gktFreeGiftCardPopup.f.showGiftCard(settings,parent) 9724 }, 9725 f:{ 9726 addFreeGiftcardProduct: async function(){ 9727 gkt.state.freeGiftcardVariantId = undefined 9728 let currencySymbol = gkt.settings.merchantInfo?.currencyInfo?.symbol ? gkt.settings.merchantInfo.currencyInfo.symbol : "" 9729 if(gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0] && 9730 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants && 9731 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants.length > 0 && 9732 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants[0].variantId){ 9733 gkt.state.freeGiftcardVariantId = gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants[0].variantId 9734 } 9735 9736 if(gkt.state.freeGiftcardVariantId){ 9737 gkt.state.cartData = await gkt.utility.getCart() 9738 let item = gkt.utility.checkIfItemPresentInCart(gkt.state.freeGiftcardVariantId) 9739 let cartValue = 0 9740 if(gkt.state.cartData && gkt.state.cartData.total_price && ((gkt.state.cartData.total_price)/100)){ 9741 cartValue = (gkt.state.cartData.total_price)/100 9742 } 9743 let freeGiftcardValue = gkt.gktFreeGiftCardPopup.f.getFreeGiftcardValue(cartValue, gkt.settings.rewardCampaigns.campaignData) 9744 let isProductConditionMet = gkt.gktFreeGiftCardPopup.f.isFreeGiftcardProductConditionMet(gkt.state.cartData, gkt.settings.rewardCampaigns.campaignData); 9745 // let isCustomerTagsConditionMet = gkt.gktFreeGiftCardPopup.f.isCustomerTagsConditionMet(gkt.settings.customer, gkt.settings.rewardCampaigns.campaignData); 9746 9747 // if product conditions not met set free giftcard value to 0 9748 if(!isProductConditionMet){ 9749 freeGiftcardValue = false 9750 } 9751 9752 // remove giftcard from cart if freeGiftcardValue is zero 9753 if(freeGiftcardValue == false && item){ 9754 await gkt.utility.updateCart({ updates: { [item.id]: 0 }}) 9755 return 9756 } 9757 9758 if(cartValue && freeGiftcardValue){ 9759 9760 let itemObj = {"items": [ 9761 { 9762 "id": gkt.state.freeGiftcardVariantId, 9763 "quantity": 1, 9764 "properties": { 9765 "Reward Value": freeGiftcardValue 9766 9767 } 9768 } 9769 ]} 9770 if(gkt.settings.rewardCampaigns.campaignData.giftcardMessageNote && gkt.settings.rewardCampaigns.campaignData.giftcardMessageNote != ""){ 9771 itemObj.items[0].properties["Message"] = gkt.settings.rewardCampaigns.campaignData.giftcardMessageNote 9772 } 9773 if(!item){ 9774 let resAddToCart = await gkt.utility.addToCartV2(itemObj) 9775 document.documentElement.dispatchEvent( new CustomEvent("cart:refresh", {bubbles: true})); 9776 }else{ 9777 let rewardValue = freeGiftcardValue 9778 if(item && item.properties && item.properties["Reward Value"] && item.properties["Reward Value"] != rewardValue){ 9779 await gkt.utility.updateCart({ updates: { [item.id]: 0 }}) 9780 let resAddToCart = await gkt.utility.addToCartV2(itemObj) 9781 document.documentElement.dispatchEvent( new CustomEvent("cart:refresh", {bubbles: true})); 9782 } 9783 } 9784 } 9785 } 9786 9787 }, 9788 calculateFreeGiftCardValue: function(freeGiftcardValue, cartTotalPrice, freeGiftcardPopupData) { 9789 try { 9790 if(!freeGiftcardPopupData?.rewardMode || freeGiftcardPopupData.rewardMode == "FIXED") { 9791 let currencySymbol = gkt.settings.merchantInfo?.currencyInfo?.symbol ? gkt.settings.merchantInfo.currencyInfo.symbol : "" 9792 return currencySymbol + "" + freeGiftcardValue; 9793 } else { 9794 // let calculatedFreeGiftCardValue = (cartTotalPrice/100) * parseFloat(freeGiftcardValue); // % of cartTotalWithoutDiscount; 9795 // calculatedFreeGiftCardValue = parseFloat(parseFloat(calculatedFreeGiftCardValue).toFixed(2)) 9796 return freeGiftcardValue + "" + "%"; 9797 } 9798 } catch(err) { 9799 console.log(err); 9800 } 9801 }, 9802 getFreeGiftcardValue: function (cartTotalPrice, freeGiftcardPopupData){ 9803 try { 9804 let resValue = false 9805 let activeCurrencyRate = gkt.utility.getActiveCurrencyRate(
9805); 9806 if(freeGiftcardPopupData?.rules?.length && freeGiftcardPopupData?.rules?.length > 0){ 9807 for(let i = 0; i < freeGiftcardPopupData.rules.length; i++){ 9808 let rule = freeGiftcardPopupData.rules[i] 9809 let cartValue = parseFloat(rule.cartValue * activeCurrencyRate).toFixed(2) 9810 let freeGiftcardValue = rule.freeGiftcardValue 9811 if(parseFloat(cartTotalPrice) >= parseFloat(cartValue) && parseFloat(freeGiftcardValue) > 0){ 9812 resValue = gkt.gktFreeGiftCardPopup.f.calculateFreeGiftCardValue(freeGiftcardValue, cartTotalPrice, freeGiftcardPopupData) 9813 } 9814 } 9815 } 9816 return resValue 9817 } catch (error) { 9818 console.log(error); 9819 return false 9820 9821 } 9822 }, 9823 isFreeGiftcardProductConditionMet: function (orderData, freeGiftcardPopupData) { 9824 try { 9825 9826 let orderDataProducts = orderData.items.map(item => item.product_id) 9827 let validProductSet = new Set() 9828 let excludeProductSet = new Set() 9829 if(freeGiftcardPopupData?.products?.length && freeGiftcardPopupData?.products?.length > 0){ 9830 for(let i = 0; i < freeGiftcardPopupData.products.length; i++){ 9831 let product = freeGiftcardPopupData.products[i] 9832 validProductSet.add(parseInt(product.productId)) 9833 } 9834 } 9835 if(freeGiftcardPopupData?.collectionsData?.length && freeGiftcardPopupData?.collectionsData?.length > 0){ 9836 for(let i = 0; i < freeGiftcardPopupData.collectionsData.length; i++){ 9837 let collectionProducts = freeGiftcardPopupData.collectionsData[i].productList 9838 if(collectionProducts?.length && collectionProducts?.length > 0){ 9839 collectionProducts.forEach(product => { 9840 validProductSet.add(product.productId) 9841 }) 9842 } 9843 } 9844 } 9845 9846 if(freeGiftcardPopupData?.excludeProducts?.length && freeGiftcardPopupData?.excludeProducts?.length > 0){ 9847 for(let i = 0; i < freeGiftcardPopupData.excludeProducts.length; i++){ 9848 let product = freeGiftcardPopupData.excludeProducts[i] 9849 excludeProductSet.add(parseInt(product.productId)) 9850 } 9851 } 9852 9853 if(validProductSet.size == 0 && excludeProductSet.size == 0){ 9854 return true 9855 } 9856 9857 9858 for(let i = 0; i < orderDataProducts.length; i++){ 9859 let product = orderDataProducts[i] 9860 9861 if(excludeProductSet.has(product)){ 9862 return false 9863 } 9864 9865 if(validProductSet.has(product)){ 9866 return true 9867 } 9868 } 9869 9870 if(validProductSet.size == 0 ){ 9871 return true 9872 }else{ 9873 return false 9874 } 9875 9876 } catch (error) { 9877 console.log(error); 9878 return false 9879 } 9880 }, 9881 9882 registerEvents: function(){ 9883 gkt.$(document).on("click", ".gktFreeGiftcardPopupModalClose", gkt.gktFreeGiftCardPopup.action.onModalClose) 9884 }, 9885 }, 9886 action:{ 9887 onModalClose: function(){ 9888 gkt.$(".gktFreeGiftcardPopupModalWrapper").css("display", "none") 9889 }, 9890 } 9891 }, 9892 gktNotification:{ 9893 init: function(){ 9894 gkt.gktNotification.f.addNotificationWrapperToDOM() 9895 gkt.gktNotification.initialize() 9896 }, 9897 state: { 9898 gktNotification: null, 9899 gktNotificationType: null, 9900 gktNotificationMessage: null, 9901 gktNotificationDuration: null, 9902 gktNotificationPosition: null, 9903 }, 9904 initialize: function(){ 9905 9906 9907 // notification examples 9908 // gkt.gktNotification.f.addNotificationItemType1("addNotificationItem-1","If your cart value is greater than 40$ you will get 10$ Free Gift Card.", 100) 9909 // gkt.gktNotification.f.addNotificationItemType1("addNotificationItem-2", "mayy") 9910 // gkt.gktNotification.f.addNotificationItemType1("addNotificationItem-3") 9911 9912 }, 9913 f: { 9914 addNotificationWrapperToDOM: function(){ 9915 if(gkt.$('.gktNotificationWrapper').length == 0){ 9916 let gktNotificationWrapper = gkt.$("<div>").addClass("gktNotificationWrapper") 9917 gkt.$("body").append(gktNotificationWrapper) 9918 } 9919 }, 9920 9921 addNotificationItemType1: function(itemHeading="",itemHeadingSubText="", closeAfterSec=10){ 9922 if(itemHeading == "" && itemHeadingSubText == "" ){ 9923 return 9924 } 9925 let gktNotificationWrapper = gkt.$(".gktNotificationWrapper") 9926 let gktNotificationItem = gkt.$("<div>").addClass("gktNotificationItem") 9927 let gktNotificationItemContent2 = gkt.$("<div>").addClass("gktNotificationItemContent2").html('<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="24px" height="24px"><path d="M 16 3 C 8.832031 3 3 8.832031 3 16 C 3 23.167969 8.832031 29 16 29 C 23.167969 29 29 23.167969 29 16 C 29 8.832031 23.167969 3 16 3 Z M 16 5 C 22.085938 5 27 9.914063 27 16 C 27 22.085938 22.085938 27 16 27 C 9.914063 27 5 22.085938 5 16 C 5 9.914063 9.914063 5 16 5 Z M 15 10 L 15 12 L 17 12 L 17 10 Z M 15 14 L 15 22 L 17 22 L 17 14 Z"/></svg>') 9928 let gktNotificationItemContent3 = gkt.$("<div>").addClass("gktNotificationItemContent3") 9929 let gktNotificationItemContent3Heading = gkt.$("<div>").addClass("gktNotificationItemContent3Heading").html(itemHeading) 9930 let gktNotificationItemContent3SubText = gkt.$("<div>").addClass("gktNotificationItemContent3SubText").html(itemHeadingSubText) 9931 gktNotificationItemContent3.append(gktNotificationItemContent3Heading) 9932 gktNotificationItemContent3.append(gktNotificationItemContent3SubText) 9933 let gktNotificationItemContent4 = gkt.$("<div>").addClass("gktNotificationItemContent4").html('<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 122.878 122.88" enable-background="new 0 0 122.878 122.88" xml:space="preserve"><g><path fill=#575050 d="M1.426,8.313c-1.901-1.901-1.901-4.984,0-6.886c1.901-1.902,4.984-1.902,6.886,0l53.127,53.127l53.127-53.127 c1.901-1.902,4.984-1.902,6.887,0c1.901,1.901,1.901,4.985,0,6.886L68.324,61.439l53.128,53.128c1.901,1.901,1.901,4.984,0,6.886 c-1.902,1.902-4.985,1.902-6.887,0L61.438,68.326L8.312,121.453c-1.901,1.902-4.984,1.902-6.886,0 c-1.901-1.901-1.901-4.984,0-6.886l53.127-53.128L1.426,8.313L1.426,8.313z"/>
9933</g></svg>') 9934 gktNotificationItemContent4.on("click", function (event) { 9935 gktNotificationItem.css("transform","translateX(300px)") 9936 setTimeout(()=>{gktNotificationItem.remove()},1000) 9937 }) 9938 9939 setTimeout(function(){ 9940 console.log("gktNotificationItem", gktNotificationItem) 9941 if(gktNotificationItem){ 9942 gktNotificationItem.css("transform","translateX(300px)") 9943 setTimeout(()=>{gktNotificationItem.remove()},1000) 9944 } 9945 },closeAfterSec*1000) 9946 9947 gktNotificationItem.append(gktNotificationItemContent2) 9948 gktNotificationItem.append(gktNotificationItemContent3) 9949 gktNotificationItem.append(gktNotificationItemContent4) 9950 9951 gktNotificationWrapper.css("display", "block") 9952 gktNotificationWrapper.append(gktNotificationItem) 9953 9954 //slide in the notification 9955 setTimeout(()=>{ 9956 gktNotificationItem.css("transform","translateX(0px)") 9957 },100) 9958 9959 return gktNotificationItem 9960 }, 9961 removeNotificationFromDOM: function(){ 9962 setTimeout(()=>{ 9963 gkt.$(".gktNotification").remove() 9964 }, gkt.gktNotification.state.gktNotificationDuration) 9965 } 9966 } 9967 } 9968 } 9969 9970 window.gkt = gkt; 9971 /* 9972 * start the program 9973 */ 9974 gktUtils.f.loadJquery(function (jqueryRefObj) { 9975 gkt.$ = jqueryRefObj; 9976 9977 gkt.$(document).ready(function () { 9978 console.log("document ready", gkt.$); 9979 gkt.f.initialize(gkt.$); 9980 }) 9981 }) 9982 9983 9984 9985 9986 9987 9988</script>
9988 9989 9990 9991 9992<link href="//www.roosters.co.uk/cdn/shop/t/3/assets/recurpay.css?v=11772386325512306321671208486" rel="stylesheet" type="text/css" media="all" />
9993<script> 9994 (function() { 9995 //Append Script 9996 var initScript = function(url, callback) { 9997 var script = document.createElement("script"); 9998 script.type = "text/javascript"; 9999 if (script.readyState){ 10000 script.onreadystatechange = function() { 10001 if (script.readyState == "loaded" || script.readyState == "complete") { 10002 script.onreadystatechange = null; 10003 callback(); 10004 } 10005 }; 10006 } else { 10007 script.onload = function() { 10008 callback(); 10009 }; 10010 } 10011 script.src = url; 10012 document.getElementsByTagName("head")[0].appendChild(script); 10013 }; 10014 10015 var recurpaySubscription = function($) { 10016 window.recurpay = {}; 10017 recurpay.domainURL = 'https://roostersbrewingco.recurpay.com'; 10018 recurpay.action = 'default'; 10019 recurpay.labelText = `Subscribe Now and Save`; 10020 recurpay.labelButton = `Subscribe Now`; 10021 recurpay.product= {}; 10022 recurpay.checkout = 'shopify'; 10023 recurpay.mixedCart = false; 10024 recurpay.checkout_btn_override_class = ".icart-checkout-btn, .hs-checkout-purchase, .recurpay-custom-checkout-btn"; 10025 recurpay.product.id = ""; 10026 recurpay.product.only_subscription = ""; 10027 recurpay.product.available = ""; 10028 recurpay.pdpAPI = recurpay.domainURL + '/api/storefront/product/'+recurpay.product.id+'/plans.json'; 10029 recurpay.accountAPI = recurpay.domainURL + '/api/storefront/account/customers//subscriptions/count.json'; 10030 recurpay.manageAccountAPI = recurpay.domainURL + "/storefront/account/authenticate/"; 10031 recurpay.checkoutAPI = recurpay.domainURL + '/checkout/initiate.rp'; 10032 10033 recurpay.customer = 'guest'; 10034 10035 if((window.location.href.indexOf("/products/") > -1) && (window.location.href.indexOf("recurpay_preview=true") > -1)){ 10036 recurpay.pdpAPI = recurpay.domainURL + '/api/storefront/product/'+recurpay.product.id+'/plans.json?fetch=force'; 10037 } 10038 var accountTemplate = '', 10039 pdpTemplate = '', 10040 accountSelector = "#recurpay-account-widget", 10041 pdpSelector = "#recurpay-pdp-widget", 10042 subscriptionSelector = "#recurpay-manage-subscriptions", 10043 checkoutSelector = '[href="/checkout"], form[action="/cart"] button[type="submit"][name="checkout"], form[action="/cart"] input[type="submit"][name="checkout"], form[action="/checkout"] input[type="submit"][name="checkout"], form[action="/checkout"] button[type="submit"][name="checkout"], button[type="submit"][name="checkout"],button[name="checkout"], button.ucd-checkout-btn', 10044 atcFormSelector = 'form[action*="/cart/add"], form[action*="/cart/add.js"], form[id^="product_form_"], form[data-productid], form[action*="/cart/add"][data-js-product-form], form#AddToCartForm, #addToCartFormId1, form.product-form, #AddToCartForm_id, form[data-cart-submit="data-cart-submit"][data-productid], form.lh-product-form, form.shg-product-atc-btn-wrapper, form.shopify-product-form', 10045 atcSelector = '[name="add"], [type=\"submit\"], button#AddToCart, button.gf_add-to-cart', 10046 buynowSelector = 'form[action="/cart/add"] .shopify-payment-button'; 10047 10048 // ACCOUNT PAGE 10049 if($(accountSelector).length && recurpay.customer !== "guest"){ 10050 function recurAccount(count){ 10051 accountTemplate += '<div class="subscription__account" data-subscription-block>' 10052 accountTemplate += '<div class="subscription__account--content">' 10053 accountTemplate += '<div class="subscription__account--heading">Subscriptions <span data-subscription-count>('+count+')</span></div>' 10054 if(count !== 0){ 10055 accountTemplate += '<div class="subscription__account--text" data-active-subscriptions>Pause, reschedule or cancel at your convenience.</div>' 10056 accountTemplate += '<div class="subscription__account--button" id="recurpay-manage-subscriptions"><a href="#">View and edit subscription</a></div>' 10057 } 10058 else{ 10059 accountTemplate += '<div class="subscription__account--text" data-active-subscriptions>There are no active subscriptions</div>' 10060 accountTemplate += '<div class="subscription__account--button"><a href="/">Start Subscribing</a></div>' 10061 } 10062 accountTemplate += '</div></div>' 10063 return accountTemplate; 10064 } 10065 $.ajax({ 10066 url: recurpay.accountAPI, 10067 type: 'GET', 10068 success: function(response){ 10069 var accountHTML = ''; 10070 if(response != "ERROR" && response.success == true) { 10071 accountHTML = recurAccount(response.data.subscription.count); 10072 } 10073 else { 10074 accountHTML = recurAccount(0); 10075 } 10076 if($(accountSelector).length){ 10077 $(accountSelector).html(accountHTML); 10078 } 10079 }, 10080 error: function(jqXhr, textStatus, errorThrown){ 10081 console.log( errorThrown ); 10082 } 10083 }); 10084 $(document).on('click', subscriptionSelector, function(e) { 10085 e.preventDefault(); 10086 var checkoutForm = $("<form action='"+recurpay.manageAccountAPI+"' method='post' style='display:none;'></form>"); 10087 $('body').append(checkoutForm); 10088 checkoutForm.submit(); 10089 }); 10090 } 10091 10092 // CART PAGE 10093 function recurCart(cartData){ 10094 var checkoutData = [], 10095 cartItems = cartData.items, 10096 cartAttributes = [], 10097 cartNote = cartData.note, 10098 recurpayCheckout = false;
10099 $.each( cartData.attributes, function(key, value ) { 10100 if(key != "Plan" && key != '_PlanId'){ 10101 cartAttributes.push({ 10102 name: key, 10103 value:value 10104 }); 10105 } 10106 }); 10107 for(var i=0; i < cartItems.length; i++){ 10108 var Planid = '', 10109 item = cartItems[i], 10110 property = item.properties, 10111 lineProperty = []; 10112 if(property){ 10113 if(property._PlanId){ 10114 Planid = property._PlanId 10115 recurpayCheckout = true; 10116 } 10117 $.each( property, function(key, value ) { 10118 if(key != "Plan" && key != '_PlanId'){ 10119 lineProperty.push({ 10120 name: key, 10121 value:value 10122 }); 10123 } 10124 }); 10125 } 10126 if(Planid == ''){ 10127 checkoutData.push({ 10128 quantity: item.quantity, 10129 variant_id: item.id, 10130 properties: lineProperty, 10131 type: 'ONETIME', 10132 currency:'INR' 10133 }); 10134 } 10135 else{ 10136 checkoutData.push({ 10137 quantity: item.quantity, 10138 variant_id: item.id, 10139 properties: lineProperty, 10140 plan_id: Planid, 10141 type: 'SUBSCRIPTION', 10142 currency:'INR' 10143 }); 10144 } 10145 } 10146 if(recurpayCheckout) { 10147 var getCheckoutData = JSON.stringify(checkoutData), 10148 getCartAttributes = JSON.stringify(cartAttributes), 10149 cartNote = $('[name="note"]').val(); 10150 checkoutForm = $("<form action='"+recurpay.checkoutAPI+"' method='post' style='display:none;'>" + 10151 "<input type='hidden' name='line_items' value='"+getCheckoutData+"' />"+ 10152 "<input type='hidden' name='customer_id' value='"+recurpay.customer+"' />" + 10153 "<input type='hidden' name='note_attributes' value='"+getCartAttributes+"' />" + 10154 "<input type='hidden' name='note' value='"+cartNote+"' />" + 10155 "</form>"); 10156 $('body').append(checkoutForm); 10157 checkoutForm.submit(); 10158 } 10159 else { 10160 document.location.href = "/checkout"; 10161 } 10162 } 10163 10164 // PRODUCT PAGE 10165 function recurPDP(data){ 10166 var prepaidCount = 0, 10167 regularCount = 0, 10168 prepaidDiscount = [], 10169 maxPrepaidDiscount = '', 10170 showTabs = false, 10171 GetPlans = "", 10172 tabHTML = ""; 10173 $.each(data.plans, function(key, plan) { 10174 var DiscountPercentageHtml = '', 10175 DescriptionHtml = '', 10176 PlanHtml = '', 10177 PlanDiscount = 0, 10178 PlanType = 'regular'; 10179 if(plan.type){ 10180 PlanType = plan.type; 10181 if(PlanType == 'prepaid'){ 10182 prepaidCount += prepaidCount+1; 10183 prepaidDiscount.push(plan.discount.value); 10184 } 10185 else{ 10186 regularCount += regularCount+1; 10187 } 10188 } 10189 if(plan.discount.type == "percentage" && plan.discount.value != 0){ 10190 PlanDiscount = plan.discount.value; 10191 DiscountPercentageHtml = '<span class="recurpay__discount">(' + plan.discount.value + '% Off)</span>'; 10192 } 10193 if(plan.description) { 10194 DescriptionHtml = '<div class="recurpay__description">' + plan.description + '</div>'; 10195 } 10196 PlanHtml += '<div class="recurpay__plan" plan-type="'+PlanType+'" plan-id="'+plan.id+'"><label class="recurpay__plan--label">'; 10197 if(recurpay.checkout == "shopify"){ 10198 if(key == 0){ 10199 PlanHtml += '<input type="radio" name="recurpay-input" class="recurpay__plan--input" checked="checked" data-plan="' + plan.id + '" data-selling-plan="' + plan.selling_plan_id + '" data-plan-name="' + plan.name + '" data-plan-discount="'+PlanDiscount+'" data-plan-type="'+PlanType+'">'; 10200 } 10201 else{ 10202 PlanHtml += '<input type="radio" name="recurpay-input" class="recurpay__plan--input" data-plan="' + plan.id + '" data-selling-plan="' + plan.selling_plan_id + '" data-plan-name="' + plan.name + '" data-plan-discount="'+PlanDiscount+'" data-plan-type="'+PlanType+'">'; 10203 } 10204 } 10205 else{ 10206 if(key == 0){ 10207 PlanHtml += '<input type="radio" name="recurpay-input" class="recurpay__plan--input" checked="checked" data-plan="' + plan.id + '" data-plan-name="' + plan.name + '" data-plan-discount="'+PlanDiscount+'" data-plan-type="'+PlanType+'">'; 10208 } 10209 else{ 10210 PlanHtml += '<input type="radio" name="recurpay-input" class="recurpay__plan--input" data-plan="' + plan.id + '" data-plan-name="' + plan.name + '" data-plan-discount="'+PlanDiscount+'" data-plan-type="'+PlanType+'">'; 10211 } 10212 } 10213 PlanHtml += '<span class="recurpay__plan--checkmark"></span><span class="recurpay__plan--title">' + plan.name + DiscountPercentageHtml+'</span></label>'; 10214 PlanHtml += '<div class="recurpay__plan--description">' + DescriptionHtml + '</div></div>'; 10215 GetPlans += PlanHtml; 10216 }) 10217 if(regularCount > 0 && prepaidCount >0){ 10218 showTabs = true; 10219 maxPrepaidDiscount = Math.max.apply(Math,prepaidDiscount); 10220 } 10221 if(showTabs){ 10222 tabHTML += '<div class="recurpay-tabs"><div class="recur-tab regular-tab active" plan-type="regular">Regular</div><div class="recur-tab prepaid-tab" plan-type="prepaid"><span>Prepaid</span>' 10223 if(maxPrepaidDiscount >0 ){ 10224 tabHTML += '<span class="recur-disc-tag">('+maxPrepaidDiscount+'% Off)</span>' 10225 } 10226 tabHTML += '</div></div>'; 10227 } 10228 if(recurpay.product.only_subscription !== "" && recurpay.product.only_subscription == "true"){ 10229 pdpTemplate += '<div class="recurpay__widget recurpay_only_subscription_widget" data-recurpay-widget>' 10230 } 10231 else{ 10232 pdpTemplate += '<div class="recurpay__widget" data-recurpay-widget>' 10233 } 10234 pdpTemplate += '<div class="recurpay__content">' 10235 pdpTemplate += '<label class="recurpay__label"><div class="recurpay__label--text"><input type="checkbox" class="recurpay__checkbox" autocomplete="off" data-subscribe-input /><span class="recurpay__checkmark"></span>' 10236 pdpTemplate += ''+recurpay.labelText+'</div><svg version="1.2" xmlns="http://www.w3.org/2000/svg" class="recurpay__label--img" viewBox="0 0 30 30" width="30" height="30"><style>.a{stroke:inherit;stroke-width:.5}</style><path fill-rule="evenodd" class="a" d="m21.8 11.9v7.4l-6.8 3.7-6.9-3.7v-7.4l6.9-3.3zm-8.8-1.7l5.7 2.9 2.1-1-5.9-2.8zm1.7 12c0 0 0-6.8 0-6.8l-6-2.8v6.3zm0.3-7.3l2.7-1.3-5.7-2.9-2.9 1.4zm6.3-2.4l-2.2 1.1v1.8l-1 0.5v-1.8l-2.8 1.3v6.8l6-3.3c0 0 0-6.4 0-6.4z"/><path d="m28.9 9.3c2.3 5.6 1 12-3.3 16.3-4.3 4.3-10.7 5.6-16.3 3.3-5.6-2.4-9.3-7.8-9.3-13.9h2.7c0 5.8 4 10.8 9.7 12 5.6 1.3 11.4-1.6 13.8-6.8 2.4-5.3 0.9-11.6-3.8-15-4.6-3.5-11-3.3-15.4 0.4l2.4 2.3-8.1 1.1 1.4-7.8 2.4 2.5q1-0.9 2.2-1.6 1.1-0.7 2.4-1.1 1.3-0.5 2.6-0.8 1.3-0.2 2.7-0.2c6.1 0 11.5 3.7 13.9 9.3z"/></svg>' 10237 pdpTemplate += '</label><div class="recurpay__plans">' 10238 pdpTemplate += '<div data-recurpay-plans>'+tabHTML+GetPlans+'</div><div class="recurpay__action"><button type="button" data-recurpay-action>'+recurpay.labelButton+'</button></div>' 10239 pdpTemplate += '</div></div></div>'; 10240 pdpTemplate += '<input type="hidden" id="recurpay_plan_name" name="" value="">'; 10241 pdpTemplate += '<input type="hidden" id="recurpay_plan_id" name="" value="">'; 10242 if(recurpay.checkout == "shopify"){ 10243 pdpTemplate += '<input type="hidden" id="recurpay_selling_plan_id" name="" value="">'; 10244 } 10245 return pdpTemplate; 10246 } 10247 if($(pdpSelector).length <= 0){ 10248 if (window.location.href.indexOf("/products/") > -1) {
10249 if($(atcFormSelector).find(atcSelector).filter(':visible').length){ 10250 if($(atcFormSelector).find(atcSelector).filter(':visible').first().parent().css('display') == 'flex' && $(atcFormSelector).find(atcSelector).filter(':visible').first().parent().css('flex-direction') == 'row'){ 10251 $(atcFormSelector).find(atcSelector).filter(':visible').first().parent().before("<div id='recurpay-pdp-widget'></div>"); 10252 } 10253 else{ 10254 $(atcFormSelector).find(atcSelector).filter(':visible').first().before("<div id='recurpay-pdp-widget'></div>"); 10255 } 10256 if($(pdpSelector).parent().css('position') == 'fixed' || $(pdpSelector).parent().css('position') == 'sticky' || $(pdpSelector).parent().css('position') == 'absolute' ){ 10257 $(pdpSelector).parent().addClass("recurpay-z-index"); 10258 } 10259 } 10260 else if($(atcFormSelector).find(atcSelector).length){ 10261 if($(atcFormSelector).find(atcSelector).first().parent().css('display') == 'flex' && $(atcFormSelector).find(atcSelector).filter(':visible').first().parent().css('flex-direction') == 'row'){ 10262 $(atcFormSelector).find(atcSelector).first().parent().before("<div id='recurpay-pdp-widget'></div>"); 10263 } 10264 else{ 10265 $(atcFormSelector).find(atcSelector).first().before("<div id='recurpay-pdp-widget'></div>"); 10266 } 10267 if($(pdpSelector).parent().css('position') == 'fixed' || $(pdpSelector).parent().css('position') == 'sticky' || $(pdpSelector).parent().css('position') == 'absolute' ){ 10268 $(pdpSelector).parent().addClass("recurpay-z-index"); 10269 } 10270 } 10271 else{ 10272 $(atcFormSelector).append("<div id='recurpay-pdp-widget'></div>") 10273 } 10274 } 10275 } 10276 if($(pdpSelector).length){ 10277 $.ajax({ 10278 url: recurpay.pdpAPI, 10279 type: 'GET', 10280 async: false, 10281 success: function(response) { 10282 var pdpHTML = ''; 10283 if(response != "ERROR" && response.success == true) { 10284 if(response.data.plans.length > 0){ 10285 pdpHTML = recurPDP(response.data); 10286 } 10287 } 10288 if($(pdpSelector).length && recurpay.product.available == "true"){ 10289 $(pdpSelector).html(pdpHTML); 10290 if((window.location.href.indexOf("/products/") > -1) && (window.location.href.indexOf("snippet_status=false") > -1)){ 10291 $(pdpSelector).before("<span class='recurpay-preview-text'>You are previewing subscriptions currently and the option below is not visible to customers on your live store. <a href='"+recurpay.domainURL+"/home?step=go_live' class='recurpay-preview-link' target='_blank'>Click here</a> if you are ready to show it your customers now.</span>") 10292 } 10293 } 10294 } 10295 }); 10296 } 10297 else{ 10298 if((window.location.href.indexOf("/products/") > -1) && (window.location.href.indexOf("recurpay_preview=true") > -1)){ 10299 var modalHTML = ""; 10300 modalHTML += '<div class="recurpay-modal-container" data-recurpay-visibility-modal>' 10301 modalHTML += '<div class="recurpay-modal--overlay"></div>' 10302 modalHTML += '<div class="recurpay-modal-inner-container">' 10303 modalHTML += '<div class="recurpay-modal-content">' 10304 modalHTML += '<div class="recurpay-modal-header">' 10305 modalHTML += '<div class="recurpay-modal-image">' 10306 modalHTML += '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 600 600" xml:space="preserve"><g id="LEFT_ARM_1"><g id="XMLID_46_"><path id="XMLID_290_" fill="#FFB96C" d="M294.4,485.5c-1.2,0.3-2.4,0.4-3.6,0.4c-0.2,0-0.4,0-0.6,0c-8.4-0.3-16.2-6.9-21-15.7 c-21.3-39.2-27.1-63.4-34.8-89.9c-1.9-6.6-1.4-13.3,1.4-18.1c2.2-3.7,5.7-6.4,10.5-6.9c0.6-0.1,1.1-0.1,1.7-0.1 c8.5,0,17.4,6.8,20.9,15.6l36.5,89.4C310,471.5,305,483.1,294.4,485.5z"></path><path id="XMLID_280_" fill="#FCAF63" d="M290.2,485.9c-8.4-0.3-16.2-6.9-21-15.7c-21.3-39.2-27.1-63.4-34.8-89.9 c-1.9-6.6-1.4-13.3,1.4-18.1c9.5,23,40.7,98.5,50.3,116.1C287.6,481.1,289,483.6,290.2,485.9z"></path></g></g><g id="LEFT_ARM_2"><g id="XMLID_10_"><g id="XMLID_42_"><path id="XMLID_293_" fill="#FFB96C" d="M340.2,472c-0.9,2.3-2.1,4.1-3.3,5c-7.2,5.7-14.3,7-26.2,9.6c-11.9,2.6-24.2,2-29.9-3.4 c-1.9-1.8-3.3-3.8-4.1-5.9c-2.5-6-0.3-12.3,6.8-15c4.2-1.6,42.4-10.6,48.7-9.4C343.1,455,342.9,465.3,340.2,472z"></path><path id="XMLID_279_" fill="#FCAF63" d="M340.2,472c-0.9,2.3-2.1,4.1-3.3,5c-7.2,5.7-14.3,7-26.2,9.6c-11.9,2.6-24.2,2-29.9-3.4 c-1.9-1.8-3.3-3.8-4.1-5.9c3.2,0.9,9.6,2.1,20.5,0.9C306.4,477.2,325.3,474.3,340.2,472z"></path></g><g id="XMLID_41_"><path id="XMLID_49_" fill="#FEA691" d="M330.2,453.6c-11.9,4-10.6,11.9-8.8,19.6c1.8,7.7,16.6,27.5,21.1,28.5s4.8-0.8,3.6-4.5 c-1.2-3.7-9.7-16.6-9.7-16.6s9.4,12.8,13.3,16.6c3.9,3.8,7.2,3.5,7.1-0.7c-0.2-4.2-9.5-18.3-9.5-18.3s8.2,10.8,11.6,14.5 s7.9,3.1,6.3-1.9c-1.5-5-8.3-15.9-8.3-15.9s6.6,11,11,12.1c4.4,1.1,1.7-5.5-3-13.9C360.3,464.5,345,448.6,330.2,453.6z"></path><path id="XMLID_50_" fill="#FEA691" d="M320.2,464.6c0,0-2.5,9.8-0.9,18.4s4.3,10.3,6.1,10.7s2.4-1.9,1.5-5.6 c-0.9-3.7,1.5-11,1.5-11S325.8,462.4,320.2,464.6z"></path></g></g></g><g id="BODY"><g id="XMLID_70_"><path id="XMLID_45_" fill="#FEC272" d="M273.1,496H172.2c0,0-13.9-97.2-5.1-121.1c2.5-6.8,5.8-12.3,9.6-16.9 c9.5-11.6,21.7-16.9,30-19c10.9-2.8,20.4-2.9,28.6-0.9c21.8,5.2,33.9,25.1,37.8,46.8C278.5,414.8,273.1,496,273.1,496z"></path><path id="XMLID_43_" fill="#F9B35F" d="M207.6,358.5c-13.2,3.4-25.3,3-31-0.5c9.5-11.6,21.7-16.9,30-19 c10.9-2.8,20.4-2.9,28.6-0.9C237,344.9,224.6,354.1,207.6,358.5z"></path></g></g><g id="RIGHT_ARM_1"><g id="XMLID_16_"><path id="XMLID_278_" fill="#FFCD92" d="M199,381.3c0,1.6-0.1,3.2-0.4,4.7c-4.1,26.6-27.7,90.6-27.7,90.6c-1.7,5.1-5.3,8.9-9.7,11 c-4.4,2-9.5,2.4-14.4,0.5c-7.6-3-11.2-10.2-11.2-18.1c0-1.7,0.2-3.4,0.5-5.1c6.9-37.3,19.2-68.2,29.3-90 c4.4-9.6,15.2-15.6,24.7-10.8c2.9,1.4,4.9,3.7,6.4,6.3C198.3,373.6,199,377.4,199,381.3z"></path><path id="XMLID_273_" fill="#FCB765" d="M199,381.3c0,1.6-0.1,3.2-0.4,4.7c-4.1,26.6-27.7,90.6-27.7,90.6c-1.7,5.1-5.3,8.9-9.7,11 l35.2-117.3C198.3,373.6,199,377.4,199,381.3z"></path></g></g><g id="RIGHT_ARM_2"><g id="XMLID_17_"><g id="XMLID_20_"><path id="XMLID_285_" fill="#FFCD92" d="M230.5,487.4c-2.2,5.4-9.4,5.6-9.4,5.6s-20.2,1.2-37.7,1.2c-17.5,0-34.7,0-41.7-7.9 c-1.4-1.6-2.5-3.4-3.1-5.3c-2.6-7.3,0.7-16,11.1-20.4c7.5-3.2,16.1-2.1,25.5-1.2c9.4,0.9,27.5,5.1,38,7.9 c10.6,2.7,16.9,5.4,17.8,15.4C231.3,484.6,231,486.1,230.5,487.4z"></path><path id="XMLID_284_" fill="#FCB765" d="M230.5,487.4c-2.2,5.4-9.4,5.6-9.4,5.6s-20.2,1.2-37.7,1.2c-17.5,0-34.7,0-41.7-7.9 c-1.4-1.6-2.5-3.4-3.1-5.3c7.8,2.4,18.3,5.2,26.7,5.9C189,488.9,220.4,487.9,230.5,487.4z"></path></g><g id="XMLID_2_"><g id="XMLID_18_"><path id="XMLID_47_" fill="#FEA691" d="M251.6,471.3c0,1.6-0.2,3.3-0.6,5.1c-2.1,8.6-13.2,15.2-30.1,16.1 c-7.5,0.4-12.6,0.4-16-0.4c-4.4-1.1-6.1-3.7-6.5-9.1c-0.5-6.9,4.7-13.2,8.6-15.9c11.7-7.9,22.6-8.5,32.1-7.6 C247.6,460.4,251.5,465.1,251.6,471.3z"></path><path id="XMLID_44_" fill="#FC8172" d="M251.6,471.3c0,1.6-0.2,3.3-0.6,5.1c-2.1,8.6-13.2,15.2-30.1,16.1 c-7.5,0.4-12.6,0.4-16-0.4c-0.4-1-0.7-2.2-0.8-3.7c-0.5-5.9,4.4-11.4,8.2-13.7c11.1-6.8,21.5-7.4,30.5-6.5 C246.8,468.5,249.7,469.6,251.6,471.3z"></path></g><g id="XMLID_19_"><path id="XMLID_48_" fill="#C7DCF9" d="M264.7,488.7c0,1.1-0.2,2.1-0.5,3.2h-55c-0.3-1-0.5-2.1-0.5-3.2c0-9.6,12.5-17.4,28-17.4 C252.2,471.3,264.7,479.1,264.7,488.7z"></path><path id="XMLID_254_" opacity="0.55" fill="#C7DCF9" d="M263.5,490.2c0,0.6-0.1,1.1-0.4,1.7h-50.3c-0.3-0.6-0.4-1.1-0.4-1.7 c0-5.1,11.4-9.3,25.5-9.3C252.1,480.9,263.5,485.1,263.5,490.2z"></path></g><g id="XMLID_37_"><path id="XMLID_28_" fill="#FEA691" d="M252.6,456.6c3.6,0.4,6.1,2.7,7.5,7.5c1.4,4.8,1.7,11.9,0.2,14.4 c-1.5,2.5-4.3,3.6-7.4,1.1c-3.1-2.5-4.8-9.5-5.8-13C245.9,462,244.5,455.8,252.6,456.6z"></path><g id="XMLID_4_"><path id="XMLID_38_" fill="#FEA691" d="M239.2,454.3c3.9,0.4,5.5,3.7,7,8.7c1.5,5,1.8,12.6,0.2,15.3c-1.6,2.6-4.6,3.8-7.9,1.2 c-3.3-2.6-5.2-10.1-6.2-13.8C231,460.8,230.4,453.5,239.2,454.3z"></path><path id="XMLID_79_" fill="#FF8D76" d="M243.1,480.8c-1.4,0.3-3,0-4.6-1.4c-3.3-2.6-5.1-10.1-6.2-13.8c-1.1-4-1.7-9.7,3-11.1 c-0.9,2.7-0.4,6.4,0.3,9.2c1,4.3,2.9,13,6.2,16C242.3,480.2,242.7,480.6,243.1,480.8z"></path></g><path id="XMLID_39_" fill="#FEA691" d="M224.6,456.6c3.9,0.4,6.5,2.9,8,7.9s1.8,12.6,0.2,15.3c-1.6,2.6-4.6,3.8-7.9,1.2 c-3.3-2.6-5.2-10.1-6.2-13.8C217.4,462.3,215.9,455.7,224.6,456.6z"></path><path id="XMLID_81_" fill="#FF8D76" d="M228.5,482.4c-1.1,0-2.3-0.5-3.5-1.5c-3.3-2.6-5.1-10.1-6.2-13.8 c-1-3.8-2.2-8.6,1.5-10.2c-0.3,2.5,0.4,5.7,1.1,8.3c1.2,4.5,3.3,13.7,7,17C228.4,482.4,228.4,482.4,228.5,482.4z"></path><path id="XMLID_40_" fill="#FEA691" d="M211.5,459.4c3.4-1,6,2.7,7.3,7.3c1.3,4.6,1.7,11.6,0.2,14c-1.4,2.4-4.2,3.5-7.2,1.1 c-3-2.4-3.8-7-4.7-10.4C205.9,467,204.9,461.4,211.5,459.4z"></path><path id="XMLID_82_" fill="#FF8D76" d="M215.2,483.2c-1.1,0-2.2-0.4-3.4-1.4c-3-2.4-3.8-7-4.7-10.4c-1.1-3.8-1.9-8.5,2.1-11 c-0.3,2.7,0.2,5.6,0.7,8.2c0.9,4.6,1.6,10.9,5,14.3C215,483,215.1,483.1,215.2,483.2z"></path><path id="XMLID_78_" fill="#FF8D76" d="M256.8,480.9c-1.2,0.1-2.5-0.3-3.8-1.4c-3.1-2.5-4.8-9.5-5.8-13c-1-3.7-2.2-8.5,1.8-9.7 c0,2.2,0.5,4.7,1,6.9c1,4.5,2.9,13.5,6.1,16.7C256.4,480.6,256.6,480.8,256.8,480.9z"></path></g></g></g></g><g id="HEAD"><g id="XMLID_89_"><path id="XMLID_6_" fill="#FF8D76" d="M208.8,235c0,0,9.3-3.8,15.6,8.8c6.3,12.7-0.5,20.8-0.5,20.8S217.7,246.3,208.8,235z"></path><path id="XMLID_173_" fill="#FEA691" d="M215.2,350.9c-8.8,4.1-14.9-1.6-14.9-1.6l-5.5-11.9l-9.9-21.4c14.9-3.2,27.9-5.7,27.9-5.7 l2.3,9.5l4.3,17.7C219.2,337.6,224,346.9,215.2,350.9z"></path><path id="XMLID_171_" fill="#FF8D76" d="M215,319.9c-1.3,1.9-2.7,3.9-4.4,5.8c-4.3,5.1-10.5,9-15.9,11.7l-9.9-21.4 c14.9-3.2,27.9-5.7,27.9-5.7L215,319.9z"></path><ellipse id="XMLID_3_" transform="matrix(0.8545 -0.5194 0.5194 0.8545 -114.0092 131.008)" fill="#FEA691" cx="176.9" cy="269" rx="47.2" ry="57.7"></ellipse><path id="XMLID_12_" fill="#FF8D76" d="M217.4,308.8c-2.9,3.7-6.5,
103066.9-10.6,9.5c-22.3,13.5-53.7,2.4-70.3-24.8 c-16.4-26.9-12-59.6,9.7-73.4c-12.6,16.2-13.2,42.2,0.3,64.3c16.5,27.2,48,38.3,70.3,24.8C217,309.1,217.2,309,217.4,308.8z"></path><path id="XMLID_5_" fill="#283575" d="M157.2,309.5c0,0-17-13.4-21.3-37.4s0.5-33.7,20.2-45.3c19.7-11.5,34.4-7.4,34.4-7.4 s-14-10.5-36.9-6.6c-22.9,3.8-46.2,25.6-41.4,58.4C117.2,306.2,138,316.5,157.2,309.5z"></path><path id="XMLID_11_" fill="#F76F59" d="M177.8,246.8c-2.7,1.9,1.1,12,9.3,19.5c8.2,7.5,16.1,3.6,16.3-3.8 C203.6,254.9,187.1,240.2,177.8,246.8z"></path><path id="XMLID_7_" fill="#FF8D76" d="M137.5,291.4c0,0-16,15.7-1.6,29.4c13.8,13.1,31.2-4.5,31.2-4.5S142.7,303.2,137.5,291.4z"></path><path id="XMLID_250_" fill="#F76F59" d="M139.4,300.5c0,0-9,8.8-0.9,16.6c7.8,7.4,17.6-2.5,17.6-2.5S142.3,307.2,139.4,300.5z"></path></g></g><g id="HAIR"><g id="XMLID_84_"><path id="XMLID_8_" fill="#283575" d="M188.5,218.1c0,0,1.7-30.2-15.5-42.5c-19.4-13.8-30.3,6.1-23.9,22.4 c2.8,7.3,5.8,11.7,8.2,14.3c2.2,2.4,5.2,3.8,8.4,4L188.5,218.1z"></path><path id="XMLID_9_" fill="#283575" d="M122.7,192.6c-15.3,12.2-2.1,29.7,4.2,34.4c2.7,2,5.6,3.6,8.1,4.8c3.4,1.6,7.4,1.4,10.6-0.6 l21.6-13.7C167.2,217.6,143,176.5,122.7,192.6z"></path><path id="XMLID_51_" fill="#3C4E8E" d="M159,172.3c-4.8,0.6,0.5,9.8,7.5,11S171.3,170.8,159,172.3z"></path><path id="XMLID_61_" fill="#3C4E8E" d="M128.7,192.8c-2.8,3.2,4.5,7.3,10.4,5.3C145.1,196.2,134.9,185.8,128.7,192.8z"></path></g></g><g id="MOUTH"><g id="XMLID_83_"><path id="XMLID_177_" fill="#F76F59" d="M217.7,285c-0.5,1-1.2,1.9-2.2,2.7c-3.7,2.9-6.5,7.1-8.5,11.5c-1.8,3.9-6.4,8.5-10.7,5.2 c-0.5-0.4-1-0.8-1.4-1.4c-4.5-5.7-2.8-20.4,4.2-26.9c5.4-5,12.1-3.7,15.5-0.9C217.9,277.7,219.3,281.7,217.7,285z"></path><path id="XMLID_175_" fill="#FF6EA9" d="M217.7,285c-0.5,1-1.2,1.9-2.2,2.7c-3.7,2.9-6.5,7.1-8.5,11.5c-1.8,3.9-6.4,8.5-10.7,5.2 c0-6.3,2.3-13.7,6.7-17.7C208.1,282.1,214.1,282.7,217.7,285z"></path></g></g><g id="EYE_1"><g id="XMLID_14_"><path id="XMLID_86_" fill="#1C3177" d="M155.8,267.7c-3.2,0-5.7-1-5.9-1.1c-1.3-0.5-1.9-2-1.4-3.3c0.5-1.3,2-1.9,3.3-1.4 c0.1,0,5.6,2.2,8.6-1.1c3.9-4.1-0.2-9.4-0.3-9.6c-0.9-1.1-0.7-2.7,0.4-3.6c1.1-0.9,2.7-0.7,3.6,0.4c2.4,3.1,5.5,10.4,0,16.2 C161.6,266.9,158.5,267.7,155.8,267.7z"></path></g></g><g id="EYE_2"><g id="XMLID_15_"><path id="XMLID_85_" fill="#1C3177" d="M193,242.6c-5.1,0-9.4-3.8-9.7-4c-1.1-0.9-1.1-2.6-0.2-3.6c0.9-1,2.5-1.1,3.6-0.2 c0,0,4.6,3.9,8,2.4c1.5-0.7,0.4-3.8,0.3-3.9c-0.5-1.3,0.1-2.8,1.5-3.3c1.3-0.5,2.8,0.1,3.3,1.4c1.5,3.7,1.1,8.6-3,10.4 C195.5,242.4,194.2,242.6,193,242.6z"></path></g></g><g id="EYEBROW_1"><g id="XMLID_1_"><path id="XMLID_88_" fill="#1C3177" d="M142.4,261.7c-0.1,0-0.2,0-0.3,0c-1.4-0.2-2.4-1.4-2.3-2.8c0-0.3,0.7-6.3,4.9-12.4 c4.1-6.1,8.3-8.2,8.5-8.3c1.3-0.6,2.8-0.1,3.4,1.2c0.6,1.3,0.1,2.8-1.2,3.4c0,0-3.2,1.7-6.5,6.5c-3.4,5-4,10-4,10.1 C144.8,260.7,143.7,261.7,142.4,261.7z"></path></g></g><g id="EYEBROW_2"><g id="XMLID_13_"><path id="XMLID_87_" fill="#1C3177" d="M179,232.1c-0.7,0-1.5-0.3-2-0.9c-0.9-1.1-0.7-2.7,0.4-3.6c0.3-0.2,2.6-2.1,6.7-3.3 c4.1-1.2,7.5-1.1,7.6-1.1c1.4,0,2.5,1.2,2.5,2.6c0,1.4-1.3,2.5-2.6,2.5c0,0-2.7-0.1-6,0.9c-3.2,1-5,2.4-5,2.4 C180.1,231.9,179.6,232.1,179,232.1z"></path></g></g><g id="TABLE"><g id="XMLID_248_"><path id="XMLID_22_" fill="#99ADF9" d="M505.9,506.3H98.3c-4,0-7.2-3.2-7.2-7.2l0,0c0-4,3.2-7.2,7.2-7.2h407.6 c4,0,7.2,3.2,7.2,7.2l0,0C513.1,503,509.9,506.3,505.9,506.3z"></path><path id="XMLID_198_" fill="#789FEF" d="M505.2,506.3H157.1c-4,0-7.2-3.2-7.2-7.2l0,0c0-4,3.2-7.2,7.2-7.2h348.1 c4,0,7.2,3.2,7.2,7.2l0,0C512.5,503,509.2,506.3,505.2,506.3z"></path></g></g><g id="DESKTOP"><g id="XMLID_186_"><g id="XMLID_182_"><path id="XMLID_25_" fill="#E1ECFF" d="M457.6,444.7h-186c-3.3,0-5.9-3-5.3-6.3l19.8-118.7c0.4-2.6,2.7-4.5,5.3-4.5h186 c3.3,0,5.9,3,5.3,6.3L463,440.2C462.5,442.8,460.3,444.7,457.6,444.7z"></path><path id="XMLID_29_" fill="#C7DCF9" d="M461.6,444.7H278c-3.3,0-5.9-3-5.3-6.3l19.8-118.7c0.4-2.6,2.7-4.5,5.3-4.5h183.6 c3.3,0,5.9,3,5.3,6.3l-19.8,118.7C466.5,442.8,464.2,444.7,461.6,444.7z"></path><path id="XMLID_31_" fill="#B7D4F7" d="M442.2,432H302c-2.6,0-4.5-2.3-4.1-4.8l15.1-90.6c0.3-2,2.1-3.5,4.1-3.5h140.1 c2.6,0,4.5,2.3,4.1,4.8l-15.1,90.6C445.9,430.5,444.2,432,442.2,432z"></path></g><g id="XMLID_183_"><path id="XMLID_24_" fill="#E1ECFF" d="M382.3,484.5h-25.5c-2.4,0-4.2-2-4-4.4l6.7-66.5c0.2-2,1.9-3.6,4-3.6H389 c2.4,0,4.2,2,4,4.4l-6.7,66.5C386.1,483,384.4,484.5,382.3,484.5z"></path><path id="XMLID_26_" fill="#C7DCF9" d="M384.1,484.5h-23.4c-1.5,0-2.7-1.3-2.6-2.8l7-69.4c0.1-1.3,1.2-2.3,2.6-2.3h23.4 c1.5,0,2.7,1.3,2.6,2.8l-7,69.4C386.5,483.5,385.4,484.5,384.1,484.5z"></path></g><g id="XMLID_185_"><path id="XMLID_27_" fill="#E1ECFF" d="M424.7,491.8H318.5c-2.2,0-4-1.8-4-4V479c0-2.2,1.8-4,4-4h106.2c2.2,0,4,1.8,4,4v8.8 C428.7,490,426.9,491.8,424.7,491.8z"></path><path id="XMLID_30_" fill="#C7DCF9" d="M426.9,491.8H327c-2.3,0-4.2-1.9-4.2-4.2v-8.4c0-2.3,1.9-4.2,4.2-4.2h99.9 c2.3,0,4.2,1.9,4.2,4.2v8.4C431,489.9,429.2,491.8,426.9,491.8z"></path></g></g></g><g id="SIGN"><g id="XMLID_21_"><path id="XMLID_77_" fill="#ff9800" d="M501.5,298.7c-1,0.7-2.3,1.2-3.7,1.2H402c-4.8,0-7.8-5-5.6-9.3l34.8-66.9l12.8-24.6 c2.4-4.5,8.8-4.5,11.2,0l48.2,91.5C505,293.6,503.9,297,501.5,298.7z"></path><path id="XMLID_74_" fill="#ff9800" d="M501.5,298.7c-1,0.7-2.3,1.2-3.7,1.2H402c-4.8,0-7.8-5-5.6-9.3l34.8-66.9L420.6,280 c-0.9,4.8,2.4,9.3,7.3,9.9L501.5,298.7z"></path><g id="XMLID_32_"><g id="XMLID_34_"><path id="XMLID_35_" fill="#FFFFFF" d="M445.2,264.1l-5-35.8c-0.2-1.2,0.8-2.3,2-2.3h14.2c1.2,0,2.1,1.1,2,2.3l-5,35.8 c-0.1,1-1,1.7-2,1.7h-4.3C446.1,265.9,445.3,265.1,445.2,264.1z"></path></g><circle id="XMLID_33_" fill="#FFFFFF" cx="449.3" cy="279.1" r="7.1"></circle></g></g></g></svg>' 10307 modalHTML += '</div>' 10308 modalHTML += '<h1 class="recurpay-preview-title">You are previewing subscriptions option for this product</h1>' 10309 modalHTML += '<span class="recurpay-preview-subtext">Note: This is not visible to your customers</span>' 10310 modalHTML += '</div>' 10311 modalHTML += '<div class="recurpay-modal-body">' 10312 modalHTML += '<div class="recurpay-modal-body-content">' 10313 modalHTML += '<div class="recurpay-modal-alert-box"><span class="recurpay-modal-alert-text">Looks like the subscription option is not visible on your store due to some conflict with theme. Talk to us on <a href="'+recurpay.domainURL+'/home?theme=false" target="_blank" data-initiate-live-chat>Live Chat</a>
10313 to get it resolved instantly</span></div>' 10314 modalHTML += '</div></div>' 10315 modalHTML += '<div class="recurpay-modal-footer">' 10316 modalHTML += '<a href="javascript:void(0)" class="recurpay-modal-cancel-link"><button type="button" class="recurpay-modal-cancel-btn">Close</button></a>' 10317 modalHTML += '<a href="'+recurpay.domainURL+'/home?theme=false" target="_blank" class="recurpay-modal-chat-link"><button type="button" class="recurpay-modal-chat-btn" data-initiate-live-chat>Start a Live Chat</button></a>' 10318 modalHTML += '</div></div></div></div>' 10319 if($('[data-recurpay-visibility-modal]').length <= 0){ 10320 if($('body').length){ 10321 $('body').append(modalHTML); 10322 } 10323 else if($('html').length){ 10324 $('html').append(modalHTML); 10325 } 10326 } 10327 } 10328 } 10329 function recurProperties(){ 10330 if($('.recurpay__checkbox').is(":checked")){ 10331 var planName = $('[name="recurpay-input"]:checked').attr('data-plan-name'), 10332 planId = $('[name="recurpay-input"]:checked').attr('data-plan'); 10333 $('#recurpay_plan_name').attr("name","properties[Plan]").val(planName); 10334 $('#recurpay_plan_id').attr("name","properties[_PlanId]").val(planId); 10335 if(recurpay.checkout == "shopify"){ 10336 var sellingPlanId = $('[name="recurpay-input"]:checked').attr('data-selling-plan'); 10337 $('#recurpay_selling_plan_id').attr("name","selling_plan").val(sellingPlanId); 10338 } 10339 } 10340 else{ 10341 $('#recurpay_plan_name').attr("name",""); 10342 $('#recurpay_plan_id').attr("name",""); 10343 if(recurpay.checkout == "shopify"){ 10344 $('#recurpay_selling_plan_id').attr("name",""); 10345 } 10346 } 10347 } 10348 function addSubscription(){ 10349 var variantSelector = $(pdpSelector).parents(atcFormSelector).find('[name="id"]'), 10350 quantitySelector = $(pdpSelector).parents(atcFormSelector).find('[name="quantity"]'), 10351 subscriptionPlanId = $('[name="recurpay-input"]:checked').attr('data-plan'), 10352 subscriptionPlanName = $('[name="recurpay-input"]:checked').attr('data-plan-name'), 10353 subscriptionPlanType = $('[name="recurpay-input"]:checked').attr('data-plan-type'), 10354 planVariant = parseInt(variantSelector.val()), 10355 planQuantity = 1, 10356 planParams = {}; 10357 if(quantitySelector.length) { 10358 planQuantity = parseInt(quantitySelector.val()); 10359 } 10360 10361 if(recurpay.checkout == "shopify"){ 10362 var sellingPlanId = $('[name="recurpay-input"]:checked').attr('data-selling-plan'); 10363 planParams = { 10364 id: planVariant, 10365 quantity: planQuantity, 10366 selling_plan: sellingPlanId, 10367 properties: { 10368 'Plan': subscriptionPlanName, 10369 '_PlanId': subscriptionPlanId 10370 } 10371 } 10372 } 10373 else{ 10374 planParams = { 10375 id: planVariant, 10376 quantity: planQuantity, 10377 properties: { 10378 'Plan': subscriptionPlanName, 10379 '_PlanId': subscriptionPlanId 10380 } 10381 } 10382 } 10383 10384 if(recurpay.checkout == "recurpay" && !recurpay.prepaidMixedCart && subscriptionPlanType == "prepaid"){ 10385 $.getJSON('/cart', function(response) { 10386 response.items = []; 10387 response.items.push(planParams); 10388 recurCart(response); 10389 }); 10390 } 10391 else{ 10392 if (recurpay.action == "default" && $(atcFormSelector).find(atcSelector).length){ 10393 $(atcFormSelector).find(atcSelector).first().click(); 10394 } 10395 else{ 10396 $.ajax({ 10397 type: 'POST', 10398 url: '/cart/add.js', 10399 dataType: 'json', 10400 data: planParams, 10401 success: function() { 10402 if (recurpay.checkout == "recurpay" && recurpay.action == "checkout"){ 10403 $.getJSON('/cart', function(response) { 10404 recurCart(response); 10405 }); 10406 } 10407 else if(recurpay.action == "cart"){ 10408 document.location.href = '/cart'; 10409 } 10410 else{ 10411 document.location.href = '/checkout'; 10412 } 10413 }, 10414 error: function(xhr, status, error) { 10415 var err = eval("(" + xhr.responseText + ")"); 10416 $('[data-recurpay-error]') 10417 .html(err.description) 10418 .show().delay(3000).fadeOut(); 10419 } 10420 }); 10421 } 10422 } 10423 10424 } 10425 $(document).on('click',".recur-tab", function(e) { 10426 e.preventDefault(); 10427 var $this = $(this); 10428 var subType = $this.attr("plan-type"); 10429 var recurInput = $('.recurpay__plan[plan-type="'+subType+'"]').find("[name='recurpay-input']"); 10430 if($this.hasClass("active")){ 10431 $('.recurpay__plan').hide(); 10432 $('.recurpay__plan[plan-type="'+subType+'"]').show(); 10433 if(($('.recurpay__plan[plan-type="'+subType+'"]').find("[name='recurpay-input']:checked").length) <=0){ 10434 $(recurInput).first().prop("checked",true).change(); 10435 } 10436 } 10437 else{ 10438 $('.recur-tab').removeClass("active"); 10439 $this.addClass("active"); 10440 $('.recurpay__plan').hide(); 10441 $('.recurpay__plan[plan-type="'+subType+'"]').show(); 10442 $(recurInput).first().prop("checked",true).change(); 10443 } 10444 }); 10445 if($('.recur-tab').length){ 10446 $('.recur-tab')[0].click(); 10447 } 10448 $(document).on('change',"[name='recurpay-input']", function(e) { 10449 recurProperties(); 10450 }); 10451 $(document).on('click',".recurpay-modal-cancel-btn", function(e) { 10452 $('[data-recurpay-visibility-modal]').hide(); 10453 }); 10454 10455 $(document).on('change',".recurpay__checkbox", function(e) { 10456 var $this = $(this); 10457 if($this.is(':checked')){ 10458 $(atcFormSelector).find(atcSelector).addClass("recurpay-hide"); 10459 $(buynowSelector).addClass("recurpay-hide"); 10460 $('.recurpay__plans').show(); 10461 } 10462 else{ 10463 $(atcFormSelector).find(atcSelector).removeClass("recurpay-hide"); 10464 $(buynowSelector).removeClass("recurpay-hide"); 10465 $('.recurpay__plans').hide(); 10466 } 10467 recurProperties(); 10468 }); 10469 10470 if(recurpay.product.only_subscription !== "" && recurpay.product.only_subscription == "true"){ 10471 $('.recurpay__checkbox').prop("checked",true).change(); 10472 } 10473 $(document).on('click',"[data-recurpay-action]", function(e) { 10474 addSubscription(); 10475 }); 10476 if(recurpay.checkout == "recurpay"){ 10477 $(document).on('click', checkoutSelector, function(e) { 10478 e.preventDefault(); 10479 e.stopPropagation(); 10480 $.getJSON('/cart', function(response) { 10481 recurCart(response); 10482 }) 10483 }); 10484 if($(recurpay.checkout_btn_override_class).length){ 10485 document.addEventListener("click", handler, true); 10486 function handler(e) { 10487 if($(e.target).is(recurpay.checkout_btn_override_class)){ 10488 e.stopPropagation(); 10489 e.preventDefault(); 10490 $.getJSON('/cart', function(response) { 10491 recurCart(response); 10492 }); 10493 } 10494 } 10495 } 10496 } 10497 } 10498 //Append jQuery if it is not there, then call to recurpaySubscription 10499 //Otherwise directly call to recurpaySubscription 10500 if ((typeof(jQuery) == 'undefined')) { 10501 initScript('//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js', function() { 10502 window.recurpayScript = jQuery.noConflict(true); 10503 recurpaySubscription(recurpayScript); 10504 }) 10505 } 10506 else { 10507 recurpaySubscription(jQuery); 10508 } 10509 })(); 10510</script>
10510 10511<div id="shopify-block-AaldhMkR3WENZK01jK__17309853810776502128" class="shopify-block shopify-app-block"><style> 10512 10513</style>
10514<script> 10515 var pify_shop = "roostersbrewingco.myshopify.com"; 10516 10517</script>
10517 10518 10519 10520</div><div id="shopify-block-AVEg1ZzNYWEZ2ZXBEN__7584948915495707528" class="shopify-block shopify-app-block"> 10521<!-- BEGIN app snippet: app-data --> 10522 10523
10524<script>try{if(!window.AVADA_JOY){const m={"shop":{"currency":"GBP","disableWatermark":true,"plan":"free","isAvailableProPlan":true,"enableShopAppSSO":true,"useMoneyWithCurrencyFormat":false,"useNewWidget":true,"useWidgetV3":true,"useWidgetV4":true,"customerAccountsVersion":"NEW_CUSTOMER_ACCOUNTS","usePendingPointV2":false,"isGuestSameAsMember":true,"isCustomLoginLink":false,"loginLinkRedirect":"","signUpLinkRedirect":"","useReferralV2":true,"customerLoyaltyEligibility":"customer_eligible_all","isOptInEnrollment":false,"pricingCohort":"legacy","domain":"www.roosters.co.uk","shopifyDomain":"roostersbrewingco.myshopify.com","timezoneSelected":"GMT Standard Time"},"program":{"earning":[{"limitUnit":"minute","includeProducts":[],"autoRemovePoints":true,"earnBy":"price","type":"earning","typeProductMatch":"all","hasLimit":false,"typeCondition":"all","shopId":"np1fmrUPWVHOWhIfs0oa","event":"place_order","conditions":[{"field":"title","typeMatch":"contains","content":""}],"excludeProducts":[],"limitInterval":1,"rateMoney":"1","status":true,"appliedCollectionIds":[],"priority":1,"priorityPlaceOrder":1,"title":"Place An Order","excludePOSOrderProducts":false,"excludeOSOrderProducts":false,"appliedPlaceOrderTo":"all","changeProgramTitle":false,"expired":false,"prefix":"Joy -","isDraft":false,"appliedSource":"all","statusUseCondition":true,"startDate":"2025-05-23","createdAt":"2023-01-23T13:15:22.491Z","translateTitle":{},"excludeLocationsPOS":[],"enabledExcludePOS":false,"isTurnOnProgram":false,"changeMilestoneDescriptions":false,"translationKey":"b483f5f7-1e34-4f28-bc9c-f7ea9440844b","endDate":"","usageLimit":1,"excludeStoreCredit":false,"blockLimitedCouponReuse":false,"excludeFreeGift":false,"excludeGiftCard":false,"appliesOncePerCustomer":false,"earnPoint":5,"earnPointsTiers":{"YJo8vx7jIp3tAxsn47c0":{"earnPoint":5}},"updatedAt":"2026-09-01T07:53:01.866Z","id":"MlG2cY6ulxG8O3vjNpwL"},{"social":"facebook","limitUnit":"lifetime","urlAccount":"https://www.facebook.com/RoostersBrewCo/","title":"Like us on Facebook","type":"earning","message":"","signUpGuide":"","hasLimit":true,"action":"like","shopId":"np1fmrUPWVHOWhIfs0oa","event":"like_facebook","status":true,"earnPoint":"50","appliedCollectionIds":[],"rateMoney":"1","priority":2,"createdAt":"2023-01-23T13:23:50.375Z","translateTitle":{},"expired":false,"updatedAt":"2023-08-02T09:08:23.176Z","id":"rlIKex7kd4VQuD4szGxn"},{"social":"instagram","limitUnit":"lifetime","urlAccount":"https://www.instagram.com/roostersbrewco/","title":"Follow us on Instagram","message":"","type":"earning","signUpGuide":"","hasLimit":true,"action":"follow","shopId":"np1fmrUPWVHOWhIfs0oa","event":"follow_instagram","status":true,"earnPoint":"50","appliedCollectionIds":[],"rateMoney":"1","priority":3,"createdAt":"2023-01-23T13:23:13.982Z","translateTitle":{},"expired":false,"updatedAt":"2023-08-02T09:08:23.176Z","id":"oYtdbzibi7QlOFAn1dAh"},{"social":"twitter","limitUnit":"lifetime","urlAccount":"https://twitter.com/RoostersBrewCo","title":"Follow us on Twitter","message":"","type":"earning","signUpGuide":"","hasLimit":true,"action":"follow","shopId":"np1fmrUPWVHOWhIfs0oa","event":"follow_twitter","status":true,"earnPoint":"50","appliedCollectionIds":[],"rateMoney":"1","priority":4,"createdAt":"2023-01-23T13:24:28.058Z","translateTitle":{},"expired":false,"updatedAt":"2023-08-02T09:08:23.177Z","id":"Dls0GaMQ1RxYm5AvjM14"}],"interactWebsiteProgram":null,"spending":[{"spendPoint":"5000","orderReq":"none","freeProductIds":[],"prefix":"JOY-","maxSpendPoint":"","earnAmount":"50.00","minSpendPoint":"","type":"spending","title":"Redeem Discount","orderReqAmount":0,"appliedCollectionIds":[],"expiredAfter":"permanent","redeemType":"fixed","appliedTo":"all","shopId":"np1fmrUPWVHOWhIfs0oa","event":"amount_discount","status":true,"priority":0,"isUsePrefixDiscountCode":false,"userAvailability":"userRedeemed","appliedDiscountToSaleChannel":"applyAll","createdAt":"2023-01-23T16:22:23.714Z","translateTitle":{},"expired":false,"updatedAt":"2023-09-05T13:05:07.432Z","id":"sqzlacWrMoPSn8msi7wk"},{"orderReq":"none","freeProductIds":[],"prefix":"JOY-","maxSpendPoint":"","earnAmount":"20.00","minSpendPoint":"","type":"spending","title":"Redeem Discount","orderReqAmou
10524nt":0,"appliedCollectionIds":[],"redeemType":"fixed","expiredAfter":"permanent","appliedTo":"all","shopId":"np1fmrUPWVHOWhIfs0oa","event":"amount_discount","status":true,"spendPoint":"2000","priority":1,"isUsePrefixDiscountCode":false,"userAvailability":"userRedeemed","appliedDiscountToSaleChannel":"applyAll","createdAt":"2023-01-23T16:21:18.162Z","translateTitle":{},"expired":false,"updatedAt":"2023-09-05T13:05:07.432Z","id":"QijKXKhwSXZF5Ns1Fomm"},{"spendPoint":"1000","orderReq":"none","freeProductIds":[],"prefix":"JOY-","maxSpendPoint":"","earnAmount":"10.00","minSpendPoint":"","title":"Redeem Discount","type":"spending","orderReqAmount":0,"appliedCollectionIds":[],"redeemType":"fixed","appliedTo":"all","expiredAfter":"permanent","shopId":"np1fmrUPWVHOWhIfs0oa","event":"amount_discount","status":true,"priority":2,"isUsePrefixDiscountCode":false,"userAvailability":"userRedeemed","appliedDiscountToSaleChannel":"applyAll","createdAt":"2023-01-23T15:54:40.690Z","translateTitle":{},"expired":false,"updatedAt":"2023-09-05T13:05:07.429Z","id":"9yF6MHQrMa7X5dTAwzUj"},{"orderReq":"none","freeProductIds":[],"prefix":"JOY-","maxSpendPoint":"","minSpendPoint":"","type":"spending","orderReqAmount":0,"appliedCollectionIds":[],"expiredAfter":"permanent","redeemType":"fixed","appliedTo":"all","shopId":"np1fmrUPWVHOWhIfs0oa","event":"amount_discount","spendPoint":"250","status":true,"earnAmount":"2.50","title":"Redeem Discount","priority":3,"isUsePrefixDiscountCode":false,"userAvailability":"userRedeemed","appliedDiscountToSaleChannel":"applyAll","createdAt":"2023-01-23T13:19:52.376Z","translateTitle":{},"expired":false,"updatedAt":"2023-09-05T13:05:07.432Z","id":"Q9H9d4kiPwKfDDaXjbCc"},{"spendPoint":"500","orderReq":"none","freeProductIds":[],"prefix":"JOY-","maxSpendPoint":"","earnAmount":"5.00","minSpendPoint":"","type":"spending","orderReqAmount":0,"appliedCollectionIds":[],"redeemType":"fixed","expiredAfter":"permanent","appliedTo":"all","shopId":"np1fmrUPWVHOWhIfs0oa","event":"amount_discount","status":true,"title":"Redeem Discount","priority":4,"isUsePrefixDiscountCode":false,"userAvailability":"userRedeemed","appliedDiscountToSaleChannel":"applyAll","createdAt":"2023-01-23T15:52:32.643Z","translateTitle":{},"expired":false,"updatedAt":"2023-09-05T13:05:07.432Z","id":"6T0MRn9raP972UA3lZFZ"},{"spendPoint":"750","orderReq":"none","freeProductIds":[],"prefix":"JOY-","maxSpendPoint":"","earnAmount":"7.50","minSpendPoint":"","type":"spending","title":"Redeem Discount","orderReqAmount":0,"appliedCollectionIds":[],"appliedTo":"all","expiredAfter":"permanent","redeemType":"fixed","shopId":"np1fmrUPWVHOWhIfs0oa","event":"amount_discount","status":true,"priority":5,"isUsePrefixDiscountCode":false,"userAvailability":"userRedeemed","appliedDiscountToSaleChannel":"applyAll","createdAt":"2023-01-23T15:53:40.739Z","translateTitle":{},"expired":false,"updatedAt":"2023-09-05T13:05:07.432Z","id":"S2E12RecoaNDLxIKZpKL"}],"tiers":[{"name":"Bronze","icon":"https://imgur.com/atrkLg3.png","iconCustom":"","targetPoint":0,"targetPointUpdate":0,"members":0,"placedOrderReward":false,"rateMoney":"","earnPoint":"","isSystemTier":true,"hideDefaultTier":false,"tierNamesLanguage":{},"bgType":"default","bgImage":"","textColor":"#785F4D","progressBarColor":"#785F4D","boxBgColor":"#EAD8C0","boxTextColor":"#785F4D","bgCardColor":"#EAD8C0","cardOpacity":0,"iconColor":"#222222","systemType":"bronze","descriptionBlock":"Welcome to the program","id":"YJo8vx7jIp3tAxsn47c0","createdAt":"2023-02-02T10:22:14.811Z","shopId":"np1fmrUPWVHOWhIfs0oa","updatedAt":"2023-02-02T10:22:14.811Z"},{"name":"Silver","icon":"https://imgur.com/A2rT5G0.png","iconCustom":"","targetPoint":200,"targetPointUpdate":200,"members":0,"placedOrderReward":false,"rateMoney":"","earnPoint":"","isSystemTier":true,"hideDefaultTier":false,"tierNamesLanguage":{},"bgType":"default","bgImage":"","textColor":"#000000","progressBarColor":"#000000","boxBgColor":"#E6E6E6","boxTextColor":"#000000","bgCardColor":"#E6E6E6","cardOpacity":0,"iconColor":"#222222","systemType":"silver","descriptionBlock":"Spend 200 points to unlock","id":"zfhF5kF6HAinvmbF0WeI","createdAt":"2023-02-02T10:22:14.811Z","shopId":"np1fmrUPWVHOWhIfs0oa","updatedAt":"2023-02-02T10:22:14.811Z"},{"name":"Gold","icon":"https://imgur.com/o8PHej5.png","iconCustom":"","targetPoint":500,"targetPointUpdate":500,"members":0,"placedOrderReward":false,"rateMoney":"","earnPoint":"","isSystemTier":true,"hideDefaultTier":false,"tierNamesLanguage":{},"bgType":"default","bgImage":"","textColor":"#FFFFFF","progressBarColor":"#FFFFFF","boxBgColor":"#191919","boxTextColor":"#FFFFFF","bgCardColor":"#191919","cardOpacity":0,"iconColor":"#191919","systemType":"gold","descriptionBlock":"Spend 500 points to unlock","id":"9FXvEkrpQ92DHvw2Us4f","createdAt":"2023-02-02T10:22:14.812Z","shopId":"np1fmrUPWVHOWhIfs0oa","updatedAt":"2023-02-02T10:22:14.812Z"}]},"shopId":"np1fmrUPWVHOWhIfs0oa","settings":{"version":4,"id":"XPSP4D7GjwAOxdl5uwoQ","program":{"name":"Loyalty Program","tagline":"","logo":"https://cdn.shopify.com/s/files/1/0628/5675/7501/files/joy_logo_joy_Rooster_s_Brew_Co._Logo_Harrogate_500x_85ea2127-28f2-4f1c-8eb1-48a3218fe1d4.webp?v=1784898878","pointsLabel":"","points
10524Icon":"","pointsIconUrl":"https://cdn.shopify.com/s/files/1/0628/5675/7501/files/joy_points_icon_joy_beer_f861f442-094d-4a14-b8ab-9fe8955ba728.png?v=1784899134","pointsIconType":"image"},"theme":{"mode":"loyalty","preset":"midnight","primaryColor":"#FAD018","secondaryColor":"#f5f5f5","textColor":"#666666","headingTextColor":"#FAD018","buttonBgColor":"#FAD018","buttonTextColor":"#ffffff","buttonStyleMode":"custom","buttonOverrideBgColor":"","buttonOverrideTextColor":"","buttonOverrideSize":"","buttonPreset":"solid","buttonSize":"standard","buttonFontWeight":"","buttonRadius":"","buttonBorderWidth":"","buttonBorderColor":"","buttonHoverEffect":"auto","buttonHoverBgColor":"","buttonHoverTextColor":"","buttonHoverBorderColor":"","blockBgColor":"#ffffff","buttonTextCase":"none","blockTextColor":"#666666","cardHeaderColor":"#FAD018","programIconBgColor":"","hideProgramIcons":false,"cardBorderColor":"#E8E8E8","cardBorderWidth":1,"cornerRadius":"radiusNone","iconTheme":"minimal","widgetBackgroundColor":"#ffffff","headerBackgroundColor":"#FAD018","primaryTextColor":"#ffffff","primaryButtonColor":"#FAD018","secondaryButtonColor":"#FFFFFF","secondaryButtonTextColor":"#1a1a1a","cardHoverColor":"#F5F5F5","footerBgColor":"#FFFFFF","footerActiveBgColor":"#fef8dc","footerActiveTextColor":"#FAD018","footerInactiveTextColor":""},"brandingColors":{"primary":"#1a1a1a","secondary":"#f5f5f5","accent":"#CCCCCC"},"fonts":{"body":"inherit","headline":"inherit","heading":"inherit","action":"inherit","bodyWeight":"","headingWeight":""},"header":{"bannerType":"default","bannerImage":"","logoIcon":"","logoHeight":32,"logoBackground":"transparent","showProgramName":true,"textColor":"#ffffff","headingSize":"md","programNameSize":"xl","buttonGroup":{"enabled":true,"buttons":[{"id":"shop","enabled":true,"label":"Shop now","action":"url","url":"/collections/all","variant":"secondary"},{"id":"subscription","enabled":false,"label":"Manage subscription","action":"subscription","url":"","variant":"secondary"}]},"overlayOpacity":0},"membershipCard":{"enabled":true,"variant":"minimal","alwaysShowTierProgress":false,"hideOrderPerks":false,"hideBirthdayPerks":false,"showStoreCreditInstead":false,"beforeSignIn":{"textColor":"#222","buttonBgColor":"#FAD018","buttonTextColor":"#ffffff","bgType":"default","bgImage":"https://firebasestorage.googleapis.com/v0/b/avada-joy.appspot.com/o/media%2Fnp1fmrUPWVHOWhIfs0oa%2Fprogram%2Fcustom_icons%2F1785227397010-assassin%20cans%20joy%20loyalty%20header%2016%207.jpg?alt=media&token=0a864dd7-21ef-4bc7-ad04-d14d68b74851","bgColor":"#fff","opacity":0,"contentAlignment":"center"},"afterSignIn":{"textColor":"#222","boxBgColor":"#FFF","boxTextColor":"#222","bgType":"image","bgImage":"https://firebasestorage.googleapis.com/v0/b/avada-joy.appspot.com/o/media%2Fnp1fmrUPWVHOWhIfs0oa%2Fprogram%2Fcustom_icons%2F1785227507574-joy%20membership%20card%2016%207.jpg?alt=media&token=9205f2a5-23e5-4f1a-9b5c-0bb4c220a9f9","bgColor":"#fff","opacity":0,"buttonBgColor":"#FAD018"},"defaultAvatar":"https://firebasestorage.googleapis.com/v0/b/avada-joy.appspot.com/o/media%2Fnp1fmrUPWVHOWhIfs0oa%2Fprogram%2Fcustom_icons%2F1785227726369-joy%20member%20icon%20sq.jpg?alt=media&token=7e4cb67e-20b7-4e9c-afd9-9df5ff7b61d1"},"balanceLayout":"tile","launcher":{"design":"icon_and_label","icon":"gift","label":"Reward","iconUrl":"","position":"right-bottom","bgColor":"#FAD018","textColor":"#1A1A1A","iconColor":"","showIcon":false,"hideOnMobile":false,"hideCompletely":false,"borderRadius":0,"size":48,"pointBalance":{"labelBgColor":"#FAD018","labelTextColor":"#ffffff","pointBgColor":"#ffffff","pointTextColor":"#222222"}},"display":{"type":"drawer","mobileHeight":"eighty-percent","floatingMargin":16,"programLayout":"tabs","programItemIconSize":0,"textSizeScale":"normal","viewTransition":"slide","hideWidgetButton":false,"showPageBackButton":false,"showOnlyLoggedIn":false,"useMinimalButtons":true,"showWidgetButtonIcon":false},"sections":[{"id":"PROMOTED_COLLECTIONS","enabled":false,"variant":"pill","heading":"","showHeading":true,"showImage":false,"showCount":true,"showSeeAll":false,"collections":[]},{"id":"EARN_TAB","enabled":true,"bannerType":"blank","bannerImage":"","maxItems":4,"sortOrder":"incomplete_first","programOrder":[{"id":"rlIKex7kd4VQuD4szGxn","event":"like_facebook","title":"Like us on Facebook","isShow":true,"position":1},{"id":"oYtdbzibi7QlOFAn1dAh","event":"follow_instagram","title":"Follow us on Instagram","isShow":true,"position":2},{"id":"Dls0GaMQ1RxYm5AvjM14","event":"follow_twitter","title":"Follow us on Twitter","isShow":true,"position":3},{"id":"MlG2cY6ulxG8O3vjNpwL","event":"place_order","title":"Place An Order","isShow":true,"position":0}]},{"id":"REDEEM_TAB","enabled":true,"bannerType":"blank","bannerImage":"","maxItems":5,"sortOrder":"","programOrder":[]},{"id":"COUPONS","enabled":true,"bannerType":"image","bannerImage":"https://cdn.shopify.com/s/files/1/0628/5675/7501/files/2020-01-24_Roosters_BrewingCo_Canning-52.jpg?v=1784634589","bannerHoverEffect":"zoom"},{"id":"REFERRAL","enabled":true,"bannerType":"blank","bannerImage":""},{"id":"ACTIVITIES","enabled":true,"bannerType":"blank","bannerImage":""},{"id":"PRODUCTS","enabled":true,"bannerType":"blank","bannerImage":"","dataSource":"recommendations","personalizeFrom":"auto","fallbackCollectionId":"","fallbackCollectionHandle":"","fallbackCollectionTitle":"","fallbackSort":"best-selling","emptyState":"hide","productHoverEffect":"swap"},{"id":"RECENTLY_VIEWED","enabled":true,"emptyState":"hide","productHoverEffect":"swap"},{"id":"MILESTONE","enabled":true,"bannerType":"blank","bannerImage":""},{"id":"WIDGET_QR","enabled":true,"bannerType":"blank","bannerImage":""},{"id":"WALLET_PASS","enabled":true,"bannerType":"blank","bannerImage":""},{"id":"AOV_BUNDLES","enabled":true,"bannerType":"blank","bannerImage":"","emptyState":"hide","productHoverEffect":"off"},{"id":"SUBSCRIPTION","enabled":false,"bannerType":"blank","bannerImage":"","url":"","openInNewTab":true,"subscription":{"showDiscountedPrice"
10524:false,"showChip":false}},{"id":"SURVEY","enabled":false,"bannerType":"blank","bannerImage":"","url":"","openInNewTab":true},{"id":"WISHLIST","enabled":false,"bannerType":"blank","bannerImage":""},{"id":"REVIEWS","enabled":false,"bannerType":"blank","bannerImage":""}],"popup":{"autoShow":false,"autoShowWithHash":false,"hashValue":"","closeBehavior":"","closeDays":1,"includePage":{"custom":"","default":["home"]},"excludePage":{"custom":"","default":[]},"triggerCondition":"all_products","triggerPages":["home"],"customPage":"","specificProducts":[],"triggerCollectionIds":[394457153789]},"links":{"customLogin":false,"loginUrl":"","signUpUrl":"","replaceAccountLink":false,"accountLinkSelector":"","customEarning":false,"earningUrl":"","openWidgetAfterLogin":true},"terms":{"enabled":false,"url":"","label":"Terms & Conditions","showPrivacy":false,"privacyUrl":"","privacyLabel":"Privacy Policy","showLeadIn":false,"showIcon":false,"icon":"shield-check","showUnderLogin":false},"advanced":{"customCss":"","enableCss":true,"allowRefundCoupon":false,"disableMergePlaceOrder":false},"footerNav":{"displayMode":"icons_labels","style":"pill","items":[{"id":"home","icon":"home","label":"Home","view":"main","enabled":true},{"id":"rewards","icon":"gift","label":"Rewards","view":"coupons","enabled":true},{"id":"orders","icon":"cart","label":"Orders","view":"orders","enabled":true},{"id":"wishlist","icon":"heart","label":"Wishlist","view":"wishlist","enabled":false},{"id":"reviews","icon":"star","label":"Reviews","view":"reviews","enabled":true},{"id":"profile","icon":"user","label":"Profile","view":"profile","enabled":true}]},"profile":{"blocks":[{"id":"environmental-impact","enabled":false},{"id":"account-info","enabled":true,"nameDisplayMode":"fullName","nameOrder":"firstLast"},{"id":"referral-link","enabled":true},{"id":"social-accounts","enabled":true},{"id":"addresses","enabled":true,"defaultCountry":""},{"id":"reviews","enabled":false},{"id":"settings","enabled":true,"showEmailConsent":true,"showSmsConsent":true},{"id":"privacy","enabled":false,"categories":{"analytics":true,"marketing":true,"preferences":true,"sale_of_data":false}},{"id":"logout","enabled":true}]},"extensions":[],"_firstSave":true,"_isSaveSubPosition":false,"pointSingular":"Rooster Booster","pointPlural":"Rooster Boosters","pointPosition":"after","pointLabelMode":"custom","enabledCustomPointLabel":true,"dataPointLabelBackup":{},"showRewardLowestTierBeforeLogin":true,"deductByEarnedTime":false,"pointExpiredAfter":"1Y","hasResetExpirePoint":true,"currencyPosition":"before","allowRefundCoupon":false,"storeCreditExpEnabled":false,"storeCreditExpDuration":"30D","tierEarningRateDisplay":"currentTier","displayStoreCredit":true,"balanceCard":{"enabled":true},"enableRevokeLimit":false,"revokeLimitInterval":"","enableRevokeTimeLimit":false,"revokeTimeLimitDuration":1,"revokeTimeLimitUnit":"","extraCoupons":{"enabled":false,"items":[]}},"settingsReferral":{"id":"UHIErkYsnxyvh5mukbde","smallTitlePopup":"Invite your friends to gain more discounts. For each successful referral, you will get 10% off.","buttonSuccessContent":"Shop now!","iconBubble":"default","brandColor":"#FFD407","iconReferralReward":"gift_box","bigTitlePopup":"Refer & Get 10% Off","type":"branding_referral","titleReferralSuccess":"You got a 10% coupon","textColor":"#000000","descriptionReferralSuccess":"Congrats! Your friend has gifted you a coupon","contentBubble":"Refer & Get 10% Off","iconReferralSuccess":"fireworks","urlIconBubble":"","shopId":"np1fmrUPWVHOWhIfs0oa","referralRewardTitle":"You got a 10% coupon","referralRewardButtonContent":"Claim your gift","createdAt":"2023-01-23T13:17:12.245Z","typeShowPopup":"do_not_show","updatedAt":"2023-01-23T13:31:17.278Z","popupVersion":2},"placeOrderV2":[],"referralProgram":{"customerRewardAppliedCollectionIds":[],"customerRewardOrderReqAmount":0,"customerRewardExpiredAfter":"permanent","friendRewardExpiredAfter":"3M","customerRewardOrderReq":"none","title":"Referrals Programs","type":"referral","friendRewardAppliedCollectionIds":[394457448701,394458890493,394458988797,394457481469,394457350397,394457317629,394459414781,394459939069,394457415933,394459021565,394458923261,405900394749,394457219325,394457252093,394483630333,394457284861,403649724669,394457153789],"friendRewardAppliedTo":"specific","shopId":"np1fmrUPWVHOWhIfs0oa","event":"referral_friend","customerRewardAppliedTo":"all","redirectionUrl":"","createdAt":"2023-01-23T13:41:43.439Z","friendRewardEarnAmount":"10","friendRewardDiscountType":"percentage","customerRewardDiscountType":"point","friendRewardOrderReq":"min_amount","friendRewardOrderReqAmou
10524nt":"30","customerRewardEarnAmount":"300","status":false,"shareSocials":[{"app":"whatsapp","isActive":false,"message":""},{"app":"threads","isActive":false,"message":""},{"app":"facebook","isActive":false,"message":""},{"app":"messenger","isActive":false,"message":""},{"app":"email","isActive":false,"message":""},{"app":"twitter","isActive":false,"message":""}],"enabledAntiCheatFeatures":["antiCheatEmail","antiCheatBrowser"],"updatedAt":"2025-02-18T09:47:09.351Z","id":"hATfVmpLR9w6rYQbozAZ"},"pointCalculator":{},"memberExclusiveDeal":{},"placeOrder":{"status":true,"earnPoint":5,"rateMoney":"1","earnBy":"price","statusUseCondition":true,"typeProductMatch":"all","typeCondition":"all","conditions":[{"field":"title","typeMatch":"contains","content":""}],"excludeProducts":[],"includeProducts":[],"event":"place_order","earnPointsTiers":{"YJo8vx7jIp3tAxsn47c0":{"earnPoint":5}},"appliedPlaceOrderTo":"all","excludeGiftCard":false,"excludeStoreCredit":false,"id":"MlG2cY6ulxG8O3vjNpwL"},"placeOrderSubscription":{},"tierSettings":null,"allTiers":[{"id":"YJo8vx7jIp3tAxsn47c0","isSystemTier":true,"icon":"https://imgur.com/atrkLg3.png","rateMoney":"","iconCustom":"","placedOrderReward":false,"earnPoint":"","createdAt":"2023-02-02T10:22:14.811Z","targetPoint":0,"members":0,"name":"Bronze","systemType":"bronze","shopId":"np1fmrUPWVHOWhIfs0oa","updatedAt":"2023-02-02T10:22:14.811Z","tierRewards":[]},{"id":"zfhF5kF6HAinvmbF0WeI","isSystemTier":true,"rateMoney":"","icon":"https://imgur.com/A2rT5G0.png","iconCustom":"","placedOrderReward":false,"earnPoint":"","createdAt":"2023-02-02T10:22:14.811Z","targetPoint":200,"members":0,"name":"Silver","systemType":"silver","shopId":"np1fmrUPWVHOWhIfs0oa","updatedAt":"2023-02-02T10:22:14.811Z","tierRewards":[]},{"id":"9FXvEkrpQ92DHvw2Us4f","isSystemTier":true,"icon":"https://imgur.com/o8PHej5.png","rateMoney":"","iconCustom":"","placedOrderReward":false,"earnPoint":"","createdAt":"2023-02-02T10:22:14.812Z","targetPoint":500,"members":0,"systemType":"gold","name":"Gold","shopId":"np1fmrUPWVHOWhIfs0oa","updatedAt":"2023-02-02T10:22:14.812Z","tierRewards":[]}],"allTiersB2B":[],"tierProgram":null,"tierB2BProgram":null,"translation":{"shopId":"np1fmrUPWVHOWhIfs0oa","primaryLanguage":"en","createAt":{"_seconds":1693481435,"_nanoseconds":120000000},"embedContent":["en"],"detectMethod":"browserLanguage","additionalLanguages":[],"de":{"[[WidgetV2]]Coupon code":"Gutscheincode:","Hello {{customer_name}}, you currently have ":"Hallo {{customer_name}}, du hast derzeit"},"hi":{"[[WidgetV2]]Coupon code":"à¤à¥à¤ªà¤¨ à¤à¥à¤¡:"},"fi":{"[[WidgetV2]]Coupon code":"Kupongin koodi:","Hello {{customer_name}}, you currently have ":"Hei {{customer_name}}, sinulla on tällä hetkellä"},"ru":{"[[WidgetV2]]Coupon code":"Ðод кÑпона:","Hello {{customer_name}}, you currently have ":"ÐÑивеÑ, {{customer_name}}, Ñ Ð²Ð°Ñ ÑейÑаÑ"},"pt":{"[[WidgetV2]]Coupon code":"Código do cupom:","Hello {{customer_name}}, you currently have ":"Olá {{customer_name}}, você tem atualmente"},"lt":{"[[WidgetV2]]Coupon code":"Kupono kodas:","Hello {{customer_name}}, you currently have ":"Sveiki, {{customer_name}}, Å¡iuo metu turite"},"hr":{"[[WidgetV2]]Coupon code":"Kod kupona:","Hello {{customer_name}}, you currently have ":"Pozdrav {{customer_name}}, trenutno imaÅ¡"},"lv":{"[[WidgetV2]]Coupon code":"Kupona kods:","Hello {{customer_name}}, you currently have ":"Sveiki, {{customer_name}}, jums paÅ¡laik ir"},"fr":{"[[WidgetV2]]Coupon code":"Code promo :","Hello {{customer_name}}, you currently have ":"Bonjour {{customer_name}}, vous avez actuellement"},"hu":{"[[WidgetV2]]Coupon code":"Kuponkód:","Hello {{customer_name}}, you currently have ":"Szia {{customer_name}}, jelenleg van"},"zh-CN":{"Hello {{customer_name}}, you currently have ":"æ¨å¥½ï¼{{customer_name}}ï¼æ¨ç®åæ¥æ"},"uk":{"[[WidgetV2]]Coupon code":"Ðод кÑпона:","Hello {{customer_name}}, you currently have ":"ÐÑивÑÑ, {{customer_name}}, Ñ Ð²Ð°Ñ Ð·Ð°Ñаз Ñ"},"sk":{"[[WidgetV2]]Coupon code":"Kód kupónu:","Hello {{customer_name}}, you currently have ":"Ahoj {{customer_name}}, momentálne máte"},"sl":{"[[WidgetV2]]Coupon code":"Koda kupona:","Hello {{customer_name}}, you currently have ":"Pozdravljeni {{customer_name}}, trenutno imate"},"ga":{"[[WidgetV2]]Coupon code":"Cód cúpóin:","Hello {{customer_name}}, you currently have ":"Dia duit {{customer_name}}, tá agat faoi láthair"},"he-IL":{"[[WidgetV2]]Coupon code":"×§×× ×§×פ××:","Hello {{customer_name}}, you currently have ":"ש××× {{customer_name}}, ×ש ×× ×ר××¢"},"id":{"[[WidgetV2]]Coupon code":"Kode kupon:","Hello {{customer_name}}, you currently have ":"Halo {{customer_name}}, Anda saat ini memiliki"},"ur":{"[[WidgetV2]]Coupon code":"Ú©ÙÙ¾Ù Ú©ÙÚ:","Hello {{customer_name}}, you currently have ":"ÛÛÙÙ {{customer_name}}
10524Ø Ø¢Ù¾ Ú©Û Ù¾Ø§Ø³ ÙÛ Ø§ÙØØ§Ù ÛÛ"},"sr":{"[[WidgetV2]]Coupon code":"Kod kupona:","Hello {{customer_name}}, you currently have ":"Zdravo {{customer_name}}, trenutno imate"},"sv":{"[[WidgetV2]]Coupon code":"Kupongkod:","Hello {{customer_name}}, you currently have ":"Hej {{customer_name}}, du har för närvarande"},"ko":{"[[WidgetV2]]Coupon code":"ì¿ í° ì½ë:","Hello {{customer_name}}, you currently have ":"ìë
íì¸ì, {{customer_name}}ë! íì¬ ë³´ì íê³ ê³ì ê²ì"},"zh-TW":{"Hello {{customer_name}}, you currently have ":"åå {{customer_name}}ï¼æ¨ç®åæ"},"ms":{"[[WidgetV2]]Coupon code":"Kod kupon:","Hello {{customer_name}}, you currently have ":"Helo {{customer_name}}, anda kini mempunyai"},"el":{"[[WidgetV2]]Coupon code":"ÎÏδικÏÏ ÎºÎ¿Ï
ÏονιοÏ:","Hello {{customer_name}}, you currently have ":"Îεια ÏοÏ
{{customer_name}}, αÏ
Ïή Ïη ÏÏιγμή ÎÏειÏ"},"it":{"[[WidgetV2]]Coupon code":"Codice coupon:","Hello {{customer_name}}, you currently have ":"Ciao {{customer_name}}, al momento hai"},"es":{"[[WidgetV2]]Coupon code":"Código de cupón:","Hello {{customer_name}}, you currently have ":"Hola {{customer_name}}, actualmente tienes"},"et":{"[[WidgetV2]]Coupon code":"Kupongi kood:","Hello {{customer_name}}, you currently have ":"Tere, {{customer_name}}, sul on praegu"},"cs":{"[[WidgetV2]]Coupon code":"Kód kupónu:","Hello {{customer_name}}, you currently have ":"Ahoj {{customer_name}}, aktuálnÄ máte"},"ar":{"[[WidgetV2]]Coupon code":"رÙ
ز اÙÙÙØ¨ÙÙ:","Hello {{customer_name}}, you currently have ":"Ù
Ø±ØØ¨Ø§Ù {{customer_name}}Ø ÙØ¯ÙÙ ØØ§ÙÙØ§Ù"},"vi":{"[[WidgetV2]]Coupon code":"Mã giảm giá:","Hello {{customer_name}}, you currently have ":"Chà o {{customer_name}}, bạn hiá»n Äang có"},"nb":{"[[WidgetV2]]Coupon code":"Kupongkode:","Hello {{customer_name}}, you currently have ":"Hei {{customer_name}}, du har for øyeblikket"},"th":{"[[WidgetV2]]Coupon code":"รหัสà¸à¸¹à¸à¸à¸:","Hello {{customer_name}}, you currently have ":"สวัสà¸à¸µ {{customer_name}} à¸à¸à¸°à¸à¸µà¹à¸à¸¸à¸à¸¡à¸µ"},"lb":{"[[WidgetV2]]Coupon code":"Coupon Code:","Hello {{customer_name}}, you currently have ":"Moien {{customer_name}}, du hues de Moment"},"ja":{"[[WidgetV2]]Coupon code":"ã¯ã¼ãã³ã³ã¼ã:"},"ckb":{"[[WidgetV2]]Coupon code":"Ú©ÛØ¯Û Ú©ÙÙ¾ÛÙ:","Hello {{customer_name}}, you currently have ":"سڵا٠{{customer_name}}Ø Ø¦ÛØ³ØªØ§ ØªÛ Ø®Ø§ÙÛÙÛ"},"pl":{"[[WidgetV2]]Coupon code":"Kod kuponu:","Hello {{customer_name}}, you currently have ":"Witaj {{customer_name}}, obecnie masz"},"da":{"[[WidgetV2]]Coupon code":"Kuponkode:","Hello {{customer_name}}, you currently have ":"Hej {{customer_name}}, du har i øjeblikket"},"ro":{"[[WidgetV2]]Coupon code":"Cod cupon:","Hello {{customer_name}}, you currently have ":"BunÄ {{customer_name}}, ai în prezent"},"nl":{"[[WidgetV2]]Coupon code":"Couponcode:","Hello {{customer_name}}, you currently have ":"Hallo {{customer_name}}, je hebt momenteel"},"tr":{"[[WidgetV2]]Coupon code":"Kupon kodu:","Hello {{customer_name}}, you currently have ":"Merhaba {{customer_name}}, Åu anda"},"en":{"[[WidgetV4]]Welcome back":"Welcome back â¨","[[WidgetV4]]Welcome back, {{customer_name}}":"Welcome back, {{customer_name}} â¨","[[WidgetV4]]Welcome to {{program_name}}":"â¨Welcome to {{program_name}}â¨","[[WidgetV4]]Loyalty Program":"Rooster's Brewing Rewards","[[WidgetV2]]Coupon code":"Coupon code:","Hello {{customer_name}}, you currently have ":"Hello {{customer_name}}, you currently have","Get rewards for being our customers":"Shop. Earn. Redeem.","Join and Earn Rewards":"Sup & Save","Join Program":"Boost Now","Welcome to our store":"Rooster Booster"},"updateAt":{"_seconds":1784951817,"_nanoseconds":821000000},"record_id":"0WXyurJwOOWuivhE8D7D"},"checkoutCoupons":[],"settingSignUpBlock":{"shopId":"np1fmrUPWVHOWhIfs0oa","type":"branding_signup_block","heading":"Claim your points!","content":"You have earned {{point}} {{loyalty_point}}. Join our loyalty programs to receive reward","contentButtonSignUp":"Join program","contentButtonLogin":"Sign in","loginDescription":"Already a member?"},"interactWebsiteProgram":null,"settingsBrandingReminder":{"shopId":"np1fmrUPWVHOWhIfs0oa","type":"branding_proactive_reminder","showUnusedDiscount":false,"unusedDiscountHeading":"Hi {{customer_name}}, you currently have a discount","unusedDiscountButton":"Add to cart","showRewardRedemption":false,"rewardRedemptionHeading":"Hello {{customer_name}}, you currently have","rewardRedemptionButton":"Redeem now","rewardRedemptionButtonLink":"","rewardRedemptionContent":"Your points are enough to redeem our rewards! Use them now to claim amazing gifts!","showMilestoneAchieved":false,"milestoneAchievedHeading":"Milestone unlocked!","milestoneAchievedSubtitle":"You've completed {{completed_steps}}/{{total_steps}} milestones in {{journey_name}}.","milestoneAchievedRewardLabel":"Your rewards: {{reward_description}}","milestoneAchievedContent":"Keep shopping to unlock more milestones.","milestoneAchievedButton":"View my rewards","milestoneAchievedMaxDisplay":3,"milestoneAchievedPriority":[],"reminderDisplayMode":"highest_priority","autoCloseAfter":0,"floatBtnPosition":"left-bottom","selectPage":["home","product","cart"],"reminderPriority":[{"id":"reward_birthday","title":"Birthday reward"},{"id":"milestone_achieved","title":"Milestone achieved"},{"id":"unused_discount","title":"Unused discount"},{"id":"reward_redemption","title":"Reward redemption"}
10524,{"id":"interact_website","title":"Visit website"}],"iconPopup":"icon_popup_money","iconPopupUrl":"","visitWebsiteId":"sjvO6mDEbiLqi6fvITe9"},"settingsInteractWebsite":{"id":"sjvO6mDEbiLqi6fvITe9","type":"branding_interact_website","textColor":"#036B87","backgroundColor":"#FFFFFF","actionBgColor":"#036B87","actionTextColor":"#FFFFFF","textActionBeforeSignIn":"Login","textActionAfterSignIn":"Claim {{earned_points}} {{loyalty_point}}","textBeforeSignIn":"Thanks for visiting! Log in to claim your {{earned_points}} {{loyalty_point}} reward!","textAfterSignIn":"Youâve received {{earned_points}} {{loyalty_point}} for visiting our store today","streakTitleBeforeSignIn":"7-day streak!","streakDescriptionBeforeSignIn":"Start your visit streak today!","streakTextActionBeforeSignIn":"Login to receive","streakTitleAfterSignIn":"Keep it up!","streakDescriptionAfterSignIn":"Keep your momentum to unlock greater rewards.","streakTextActionAfterSignIn":"Claim {{earned_points}} {{loyalty_point}}","iconPopup":"icon_popup_money","iconPopupUrl":"","isAutoClosePopUp":false,"closingPopUpTime":60,"frequencyShowPopup":1,"floatBtnPosition":"left-bottom","updatedAt":"2025-04-08T11:16:42.798Z","createdAt":"2025-04-08T11:16:42.798Z","shopId":"np1fmrUPWVHOWhIfs0oa"},"loyaltyHubBranding":{"shopId":"np1fmrUPWVHOWhIfs0oa","type":"branding_loyalty_hub","pageHeading":"","pageSubheading":"","heroImage":"","heroImagePosition":"center","heroImageHeight":200,"showBalanceSection":true,"showImpactSection":true,"showRewardsSection":true,"showEarnSection":true,"showRedeemSection":true,"showVipSection":true,"showReferralSection":true,"showWalletSection":true,"showActivitySection":true,"sectionOrder":["balance","impact","rewards","earn","redeem","vip","referral","wallet","activity"]},"programsMemberExclusiveDeal":[],"linkAccountRewardEnabled":false,"linkAccountRewardPoints":0,"redeemInlineConfig":{"behavior":{"hideForGuest":false,"hideNotEnoughPoint":false,"detailViewLayout":false,"hasEnableCancel":true,"enableRevokeDiscountApplyFailed":true,"showPointsInput":true,"preferHigherValueReward":false},"position":{"mode":"above_cart_summary","customType":"snippet","cssSelector":""},"design":{}}},z=(i,t)=>(i||[]).map((id,k)=>({id,title:t[k]})),p=null,c=[];window.AVADA_JOY={...m,moneyFormat:"£{{amount}}",moneyWithCurrencyFormat:"£{{amount}} GBP",useMoneyWithCurrencyFormat:!!(m.shop&&m.shop.useMoneyWithCurrencyFormat),product:p,cartProducts:c,cartInfo:{"note":null,"attributes":{},"original_total_price":0,"total_price":0,"total_discount":0,"total_weight":0.0,"item_count":0,"items":[],"requires_shipping":false,"currency":"GBP","items_subtotal_price":0,"cart_level_discount_applications":[],"checkout_charge_amount":0},account_enabled:"true",login_url:"\/customer_authentication\/login?return_to=%2Fsearch\u0026locale=en\u0026ui_hint=full\u0026region_country=GB",register_url:"https:\/\/shopify.com\/62856757501\/account?locale=en\u0026region_country=GB\u0026buyer_flags=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJyb29zdGVyc2JyZXdpbmdjby5teXNob3BpZnkuY29tIiwiZmxhZ3MiOltdLCJleHAiOjE3OTE1NDk4ODYsIm5iZiI6MTc5MDk0NTA4Nn0.-SRGuG8kwzaBAeEQ15f-sNkfgHuj5KV_AUgJoX15JkM",account_url:"\/account",customer:{id:null,email:null,first_name:null,last_name:null,default_address:null,hash:"68a27faf88b56dc0557f63c310c629cfb083228e117556656f9b1fca16f6b8e0",isCustomerB2B:null,tags:null,phone:null,state:null,tax_exempt:null,orders_count:null},page:"search",points:null,data_mkd:null,tier:null,isWhitelistReferral:!!m.isWhitelistReferral}}}catch(e){console.error('Error assigning avada joy variable',e)}</script>
10524 10525<!-- END app snippet --> 10526<!-- BEGIN app snippet: joy-account-links --><!-- END app snippet --> 10527<div id="joy-shop-login-btn-container" style="display:none">
10527<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.shop-login-button.en.esm.js"></script>
vendor: 1 bytes, line 10527
10527
10528<script type="module"> 10529 await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.shop-login-button.en.esm.js"); 10530 10531 10532</script>
10532 10533 10534<shop-login-button ux-mode="windoid" return-uri="https://www.roosters.co.uk/account/redirect" proxy="true" proxy-core-idp="true" redirect-type="iframe" response-type="code"></shop-login-button> 10535</div> 10536 10537</div>
10537<script src="https://cdn.shopify.com/storefront/standard-actions.js" type="module" data-source-attribution="shopify.standard_actions"></script>
10537 10538</body> 10539 10540 10541 10542 10543 10544 10545 10546 10547<!-- LAYOUTHUB-V2-FOOTER --> 10548 10549 10550<!-- START LAYOUTHUB POPUP BUILDER --> 10551<!-- END LAYOUTHUB POPUP BUILDER --> 10552<!-- END LAYOUTHUB-V2-FOOTER --> 10553</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.