1 2 3<!DOCTYPE html> 4<html lang="en" class="wide wow-animation desktop landscape rd-navbar-static-linked"> 5<head> 6 7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 8 <title>Pizza & Burger Delivery in Blakeney | Order Online | Sabo Yes </title> 9 <meta name="format-detection" content="telephone=no" /> 10<meta name="description" content="Order pizza &amp; burger in Blakeney from Sabo Yes. Fast delivery and collection available.">
11<script type="application/ld+json"> 12{"@context":"https://schema.org","@type":"FastFoodRestaurant","name":"Sabo Yes","url":"https://saboyesblakeney.co.uk","hasMenu":"https://saboyesblakeney.co.uk/menu","image":"https://saboyesblakeney.co.uk/sitelogo/sitelogo.png","telephone":"01594 800304","servesCuisine":"Pizza & Burger","address":{"@type":"PostalAddress","streetAddress":"Kings Head, High St","addressLocality":"Blakeney","postalCode":"GL15 4EB","addressCountry":"GB"},"geo":{"@type":"GeoCoordinates","latitude":"51.760448","longitude":"-2.478460"},"openingHoursSpecification":[{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Sunday","opens":"09:00","closes":"22:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Monday","opens":"09:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Tuesday","opens":"09:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Wednesday","opens":"09:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Thursday","opens":"09:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Friday","opens":"09:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Saturday","opens":"09:00","closes":"22:30"}]} 13</script>
13 14 15 16 <meta name="viewport" content="width=device-width, initial-scale=1"> 17 <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 18 <meta name="theme-color"> 19 <link rel="icon" href="data:;base64,="> 20 <meta charset="utf-8" /> 21 <link rel="stylesheet" type="text/css" href="css/style.css" /> 22 <link href="css/theme.css?v=5" rel="stylesheet"> 23 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,100"> 24 25 <meta name="appleid-signin-client-id" content="com.boostit.appleSignIn2"> 26 <meta name="appleid-signin-scope" content="name email"> 27 <meta name="appleid-signin-redirect-uri" content="https://saboyesblakeney.co.uk/auth/apple/callback"> 28 <meta name="appleid-signin-state" content="origin:web"> 29 <meta name="appleid-signin-use-popup" content="true"> 30 31 <style> 32 33 34.rowff .col-xs-6{ 35width: 50% !important; 36} 37 38.rowff .col-xs-12{ 39text-align:center; 40} 41 42 #appleid-signin{ 43 width: 235px; 44 height: 50px; 45 text-align: center; 46 display: inline-block; 47 48 width: 235px; 49 height: 51px; 50 text-align: center; 51 display: inline-block; 52 background: black; 53 line-height: 50px; 54 display: -webkit-inline-box; 55 /* margin-top: -10px; */ 56 padding: 5px 0px; 57 border-radius: 8px; 58 59 } 60 61 62 63 64 .appleid-signin{ 65 width: 235px; 66 height: 50px; 67 text-align: center; 68 display: inline-block; 69 70 width: 235px; 71 height: 51px; 72 text-align: center; 73 display: inline-block; 74 background: black; 75 line-height: 50px; 76 display: -webkit-inline-box; 77 /* margin-top: -10px; */ 78 padding: 5px 0px; 79 border-radius: 8px; 80 81 } 82 83 .appleButton { 84 width: 245px; 85 height: 56px; 86 background: black; 87 border: none; 88 border-radius: 8px; 89 padding: 5px 0; 90 cursor: pointer; 91 display: inline-flex; 92 justify-content: center; 93 align-items: center; 94} 95 96.appleButton img { 97 width: auto; 98 /* height: 58px; */ 99 display: block; 100 transform: scale(1.35); 101} 102.s2x1y1{ 103 overflow-x: hidden; 104} 105 106.s2x1y1ios{ 107 overflow-x: hidden; 108} 109 110 111 112 113 114 .social-btn .btn { 115 border: none; 116 margin: 10px 3px 0; 117 opacity: 1; 118 width: 45%; 119 height: 47px; 120 padding: 12px 27px; 121 font-size: 14px; 122 border-radius: 9px; 123 } 124 125 </style> 126 127</head> 128 129<body> 130 131 <div id="modalArea"></div> 132 <div id="modalArea3"></div> 133 134
135 <div class="page"> 136 <div class="page-loader" style="background:black;"> 137 <div class="page-loader-body"> 138 <div class="cssload-container"> 139 <img src="/sitelogo/sitelogo.png" style="margin-top:-150px; "> 140 </div> 141 </div> 142 </div> 143 </div> 144 <header class="page-head"> 145 <div class="rd-navbar-wrap rd-navbar-minimal"> 146 <nav data-layout="rd-navbar-fixed" data-sm-layout="rd-navbar-fixed" data-md-device-layout="rd-navbar-fixed" 147 data-lg-layout="rd-navbar-static" data-lg-device-layout="rd-navbar-static" data-stick-up-clone="false" 148 data-md-stick-up-offset="100px" data-lg-stick-up-offset="100px" class="rd-navbar"> 149 <div class="shell shell-fluid"> 150 <div class="rd-navbar-inner"> 151 <!-- RD Navbar Panel--> 152 <div class="rd-navbar-panel"> 153 <!-- RD Navbar Toggle--> 154 <button data-rd-navbar-toggle=".rd-navbar-nav-wrap" class="rd-navbar-toggle"> 155 <span></span> 156 </button> 157 <a href="/menu" class="rd-navbar-brand brand" id="menuhxy"> 158 <div class="brand-logo" > 159 <img src="/sitelogo/sitelogo.png" style="height: 44px; margin-top: -2px;" alt=""> 160 </div> 161 </a> 162 <div class=" rd-navbar-brand brand" id="cartdivision" onclick="enableCart();"> 163 <div class="shop-cardt"> 164 <!-- <i class="thin-icon-cartShop icon-basket-general"></i> --> 165 166 <svg width="30" height="30" viewBox="0 0 24 24" fill="" stroke="green" stroke-width="2.0" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="margin-right:4px;"> 167 <circle cx="9" cy="21" r="1"></circle> 168 <circle cx="20" cy="21" r="1"></circle> 169 <path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.4L23 6H6"></path> 170</svg> 171 172 173 <!-- <svg class="nav-iconx" viewBox="0 0 24 24" aria-hidden="true"> 174 <path d="M3 6h18M3 12h18M3 18h18" 175 stroke="currentColor" 176 stroke-width="2.5" 177 stroke-linecap="round"/> 178</svg> --> 179 180 181 <a id="basketShow" class="basketClass basketxyz" style="display:inline;">0 Items </a> 182 </div> 183 </div> 184 </div> 185 <div class="rd-navbar-nav-wrap"> 186 <ul class="rd-navbar-nav"> 187 <li id="menlink"> 188 <a href="/menu" class="navbar-iconx"> 189 190<svg class="nav-iconx" viewBox="0 0 24 24" aria-hidden="true"> 191 <path d="M6 2v8M9 2v8M6 6h3M7.5 10v12" 192 stroke="currentColor" 193 stroke-width="1.8" 194 stroke-linecap="round"/> 195 196 <path d="M14 2c0 4 4 4 4 8v12" 197 stroke="currentColor" 198 stroke-width="1.8" 199 stroke-linecap="round"/> 200</svg> 201 <span>MENU</span> 202 203 </a> 204</li> 205 <li> 206 207 208 209 210<a href="/checkout" class="navbar-iconx"> 211 <span class="checkout-svg-wrap"> 212 <svg class="nav-iconx" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"> 213 <circle cx="9" cy="21" r="1"></circle> 214 <circle cx="20" cy="21" r="1"></circle> 215 <path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.4L23 6H6"></path> 216 </svg> 217 </span> 218 <span class="checkout-text">CHECKOUT</span> 219</a> 220 221 222</li> 223 224 <li> 225 <a class="navbar-icon thin-icon-key" data-toggle="modal" data-target="#loginModal">Login </a> 226 </li> 227 <li> 228 <a class="navbar-icon thin-icon-layers" data-toggle="modal" data-target="#registerModal">Register </a> 229 </li> 230 231 232 233 <li> 234 <a href="/contact" class="navbar-iconx"> 235 <span class="checkout-svg-wrap"> 236 <svg class="nav-iconx" viewBox="0 0 24 24"> 237 <rect x="3" y="5" width="18" height="14" stroke="currentColor" stroke-width="1.8" fill="none"/> 238 <path d="M3 7l9 6 9-6" stroke="currentColor" stroke-width="1.8" fill="none"/> 239 </svg> 240 </span> 241 <span class="checkout-text">Contact</span> 242 </a> 243</li> 244 245 246 247 <li> 248 <a class="navbar-iconx" href="tel:01594 800304"> 249 <span class="checkout-svg-wrap"> 250 <svg class="nav-iconx" viewBox="0 0 24 24"> 251 <path d="M22 16.9v3a2 2 0 0 1-2.2 2 252 19.8 19.8 0 0 1-8.6-3.1 253 19.5 19.5 0 0 1-6-6 254 19.8 19.8 0 0 1-3.1-8.7A2 2 0 0 1 4.1 2h3 255 a2 2 0 0 1 2 1.7c.1.8.3 1.5.6 2.2 256 a2 2 0 0 1-.5 2.1L8 9 257 a16 16 0 0 0 6 6l1-1.2
258 a2 2 0 0 1 2.1-.5c.7.3 1.4.5 2.2.6 259 a2 2 0 0 1 1.7 2z" 260 stroke="currentColor" stroke-width="1.8" fill="none"/> 261 </svg> 262 </span> 263 <span class="checkout-text">01594 800304</span> 264 </a> 265</li> 266 267 268 269 </ul> 270 </div> 271 </div> 272 </div> 273 </nav> 274 </div> 275 </header> 276 277 278 279 280 281 <style> 282 .select2-selection__rendered { 283 display: none; 284 } 285 286 #mainWrapper { 287 margin-top: 40px; 288 } 289 290 .contactHeader { 291 font-size: 16px; 292 margin-top: 50px !important; 293 padding: 0px 32px 0px 50px; 294 } 295 296 .cheader { 297 font-size: 16px; 298 margin-top: 10px !important; 299 font-weight: 500 !important; 300 } 301 302 input { 303 padding: 0 18px !important; 304 } 305 306 @media (max-width: 767px) { 307 .namec { 308 margin-top: 10px; 309 } 310 } 311 312 body { 313 background: #f4f2ed; 314 } 315 316 .shop-checkout-left { 317 background: #f4f2ed; 318 } 319 320 321 .wrapform { 322 display: inline-block; 323 } 324 325 .callus { 326 color: red; 327 margin: 5px 10px 15px 10px; 328 text-align: center; 329 font-weight: 700; 330 } 331 332 .timeSelect { 333 width: 93%; 334 } 335 336 .inputlabels { 337 width: 94% !important; 338 } 339 340 #messageCustomer { 341 width: 94% !important; 342 } 343 </style> 344 <div class="row" id="mainWrapper"> 345 <div class="contactHeader "> 346 <h1 class="cheader"> If you have a problem or question about your order please call the shop</h1> 347 <h1 class="cheader" style="color:red;"> 01594 800304 </h1> 348 <br> 349 <!-- <div class="wrapform"> 350 <h1 class="cheader text-left" style="margin-top:25px !important;"> <strong> You can alternatively use the form if you have any : </strong> 351 <li style="margin-top:10px;">payment related questions</li> 352 <li> website bugs 353 <li style="margin-bottom:10px;"> ordering recommendations </li> 354 You can also win free prizes or discounts for bug reports or recommendations. 355 </h1> 356 <h1 class="cheader " style="margin-top:-7px !important; text-align:left; ">We will try to reply your message as soon as possible.</h1> 357 </div> --> 358 359 <br> 360 361 </div> 362 363 364 <h4 class="font-default text-center" style="margin-top:40px;">You have to be logged in </h4> 365 <div class="col-xs-12" style="margin-bottom:50px;"> 366 <a class="btn btn-burnt-sienna btn-md btn-shape-circle offset-top-20 addButton" href="#" data-toggle="modal" data-target="#registerModal" style="width: 140px; padding:10px 39px;">Register</a> 367 <a class="btn btn-burnt-sienna btn-md btn-shape-circle offset-top-20 addButton margin-top:0;" href="#" data-toggle="modal" data-target="#loginModal" style="width: 140px; padding:10px 39px;">Login</a> 368 </div> 369 370 </div> 371 <!-- End Main --> 372 373<footer id="footer"> 374 <div class="footer-part text-center" > 375 <span> 376 <a onclick="window.open('/allergy', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')" style="color:#fff;">Allergen Information</a> 377 </span> 378 379 <h6 style="color:red">Open 7 Days a week.</h6> 380 381 <h6 style="color:white; font-size:16px; font-weight: 400;">Download our applications or use our webpage to place order.</h6> 382<div class="rowff"> 383 <div class="col-xs-12"> <a class="btn btn-burnt-sienna btn-md btn-shape-circle offset-top-20 addButton navbar-icon thin-icon-house website" href="/menu">Menu</a> </div><div class="col-xs-6" style="text-align: right;"> <a href="https://play.google.com/store/apps/details?id=com.boost_it.saboyesblakeney"><img src="https://rookcala.sirv.com/playStore.png" style="height:43px;"></a></div><div class="col-xs-6" style="text-align: left;"> <a href="https://apps.apple.com/us/app/sabo-yes-blakeney/id6743772187"><img src="https://rookcala.sirv.com/appStore.png" style="height:43px;"></a></div> 384</div> 385 <div class="container"> 386 <div class="footer-inner"> 387 <div class="footer-info"> 388 <div class="brand-logo" style="margin-top:10px; margin-bottom:10px;"> 389 <img src="/sitelogo/sitelogo.png" height="60px" style="margin-bottom:6px;"> 390 </div> 391 <p>Kings Head, High St,Blakeney,GL15 4EB</p> 392 <p> 393 <a href="tel:01594 800304" style="font-size:14px;" id="shopTel">01594 800304</a> 394 </p> 395 </div> 396 </div> 397 <div class="copy-right"> 398 <div class="row"> 399 <div class="col-md-12 col-sm-12 col-xs-12 text-center ">
400 <span> 401 <a onclick="window.open('/copyright', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')">Copyright Sabo Yes All Rights Reserved.</a> 402 </span> 403 <br> 404 <span> 405 <a onclick="window.open('/terms', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')" style="color:#fff;">Terms & Conditions</a> 406 </span><br> 407 <span> 408 <a onclick="window.open('/disclaimer', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')" style="color:#fff;">Service Disclaimer</a> 409 </span> 410 </div> 411 </div> 412 </div> 413 </div> 414 </div> 415 <div id="cookieConsent" style="position: fixed; bottom: 45px; background-color: #272626; width: 100%; text-align: center; color:#fff; font-weight: 400; display:none;"> 416 This website is using cookies for better browsing experience.<button class="cookieConsentOK" style=" background: #822222; border: none; border-radius: 5px;">I agree.</button> 417 <h>Click here for our <a href="/terms">Cookie Policy</a></h> 418</div> 419</footer> 420 421 422 <div class="modal fade " id="popupModal" tabindex="-1" role="dialog" aria-labelledby="popupModal"> 423 <div class="modal-dialog modal-sm popupxx" role="dialog"> 424 <div class="modal-content" style="margin-top: 5%; overflow: hidden;"> 425 <div class="modal-body modal-bodyxx popupbodyxx" style="background:white;"> 426 <button type="button" class="close_new2x" data-dismiss="modal" aria-label="Close" style="top: 10px;"> Ã </button> 427 <div class="table-title" style="margin-bottom: 0px; margin-top:8px;"> 428 <h2 class="cartclass">Shopping Cart </h2> 429 430 <div class="cartwrap"> 431 <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="green" stroke-width="2.0" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="margin-right:4px;"> 432 <circle cx="9" cy="21" r="1"></circle> 433 <circle cx="20" cy="21" r="1"></circle> 434 <path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.4L23 6H6"></path> 435</svg> 436 <p id="basketShow2" class="basketxyz"> </p> 437 </div> 438 </div> 439 <div class="cart-wdrap" id="cart-blogs" style="margin-top:10px;"> 440 <div class="cart-blog row " id="cartPopUp" > 441 <div class="cart-btn col-xs-12" style=" margin-bottom: 20px; width:100%;"> 442 <!-- <a href="javascript:;" onclick="clearCarts();" class="btn-black cartMainButtons" >Clear Cart</a> --> 443 444 445 446 <a href="/checkout" class="btn-main cartMainButtons"> CHECK OUT <span class="arrow">â</span></a> 447 448 449 </div> 450 <div class="cartpopupitems popupxyz" id="cartPopUpx"></div> 451 </div> 452 </div> 453 </div> 454 </div> 455 </div> 456</div> 457 458 459 460<div class="modal fade " id="optionmodal" tabindex="-1" role="dialog" aria-labelledby="optionmodal" style="z-index: 99999999999 !important;"> 461 <div class="modal-dialog modal-sm" role="dialog"> 462 <div class="modal-content" style="margin-top: 5%; padding:46px; background:transparent; border:none;"> 463 <div class="modal-body" style="background:white; margin-top: 3px !important;"> 464 <div class="cart-wdrap" id="optionsmenu"> 465 </div> 466 </div> 467 </div> 468 </div> 469</div> 470 471<div class="modal fade " id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModal"> 472 <div class="modal-dialog modal-sm loginModalx" role="dialog"> 473 <div class="modal-content modal-contentx" style="margin-top: 30%;"> 474 <div class="modal-body modal-bodyx modal-logx" style=" padding: 2px 3px 3px 3px;"> 475 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 476 <div class="table-title"> 477 <h2 class="headersLog">Login</h2> 478 <h6 class="heade-xs btn lpassword" onclick="lostPassword();" style="color:red; margin-bottom: -15px;" id="lostPasswordOpen">Lost your password ? Click Here</h6> 479 </div> 480 <form class="form" id="loginForms"> 481 <div class="row" id="loginForm"> 482 483 484 <div class="col-md-12 col-sm-12 col-xs-12" style="position:relative;"> 485 486 <span class="icony"> 487 <svg viewBox="0 0 24 24"> 488 <rect x="3" y="5" width="18" height="14"></rect> 489 <path d="M3 7l9 6 9-6"></path> 490 </svg> 491 </span> 492 493 <input type="text" 494 name="username" 495 placeholder="Your E-Mail" 496 class="input-fields with-icon" 497 id="username2" 498 style="text-transform: lowercase;"> 499 500</div> 501 502 503 <div class="col-md-12 col-sm-12 col-xs-12" style="position:relative;"> 504 505 <!-- LOCK ICON --> 506 <span class="icony"> 507 <svg viewBox="0 0 24 24"> 508 <rect x="5" y="11" width="14" height="9"></rect> 509 <path d="M8 11V8a4 4 0 0 1 8 0v3"></path> 510 </svg> 511 </span> 512 513 <!-- INPUT --> 514 <input type="text" 515 name="search" 516 placeholder="Password" 517 class="input-fields with-icon passfield" 518 id="password2" 519 onfocus="this.type='password'" 520 autocorrect="off" 521 autocapitalize="none"> 522 523 <!-- EYE ICON --> 524 <span class="eye-toggle" onclick="togglePasswordField(this)"> 525 <svg viewBox="0 0 24 24"> 526 <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"/> 527 <circle cx="12" cy="12" r="3"/> 528 </svg> 529 </span> 530 531</div> 532 533 534 535 536 <div class="or-left"></div><div class="or-right"></div> 537 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-top:8px;"> 538 <input type="submit" name="submit" class="btn-main submitButtons" value="Login" style=" width:100%; margin-bottom:18px;" id="loginButton1"> 539 </div> 540 541 <div class="or-seperatorx1" style=" margin: 16px 20px 0 20px !important; font-size:14px;"><i>New Customer? </i></div> 542 543 544 <div class="col-xs-12 " > 545 <a class="btn registerB" href="#" style="font-size:16px; margin-bottom:4px;" onclick="regModal();"> Register</a> 546 </div> 547 548 549 <div class="col-md-12 col-sm-12 col-xs-12" id="socialLoginsx"> 550 <div class="or-seperator" style="margin-top:14px !important;"><i>or</i></div> 551 <p class="text-center xxc" style="height:27px !important;">Login with your social media account</p> 552 <div class="text-center social-btn"> 553 <div class="fb-login-button" data-width="" data-size="large" data-button-type="continue_with" data-layout="default" data-auto-logout-link="false" data-use-continue-as="false"></div> 554 555 556 <div id="appleid-signin" data-color="black" data-border="true" data-type="sign in"></div> 557
557<script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script>
557 558 559 560 <a href="/auth/facebook" class="btn btn-primary"><i class="fa fa-facebook"></i> Facebook</a> 561 <a href="/auth/google" class="btn btn-danger"><i class="fa fa-google-plus"></i> Google</a> 562 </div> 563 564 <h1 class="terms" style="margin-top:10px;"> By logging via social platforms you accept the <a onclick="termsconditions();">terms & conditions</a></h1> 565 566 </div> 567 568 <!-- --> 569 </div> 570 </form> 571 </div> 572 </div> 573 </div> 574</div> 575 576<div class="modal fade " id="fgModal" tabindex="-1" role="dialog" aria-labelledby="fgModal"> 577 <div class="modal-dialog modal-sm modal-dialogx" role="dialog"> 578 <div class="modal-content modal-contentx" style="margin-top: 30%;"> 579 <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;"> 580 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 581 <form class="form" id="sendForgottenForm"> 582 <h2 class="heade-xs2">Please enter your email and follow the instructions</h2> 583 584 <div id="lostPassword"> 585 586 <div class="col-md-12 col-sm-12 col-xs-12"> 587 <span class="icony"> 588 <svg viewBox="0 0 24 24"> 589 <rect x="3" y="5" width="18" height="14"></rect> 590 <path d="M3 7l9 6 9-6"></path> 591 </svg> 592 </span> 593 594 595 <input type="text" name="email" placeholder="Your E-Mail" class="input-fields" id="forgetEmail"> 596 </div> 597 598 599 <div class="col-md-12 col-sm-12 col-xs-12"> 600 <input type="submit" name="submit" class="btn-main submitButtons" value="Send Reset Link" style="width:100%;" id="resetlinkbutton"> 601 </div> 602 </form> 603 <form class="form" id="changefpassword"> 604 <div class="col-md-12 col-sm-12 col-xs-12"> 605 <h2 class="headersLogx">Enter the code sent to you by email or follow the link in the email to change your password</h2> 606 </div> 607 <div class="col-md-12 col-sm-12 col-xs-12"> 608 <span class="icony"> 609 <svg viewBox="0 0 24 24"> 610 <rect x="3" y="5" width="18" height="14"></rect> 611 <path d="M3 7l9 6 9-6"></path> 612 </svg> 613 </span> <input type="text" name="email" placeholder="Your E-Mail" class="input-fields" id="forgetEmailxx" required> 614 </div> 615 <div class="col-md-12 col-sm-12 col-xs-12"> 616 617 <span class="icony"> 618 <svg viewBox="0 0 24 24"> 619 <path d="M10 3L8 21"></path> 620 <path d="M16 3L14 21"></path> 621 <path d="M4 9h17"></path> 622 <path d="M3 15h17"></path> 623 </svg> 624</span> 625 626 <input type="text" name="number" placeholder="Reset Code" class="input-fields" id="resetcode" required> 627 </div> 628 <div class="col-md-12 col-sm-12 col-xs-12"> 629 630 631 <span class="icony"> 632 <svg viewBox="0 0 24 24"> 633 <rect x="5" y="11" width="14" height="9"></rect> 634 <path d="M8 11V8a4 4 0 0 1 8 0v3"></path> 635 </svg> 636 </span> 637 638 <input type="text" name="search" placeholder="Password" class="input-fields passfield" id="password1xx" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> 639 640 <span class="eye-toggle" onclick="togglePasswordField(this)"> 641 <svg viewBox="0 0 24 24"> 642 <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"/> 643 <circle cx="12" cy="12" r="3"/> 644 </svg> 645 </span> 646 </div> 647 <div class="col-md-12 col-sm-12 col-xs-12"> 648 <span class="icony"> 649 <svg viewBox="0 0 24 24"> 650 <rect x="5" y="11" width="14" height="9"></rect> 651 <path d="M8 11V8a4 4 0 0 1 8 0v3"></path> 652 </svg> 653 </span> 654 655 656 <input type="text" name="search" placeholder="Confirm Password" class="input-fields passfield" id="verifypassword1xx" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> 657 658 <span class="eye-toggle" onclick="togglePasswordField(this)"> 659 <svg viewBox="0 0 24 24"> 660 <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"/> 661 <circle cx="12" cy="12" r="3"/> 662 </svg> 663 </span> 664 665 </div> 666 <div class="col-md-12 col-sm-12 col-xs-12" style="padding-bottom:20px;"> 667 <input type="submit" name="submit" class="btn-main submitButtons" value="Change Password" style="width:100%;" onclik="changefpassword();"> 668 </div> 669 </form> 670 </div> 671 </div> 672 </div> 673</div> 674</div> 675 676<div class="modal fade" id="appAlert" tabindex="-1" role="dialog" aria-labelledby="appAlert"> 677 <div class="modal-dialog modal-sm" role="dialog"> 678 <div class="modal-content" style="background: transparent; border: none;"> 679 <div class="modal-body" style="padding: 4px;"> 680 <div class="yes-no" style="min-height: 130px;"> 681 <h2 class="coolal-title" id="appAlertTitle"></h2> 682 <p class="coolal-text" id="appAlertText"></p> 683 684 <div id="appAlertFooter" class="coolal-btnWrapper"> 685 <a href="javascript:;" class="coolal-yes" data-dismiss="modal">OK</a> 686 </div> 687 </div> 688 </div> 689 </div> 690 </div> 691</div> 692 693 694<div class="modal fade " id="iosAlert" tabindex="-1" role="dialog" aria-labelledby="iosAlert"> 695 <div class="modal-dialog modal-sm" role="dialog"> 696 <div class="modal-content" style="background: transparent; border:none;"> 697 <div class="modal-body" style=" padding: 2px 3px 3px 3px; "> 698 <div id="coolal" class="yes-no" style="height: 154px; opacity: 1; top: 0px;"> 699 <h2 class="coolal-title"id="titlex1"></h2> 700 <p class="coolal-text" id="textx1"> 701 </p> 702 <div id="coolal-btnWrapper" data-dismiss="modal" aria-label="Close"><a id="coolal-btn" class="coolal-yes-no coolal-yes" href="#" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close">OK</a> </div> 703 </div> 704 </div> 705 </div> 706 </div> 707</div> 708 709<div class="modal fade " id="iosAlertx" tabindex="-1" role="dialog" aria-labelledby="iosAlertx"> 710 <div class="modal-dialog modal-sm modal-dialogx" role="dialog"> 711 <div class="modal-content modal-contentx" style="background: transparent;">
712 <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;"> 713 <div id="coolal" class="yes-no" style="height: 135px; opacity: 1; top: 0px; height: max-content !important;"> 714 <h2 class="coolal-title" id="titlex"></h2> 715 <p class="coolal-text" id="textx"></p> 716 <div id="coolal-btnWrapperx"> 717 718 </div> 719 </div> 720 </div> 721 </div> 722 </div> 723</div> 724 725 726 727 728<div class="modal fade " id="telephoneModal" tabindex="-1" role="dialog" aria-labelledby="telephoneModal"> 729 <div class="modal-dialog modal-sm modal-dialogx profileModalxx" role="dialog"> 730 <div class="modal-content modal-contentx contentxx"> 731 <div class="modal-body modal-bodyx modal-telx" style=" padding: 2px 3px 3px 3px;"> 732 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 733 <form id="telephoneForm"> 734 <div class="row"> 735 736 737 738 <div class="col-md-12 col-sm-12 table-titlex"> 739 <h6 class="heade-xs2" id="profilxtel">Please update your phone number and name in case we need to contact you regarding to your order</h6> 740 <h6 class="heade-xs2" id="telxtel" style="display:none;">Update your phone number</h6> 741 </div> 742 743 744 745 746 747 <div class="col-md-12 col-sm-12 col-xs-12" id="telephoneModalName"> 748 <label for="contactName3x" class="field-label">Name</label> 749 <i class="fa fa-icon-name1 icon-classes-general"></i> <input type="text" name="contactName3x" placeholder="Name" class="input-fields" id="contactName3x" required> 750 </div> 751 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:30px;"> 752 <label for="telephone3x" class="field-label">Telephone</label> 753 <i class="fa fa-icon-telephone1 icon-classes-general"></i> 754 <input type="tel" name="number3x" placeholder="Telephone (e.g. 07761 111111)" class="input-fields" id="telephone3x" inputmode="tel" required > 755 </div> 756 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:15px; margin-top:5px;"> 757 <input type="submit" name="submit" class="btn-main submitButtons" value="Save Changes" style="width:100%;" required> 758 <span class="validity"></span> 759 </div> 760 </div> 761 762 </form> 763 </div> 764 </div> 765 </div> 766 </div> 767 768 769 770 771 772<div class="modal fade " id="passChangeModal" tabindex="-1" role="dialog" aria-labelledby="passChangeModal"> 773 <div class="modal-dialog modal-sm modal-dialogx" role="dialog"> 774 <div class="modal-content modal-contentx"> 775 <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;"> 776 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 777 <div class="table-title"> 778 <h6 class="heade-xs2">Change your password</h6> 779 </div> 780 <form id="changePassForm"> 781 <div class="row"> 782 <div class="col-md-12 col-sm-12 col-xs-12"> 783 <div class="col-md-12 col-sm-12 col-xs-12"> 784 <label for="password3x" class="form-label form-label-outside chpassword">New Password </label> 785 <input id="password3x" type="search" name="password" required pattern=".{5,30}" title="Min 5, Max 30 Characters" class="form-control" autocomplete="off" onfocus="this.type='password'" autocorrect="off" autocapitalize="none"> 786 </div> 787 <div class="col-md-12 col-sm-12 col-xs-12"> 788 <label for="retypex" class="form-label form-label-outside chpassword">Re-Type New Password </label> 789 <input id="retypex" type="search" name="password" required pattern=".{5,30}" title="Min 5, Max 30 Characters" class="form-control" onfocus="this.type='password'" autocorrect="off" autocapitalize="none"> 790 </div> 791 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:25px; margin-top:20px;"> 792 <input type="submit" name="submit" class="btn-main submitButtons" value="Change Password" style="width:100%;" id="changesPassword" required>
793 <span class="validity"></span> 794 </div> 795 </div> 796 </div> 797 </form> 798 </div> 799 </div> 800 </div> 801</div> 802 803 804<div class="modal fade " id="aboutUs" tabindex="-1" role="dialog" aria-labelledby="aboutUs"> 805 <div class="modal-dialog modal-sm modal-dialogx" role="dialog"> 806 <div class="modal-content modal-contentx"> 807 <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;"> 808 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 809 <div class="table-title"> 810 <h6 class="heade-xs2"></h6> 811 <h6 class="heade-xs2">If you have any questions or inqueries please contact us.</h6> 812 </div> 813 <div class="row"> 814 <div class="col-md-12 col-sm-12 col-xs-12"> 815 <h6 class="heade-xs23">Opening Days</h6> 816 <h6 class="heade-xs24" id="openingDays"> </h6> 817 </div> 818 <div class="col-md-12 col-sm-12 col-xs-12"> 819 <h6 class="heade-xs23">Phone</h6> 820 <h6 class="heade-xs24" id="phoneShop"> 821 <li class="navbar-icon thin-icon-phonenav"></li> <a class="telclaz" href="callto:01594 800304 "> 822 01594 800304 823 </a> 824 </h6> 825 </div> 826 <div class="col-md-12 col-sm-12 col-xs-12"> 827 <h6 class="heade-xs23">Address</h6> 828 <h6 class="heade-xs24" id="shopAddressx"> </h6> 829 </div> 830 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:20px;"> 831 <h6 class="heade-xs23">Promotions</h6> 832 <h6 class="heade-xs24" id="promotions"> </h6> 833 </div> 834 </div> 835 </div> 836 </div> 837 </div> 838</div> 839 840<div class="modal fade " id="addressModal" tabindex="-1" role="dialog" aria-labelledby="addressModal"> 841 <div class="modal-dialog modal-sm modal-dialogx profileModalxx" role="dialog"> 842 <div class="modal-content modal-contentx contentxx"> 843 <div class="modal-body modal-bodyx modal-telx" style=" padding: 2px 3px 3px 3px;"> 844 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 845 <form id="addressForm3x"> 846 <div class="row"> 847 <div class="col-md-12 col-sm-12 table-titlex"> 848 <h6 class="heade-xs2">Please update your address and postcode for delivery</h6> 849 </div> 850 851 <div class="col-md-12 col-sm-12 col-xs-12"> 852 <i class="fa fa-icon-name1 icon-classes-general"></i> <input type="text" name="contactName2x" placeholder="Name" class="input-fields" id="contactName2x" required> 853 </div> 854 <div class="col-md-12 col-sm-12 col-xs-12"> 855 <i class="fa fa-icon-telephone1 icon-classes-general"></i> 856 857<input 858 type="tel" 859 name="number2x" 860 placeholder="Telephone (e.g. 07761 111111)" 861 class="input-fields" 862 id="telephone2x" 863 inputmode="tel" 864 required 865> 866 </div> 867 <div class="row" style="margin:0;" id="postcodeUpdate"> 868 <div class="col-md-12 col-sm-12 col-xs-12"> 869 <i class="fa fa-icon-address1 icon-classes-general"></i> <input type="text" name="address2x" placeholder="Address" class="input-fields" id="address2x" title="Between 2 -55 charachters" pattern=".{2,75}" required oninvalid="this.setCustomValidity('Between 2-55 charachters')" 870 onchange="try{setCustomValidity('')}catch(e){}"> 871 </div> 872 873 <div class="col-md-12 col-sm-12 col-xs-12" > 874 <i class="fa fa-icon-postcode1 icon-classes-general"></i> <input type="text" name="postcode2x" placeholder="Postcode" class="input-fields" id="postcode2x" required oninvalid="this.setCustomValidity('Use a valid postcode')" 875 onchange="try{setCustomValidity('')}catch(e){}"> 876 </div> 877 </div> 878 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:15px; margin-top:5px;"> 879 <input type="submit" name="submit" class="btn-main submitButtons" value="Save Changes" style="width:100%;" required>
880 <span class="validity"></span> 881 </div> 882 883 </div> 884 </form> 885 </div> 886 </div> 887 </div> 888</div> 889 890 891<div class="modal fade " id="profileModal" tabindex="-1" role="dialog" aria-labelledby="profileModal"> 892 <div class="modal-dialog modal-sm modal-dialogx profileModalxx" role="dialog"> 893 <div class="modal-content modal-contentx contentxx"> 894 <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;"> 895 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 896 <div class="table-title"> 897 <h6 class="heade-xs2">View or change your details</h6> 898 <h6 class="heade-xs2 " style="display:none;" id="addressWarning">Your delivery address seems incomplete. Please add your house/flat number or house name, then save your details. 899</h6> 900 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:8px;" id="deleteAccountDiv"> 901 <input type="submit" name="submit" class="btn-main submitButtons" value="Delete my Account" id="deleteAccount" onclick="deleteAccount();"> 902 <span class="validity"></span> 903 </div> 904 <h6 class="heade-xs2" id="email-xs2">Please use a valid email address if you would like to get order notifications</h6> 905 </div> 906 <form id="myProfileForm"> 907 <input type="hidden" id="profileAddressConfirmed" value="no"> 908 <div class="row"> 909 <div class="col-md-12 col-sm-12 col-xs-12"> 910 911 <!-- NAME --> 912<div class="col-md-12 col-sm-12 col-xs-12" id="profileModalName"> 913 <label for="name1x" class="field-label">Name</label> 914 915 <span class="iconx"> 916 <svg viewBox="0 0 24 24"> 917 <circle cx="12" cy="8" r="4"></circle> 918 <path d="M4 20c0-4 4-6 8-6s8 2 8 6"></path> 919 </svg> 920 </span> 921 922 <input type="text" name="name" placeholder="Name" 923 class="input-fields with-icon" id="name1x" required> 924</div> 925 926<!-- EMAIL --> 927<div class="col-md-12 col-sm-12 col-xs-12" id="profileModalEmail"> 928 <label for="email1x" class="field-label">Email</label> 929 930 <span class="iconx"> 931 <svg viewBox="0 0 24 24"> 932 <rect x="3" y="5" width="18" height="14"></rect> 933 <path d="M3 7l9 6 9-6"></path> 934 </svg> 935 </span> 936 937 <input type="email" name="emails" 938 placeholder="Your E-Mail ( [email protected] )" 939 class="input-fields with-icon" id="email1x" required> 940</div> 941 942<!-- TELEPHONE --> 943<div class="col-md-12 col-sm-12 col-xs-12" id="profileModalTelephone"> 944 <label for="telephone1x" class="field-label">Telephone</label> 945 946 <span class="iconx"> 947 <svg viewBox="0 0 24 24"> 948 <path d="M22 16.9v3a2 2 0 0 1-2.2 2 949 19.8 19.8 0 0 1-8.6-3.1 950 19.5 19.5 0 0 1-6-6 951 19.8 19.8 0 0 1-3.1-8.7A2 2 0 0 1 4.1 2h3 952 a2 2 0 0 1 2 1.7c.1.8.3 1.5.6 2.2 953 a2 2 0 0 1-.5 2.1L8 9 954 a16 16 0 0 0 6 6l1-1.2 955 a2 2 0 0 1 2.1-.5c.7.3 1.4.5 2.2.6 956 a2 2 0 0 1 1.7 2z"></path> 957 </svg> 958 </span> 959 960<input 961 type="tel" 962 name="number" 963 placeholder="Telephone (e.g. 07761 111111)" 964 class="input-fields with-icon"
965 id="telephone1x" 966 inputmode="tel" 967 required 968> 969</div> 970 971<!-- ADDRESS + POSTCODE --> 972<div class="row" style="margin:0;" id="postcodeUpdate2"> 973 974 <!-- ADDRESS --> 975 <div class="col-md-12 col-sm-12 col-xs-12"> 976 <label for="address1x" class="field-label">Address</label> 977 978 <span class="iconx"> 979 <svg viewBox="0 0 24 24"> 980 <path d="M12 21s6-5.5 6-10a6 6 0 0 0-12 0c0 4.5 6 10 6 10z"></path> 981 <circle cx="12" cy="11" r="2"></circle> 982 </svg> 983 </span> 984 985 <input type="text" name="address" 986 placeholder="Address" 987 class="input-fields with-icon" 988 id="address1x" 989 pattern=".{2,85}" required> 990 </div> 991 992 <!-- POSTCODE --> 993 <div class="col-md-12 col-sm-12 col-xs-12"> 994 <label for="postcode1x" class="field-label">Postcode</label> 995 996 <span class="iconx"> 997 <svg viewBox="0 0 24 24"> 998 <path d="M10 3L8 21"></path> 999 <path d="M16 3L14 21"></path> 1000 <path d="M4 9h17"></path> 1001 <path d="M3 15h17"></path> 1002 </svg> 1003 </span> 1004 1005 <input type="text" name="postcode" 1006 placeholder="Postcode" 1007 class="input-fields with-icon" 1008 id="postcode1x" required> 1009 </div> 1010 1011</div> 1012 1013 <!-- EMAIL NOTIFICATIONS SWITCH (unchanged) --> 1014 <div class="col-md-12 col-sm-12 col-xs-12" style=" margin-top:15px;" id="profileModalNotifications"> 1015 <label class="form-switch switchlabel"> 1016 <input type="checkbox" id="emailswitch"> 1017 <i></i> 1018 Email Notifications 1019 </label> 1020 </div> 1021 1022 <!-- SAVE BUTTON (unchanged) --> 1023 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:15px;" id="saveChangesMyProfile"> 1024 <input type="submit" 1025 name="submit" 1026 class="btn-main submitButtons" 1027 value="Save Changes" 1028 style="width:100%;" 1029 id="saveChanges" 1030 required> 1031 <span class="validity"></span> 1032 </div> 1033 1034 </div> 1035 </div> 1036</form> 1037 1038 </div> 1039 </div> 1040 </div> 1041</div> 1042 1043<div class="modal fade " id="contactModalx" tabindex="-1" role="dialog" aria-labelledby="contactModalx"> 1044 <div class="modal-dialog modal-sm modal-dialogx" role="dialog"> 1045 <div class="modal-content modal-contentx"> 1046 <div class="modal-body modal-bodyx"> 1047 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 1048 <div class="table-title" style="padding:35px;"> 1049 <h6 class="heade-xs2" style="font-size:18px;">If you have a problem or question about your order please call the shop</h6> 1050 <h6 class="heade-xs2" style="font-size:20px; color:red;"> 01594 800304 </h6> 1051 1052 </div> 1053 <!-- <form id="contactForms"> 1054 <div class="row"> 1055 <div class="col-md-12 col-sm-12 col-xs-12"> 1056 <h5 class="formInputsx">About*</h5> 1057 </div> 1058 <div class="col-md-12 col-sm-12 col-xs-12"> 1059 <i class="fa fa-icon-arrow-right icon-classes-general" style="top: 14px;"></i> 1060 <select class="timeSelectx input-fields" id="contactTitle" name="subject" required> 1061 </select> 1062 </div> 1063 <div class="col-md-12 col-sm-12 col-xs-12"> 1064 <i class="fa fa-icon-name1 icon-classes-general"></i> <input type="text" name="contactName" placeholder="Name" class="input-fields" id="contactName" required> 1065 </div> 1066 <div class="col-md-12 col-sm-12 col-xs-12"> 1067 <i class="fa fa-icon-mailLog icon-classes-general"></i> <input type="email" name="email" placeholder="Your E-Mail ( [email protected])" class="input-fields" id="contactEmail" required> 1068 </div> 1069 <div class="col-md-12 col-sm-12 col-xs-12"> 1070 <i class="fa fa-icon-telephone1 icon-classes-general"></i> <input type="tel" name="phone" placeholder="Telephone Ex(:0776 111 11 11)" class="input-fields" id="contactTelephone"> 1071 </div> 1072 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-top:10px;"> 1073 <textarea placeholder="Your Message" id="messageCustomerx" name="message" required></textarea> 1074 </div> 1075 <div class="col-md-12 col-sm-12 col-xs-12" style="margin:16px 0;"> 1076 <input type="submit" name="submit" class="btn-main submitButtons" value="Submit Message" style="width:100%;" id="saveChanges" required>
1077 <span class="validity"></span> 1078 </div> 1079 <input type="text" placeholder="Phone" name="address" class="inputlabels" value="" id="csAddress" style="display:none;" readonly> 1080 <input type="text" placeholder="Phone" name="postcode" class="inputlabels" value="" id="csPostcode" style="display:none;" readonly> 1081 </div> 1082 </form> --> 1083 </div> 1084 </div> 1085 </div> 1086</div> 1087 1088<div class="modal fade " id="messageModal" tabindex="-1" role="dialog" aria-labelledby="messageModal"> 1089 <div class="modal-dialog modal-sm" role="dialog"> 1090 <div class="modal-content" style="margin-top: 5%; max-width: 470px; overflow: hidden;"> 1091 <div class="modal-body" style="background:white;"> 1092 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 1093 <div class="table-title" style="margin-bottom: 0px;"> 1094 <div id="situation"></div> 1095 <div id="yourMessage"> </div> 1096 <div id="shopReply"></div> 1097 <div id="generic"></div> 1098 </div> 1099 </div> 1100 </div> 1101 </div> 1102</div> 1103 1104<div class="modal fade " id="termsModal" tabindex="-1" role="dialog" aria-labelledby="termsModal"> 1105 <div class="modal-dialog modal-sm registerModalx termModalx" role="dialog"> 1106 <div class="modal-content modal-contentx term-contentx"> 1107 <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;"> 1108 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 1109 <div class="table-title"> 1110 <h2 class="termsHeader" id="termheader"> </h2> 1111 </div> 1112 <div class="row" id="termsModalBody"> 1113 </div> 1114 </div> 1115 </div> 1116 </div> 1117</div> 1118 1119 1120 1121 1122<div class="modal fade " id="registerModal" tabindex="-1" role="dialog" aria-labelledby="registerModal"> 1123 <div class="modal-dialog modal-sm registerModalx" role="dialog"> 1124 <div class="modal-content modal-contentx"> 1125 <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;"> 1126 <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button> 1127 <div class="table-title"> 1128 <h2 class="headersLog">Register</h2> 1129 <h6 class="heade-xs">Use a valid email and telephone number</h6> 1130 </div> 1131 <form id="registerForm"> 1132 <div class="row"> 1133 <div class="col-md-12 col-sm-12 col-xs-12"> 1134 <label for="name1" class="field-label">Name</label> 1135 <span class="iconr"> 1136 <svg viewBox="0 0 24 24"> 1137 <rect x="3" y="5" width="18" height="14"></rect> 1138 <path d="M3 7l9 6 9-6"></path> 1139 </svg> 1140 </span> <input type="text" name="name" placeholder="Name" class="input-fields" id="name1" required> 1141 </div> 1142 1143 <div class="col-md-12 col-sm-12 col-xs-12"> 1144 <label for="email1" class="field-label">Email</label> 1145 <span class="iconr"> 1146 <svg viewBox="0 0 24 24"> 1147 <rect x="3" y="5" width="18" height="14"></rect> 1148 <path d="M3 7l9 6 9-6"></path> 1149 </svg> 1150 </span><input type="email" name="emails" placeholder="Your E-Mail ( [email protected])" class="input-fields" id="email1" required> 1151 </div> 1152 <div class="col-md-12 col-sm-12 col-xs-12"> 1153 <label for="telephone1" class="field-label">Telephone</label> 1154 1155 <span class="iconr"> 1156 <svg viewBox="0 0 24 24"> 1157 <path d="M22 16.9v3a2 2 0 0 1-2.2 2 1158 19.8 19.8 0 0 1-8.6-3.1 1159 19.5 19.5 0 0 1-6-6 1160 19.8 19.8 0 0 1-3.1-8.7A2 2 0 0 1 4.1 2h3 1161 a2 2 0 0 1 2 1.7c.1.8.3 1.5.6 2.2 1162 a2 2 0 0 1-.5 2.1L8 9 1163 a16 16 0 0 0 6 6l1-1.2 1164 a2 2 0 0 1 2.1-.5c.7.3 1.4.5 2.2.6 1165 a2 2 0 0 1 1.7 2z" ></path> 1166 </svg> 1167</span> 1168 1169 1170 1171 <input type="tel" name="number" placeholder="Telephone Ex(:0776 111 11 11)" class="input-fields" id="telephone1" required> 1172 </div> 1173 <div class="col-md-12 col-sm-12 col-xs-12"> 1174 <label for="address1" class="field-label">Address</label> 1175 <i class="fa fa-icon-address1 icon-classes-general"></i> <input type="text" name="address" placeholder="Address" class="input-fields" id="address1" title="Between 2 -35 charachters" minlength="2" maxlength="35" value=""> 1176 </div> 1177 <div class="col-md-12 col-sm-12 col-xs-12"> 1178 <label for="postcode1" class="field-label">Postcode</label> 1179 <i class="fa fa-icon-postcode1 icon-classes-general"></i> <input type="text" name="postcode" placeholder="Postcode" class="input-fields" id="postcode1" value=""> 1180 </div> 1181 <div class="col-md-12 col-sm-12 col-xs-12"> 1182 <label for="password1" class="field-label">Password</label> 1183 1184
1185 <span class="iconr"> 1186 <svg viewBox="0 0 24 24"> 1187 <rect x="5" y="11" width="14" height="9"></rect> 1188 <path d="M8 11V8a4 4 0 0 1 8 0v3"></path> 1189 </svg> 1190 </span> 1191 1192 <input type="text" name="search" placeholder="password" class="input-fields passfield" id="password1" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> <span class="eye-toggler" onclick="togglePasswordField(this)"> 1193 <svg viewBox="0 0 24 24"> 1194 <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"></path> 1195 <circle cx="12" cy="12" r="3"></circle> 1196 </svg> 1197 </span> 1198 </div> 1199 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:27px;"> 1200 <label for="verifypassword1" class="field-label">Re-type Password</label> 1201 1202 <span class="iconr"> 1203 <svg viewBox="0 0 24 24"> 1204 <rect x="5" y="11" width="14" height="9"></rect> 1205 <path d="M8 11V8a4 4 0 0 1 8 0v3"></path> 1206 </svg> 1207 </span> 1208 <input type="text" name="search" placeholder="confirm password" class="input-fields passfield" id="verifypassword1" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> <span class="eye-toggler" onclick="togglePasswordField(this)"> 1209 <svg viewBox="0 0 24 24"> 1210 <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"></path> 1211 <circle cx="12" cy="12" r="3"></circle> 1212 </svg> 1213 </span> 1214 </div> 1215 <div class="col-md-12 col-sm-12 col-xs-12" > 1216 <input type="submit" name="submit" class="btn-main submitButtons" value="Register Now" style="width:100%;" id="registerButton" required> 1217 <span class="validity"></span> 1218 </div> 1219 1220 <div class="col-md-12 col-sm-12 col-xs-12" id="privacy"> 1221 <!-- <h1 class="terms"> By registering you accept the <a onclick="window.open('/terms', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')">terms & conditions</a></h1> --> 1222 <h1 class="terms"> By registering you accept the <a onclick="termsconditions();">terms & conditions</a></h1></h1> 1223 </div> 1224 </div> 1225 </form> 1226 </div> 1227 </div> 1228 </div> 1229</div> 1230 1231 1232 1233<!-- End Register --> 1234 1235 <div class="bottomAndroidFix" style=" background-color: black; 1236display: -webkit-flex; 1237display: flex; 1238position: fixed; 1239left: 0; 1240/* top: 0; */ 1241right: 0; 1242padding: 4px 0px; 1243height: 56px; 1244color: #2b2c2f; 1245z-index: 999; 1246bottom: 4%; display:none; " id="bottomAndroidFix"> 1247 1248 <div class="row" style="margin-left:-7px;"> 1249 <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/apphome?ios=android';">Home</button> </div> 1250 <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/menu?ios=android';">Menu</button> </div> 1251 <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/checkout?ios=android';">Checkout</button></div> 1252 <div class="col-xs-3 mycolxs3"> <button class="btn btn-success btn-menu" onclick="location.href='/myprofile?ios=android';">Orders</button></div> 1253 </div> 1254 </div> 1255 1256 1257 1258
1258<script src="https://cdn.trackjs.com/agent/v3/latest/t.js"></script>
1258 1259
1259<script> 1260 1261 var ete = 0; 1262 window.TrackJS && TrackJS.install({ 1263 token: "b611dee257d8438a80caa0c4dc74fa7d", 1264 application: "my-app-prod" 1265 }); 1266 </script>
1266 1267 1268
1268<script src="js/utils/core.min.js"></script>
1268 1269
1269<script src="js/utils/scripts.js"></script>
1269 1270 1271 1272 <a href="#" class="top-arrow"></a> 1273 1274
1274<script> 1275 1276 window.addEventListener('load', function () { 1277 try { 1278 1279 window.TrackJS && TrackJS.addMetadata("userx", "none"); 1280 1281 1282 } catch (e) { 1283 // swallow â never let this kill the page 1284 console.log('TrackJS/init error', e); 1285 } 1286 }); 1287 1288 function checkCookieConsent() { 1289 try { 1290 if (window.sessionStorage && sessionStorage.getItem('999') !== 'Cookies Ok') { 1291 $("#cookieConsent").show(); 1292 } 1293 } catch (e) { 1294 // Storage not available â safest is just show banner and move on 1295 $("#cookieConsent").show(); 1296 } 1297 } 1298 1299 function regModal() { 1300 $('#loginModal').modal('hide'); 1301 $('#registerModal').modal('show'); 1302 } 1303 1304 function ajaxHandler(typeA, urlA, sendData, callback) { 1305 $.ajax({ 1306 type: typeA, 1307 url: urlA, 1308 data: sendData, 1309 error: function (response) { endEvent(); callback(response); }, 1310 success: function (response) { }, 1311 complete: function (response) { callback(response); } 1312 }); 1313 } 1314 1315 $("#loginButton1x").click(function (e) { 1316 stopForm(e); 1317 var sendUrl = "/logMeIn2"; var sendData = {}; 1318 sendData.username = ($("#username2y").val()).toLowerCase().trim(); 1319 sendData.password = $("#passworda3y").val(); 1320 ajaxHandler("POST", sendUrl, sendData, function (response) { 1321 if (response.responseText == "ACCESS") { window.location.reload(); } 1322 else if (response.responseText == "Password or Username is Wrong") { endEvent(); alertUser("Your password or email is wrong. Please try again or use forget password link."); } 1323 else { endEvent(); alertUser("There has been a problem. Please try again later."); } 1324 }); 1325 }); 1326 1327 $("#loginForms").submit(function (e) { 1328 stopForm(e); 1329 var sendUrl = "/logMeIn2"; var sendData = {}; 1330 sendData.username = ($("#username2").val()).toLowerCase().trim(); 1331 sendData.password = $("#password2").val(); 1332 ajaxHandler("POST", sendUrl, sendData, function (response) { 1333 if (response.responseText == "ACCESS") { window.location.reload(); } 1334 else if (response.responseText == "Password or Username is Wrong") { endEvent(); alertUser("Your password or email is wrong. Please try again or use forget password link."); } 1335 else { endEvent(); alertUser("There has been a problem. Please try again later."); } 1336 }); 1337 }); 1338 1339 $(".icon-classes-generalx").click(function (e) { 1340 var pinput = $(this).parent().find('.passfield'); 1341 //var pinput= $(this).next().find('.passfield'); 1342 if ($(pinput).attr('type') == "password") { 1343 $(pinput).attr('type', 'text'); 1344 } 1345 else { 1346 $(pinput).attr('type', 'password'); 1347 } 1348 }); 1349 1350 function appAlert(options) { 1351 1352 1353 $('#appAlertTitle').text(options.title || ''); 1354 $('#appAlertText').text(options.text || ''); 1355 1356 var footerHtml = ''; 1357 1358 if (options.buttons && options.buttons.length) { 1359 options.buttons.forEach(function (btn, i) { 1360 footerHtml += ` 1361 <a href="javascript:;" 1362 class="${btn.class || 'coolal-yes'}" 1363 data-btn-index="${i}"> 1364 ${btn.text} 1365 </a> 1366 `; 1367 }); 1368 } else { 1369 footerHtml = `<a href="javascript:;" class="coolal-yes" data-dismiss="modal">OK</a>`; 1370 } 1371 1372 $('#appAlertFooter').html(footerHtml); 1373 1374 // Attach actions 1375 $('#appAlertFooter a').off('click').on('click', function () { 1376 var index = $(this).data('btn-index'); 1377 var btn = options.buttons && options.buttons[index]; 1378 1379 $('#appAlert').modal('hide'); 1380 1381 if (btn && typeof btn.action === 'function') { 1382 setTimeout(btn.action, 150); 1383 } 1384 }); 1385 1386 $('#appAlert').modal('show'); 1387} 1388 1389 1390 function deleteAccount() { 1391 appAlert({ 1392 title: 'Delete Account', 1393 text: 'Are you sure you would like to proceed?', 1394 buttons: [ 1395 { 1396 text: 'Cancel', 1397 class: 'coolal-nox' 1398 }, 1399 { 1400 text: 'Remove', 1401 class: 'coolal-yesx', 1402 action: function () { 1403 deleteAccountx(); 1404 } 1405 } 1406 ] 1407 }); 1408} 1409 1410 function deleteAccountx() { 1411 var sendUrl = "/deleteAccount"; var sendData = {}; 1412 //$('#iosAlertx').modal('hide'); 1413 1414 ajaxHandler("GET", sendUrl, "", function (response) { 1415 if (response.responseText == "error") { alertUser("An error occured. Please try again."); } 1416 1417 else if (response.responseText == "neworder") { 1418 alertUser("You have recently placed an order, you can not delete your account until you have a live order. Wait until it is completed by the shop. Thanks"); 1419 return; 1420 } 1421 else { 1422 alertUser("Your account has been deleted however we have to keep some data for legal requirements related to your account for a certain period time. We would like to remind you that we do not share, sell or use your data for any purposes with any 3rd party."); 1423 setTimeout(function () { 1424 window.location.reload(); 1425 }, 3000); 1426 } 1427 }); 1428 } 1429 $("#contactForms").submit(function (e) { 1430 stopForm(e); 1431 var fields = $(this).serializeArray(); 1432 var sendUrl = "/contact"; 1433 ajaxHandler("POST", sendUrl, fields, function (response) { 1434 if (response.responseText == "Sent") { $('#mainWrapper').html("<h1 style='font-size:16px; padding:80px; 35px; height:500px;'>Your message has been sent.We aim to reply you within 24 hours.If it is an urgent issue please call shop. </h1>"); alertIos("Sent", "Your message has been successfully sent. Check your email or here for replies."); $('#contactModalx').modal('hide'); endEvent(); } 1435 else if (response.responseText == "Too Early") { alertUser("You have sent a message recently. You can only send one message in every 5 minutes"); endEvent(); } 1436 else { endEvent(); alertUser("There has been a problem. Please try again later."); } 1437 }); 1438 }); 1439 1440 $("#formPasswordReset").submit(function (e) { 1441 stopForm(e); 1442 var sendData = {}; 1443 var sendUrl = '/resetPassword'; 1444 sendData.password = $("#password3").val(); 1445 sendData.verifypassword = $("#retype").val(); 1446 sendData.username = $("#userEmail").val(); 1447 sendData.token = $("#token").val(); 1448 if (sendData.password != sendData.verifypassword) { 1449 $("#ajaxMessage3").text("Passwords do not match").fadeIn("slow").delay(1500).fadeOut("slow"); 1450 document.getElementById("retype").style.background = "red"; 1451 endEvent(); 1452 return; 1453 } 1454 ajaxHandler("POST", sendUrl, sendData, function (response) { 1455 if (response.responseText == "success") { window.location.href = "/"; } 1456 else if (response.responseText == "Expired") { alertUser("Your Token Has Been Expired, Please demand a new one."); } 1457 else { alertUser("An error occured please try again;"); } 1458 endEvent(); 1459 }); 1460 }); 1461 1462 $("#sendForgottenForm").submit(function (e) { 1463 stopForm(e); 1464 var sendData = {}; sendData.email = $("#forgetEmail").val().toLowerCase(); 1465 var sendUrl = "/forgetPassword"; 1466 ajaxHandler("POST", sendUrl, sendData, function (response) { 1467 if (response.responseText == "successfull") { 1468 $("#forgotPass2").html("Please check your email for further instructions. Also check your spam folder.").show().css('color', 'green'); 1469 $('#resetlinkbutton').val("Email Sent").css('background', 'green'); 1470 alertUser("<h1 style='margin-bottom:-70px;'>Success</h1> <h2 style='color:green; font-size: 20px; padding: 0 25px;'>Password reset email is sent to the registered email address. Please check your email for instructions. Please also check your spam folder as well</h2>"); 1471 } 1472 else { 1473 alertUser("The email you entered does not exist or you need to wait 6 minutes between each email request"); 1474 $('#resetlinkbutton').val("Send Reset Link").css('background', '#DC4C46'); 1475 endEvent(e); 1476 } 1477 }); 1478 }); 1479 1480 function checkEmail(emailValue) { 1481 var sendUrl = "/checkEmail"; 1482 var sendData = {}; sendData.email = emailValue; 1483 ajaxHandler("POST", sendUrl, sendData, function (response) { 1484 if (response.responseText == 'exist') { alertUser("This email is used before,use a different one"); } 1485 }); 1486 } 1487 1488 function isSuspiciousAddress(address, postcode) { 1489 if (!address) return true; 1490 1491 var cleanAddr = address.trim().toUpperCase(); 1492 var cleanPc = (postcode || "") 1493 .trim() 1494 .toUpperCase() 1495 .replace(/\s+/g, ""); 1496 1497 var compactAddr = cleanAddr.replace(/\s+/g, ""); 1498 var hasDigit = /\d/.test(cleanAddr); 1499 var containsPostcode = 1500 cleanPc && compactAddr.indexOf(cleanPc) !== -1; 1501 1502 return !hasDigit || containsPostcode; 1503} 1504 1505 1506 1507 function sendRegisterAjax(data) { 1508 var sendUrl = "/register"; 1509 ajaxHandler("POST", sendUrl, data, function (response) { 1510 if (response.status == 429) { 1511 alertNow("You have created too many accounts from this ip, please try again after an hour", endEvent); 1512 return; 1513 } 1514 1515 if (response.responseText == 'success') { 1516 alertNow("You have successfully registered", function () { 1517 window.location.reload(); 1518 }); 1519 } 1520 else if (response.responseText == "Email used before") { 1521 alertNow("Your email is registered before. Please use forget password link or try different email.", endEvent); 1522 } 1523 else { 1524 alertNow("There has been a problem. Please try again later.", endEvent); 1525 } 1526 }); 1527 } 1528 1529 function validateProfilePostcodeAndAddressThenUpdate(data) { 1530 var rawPostcode = (data.postcode || "").trim(); 1531 1532 if (!rawPostcode) { 1533 alertUser("Please enter your postcode"); 1534 endEvent(); 1535 return; 1536 } 1537 1538 var roughPattern = /^[A-Z]{1,2}\d[A-Z\d]?\s*\d[A-Z]{2}$/i; 1539 if (!roughPattern.test(rawPostcode)) { 1540 alertUser("Your postcode doesn't look right. Please check it."); 1541 endEvent(); 1542 return; 1543 } 1544 1545 var url = "https://api.postcodes.io/postcodes/" + encodeURIComponent(rawPostcode); 1546 1547 $.ajax({ 1548 url: url, 1549 method: "GET", 1550 dataType: "json", 1551 timeout: 7000 1552 }) 1553 1554 // ---------- 200 OK ---------- 1555 .done(function (resp, status, xhr) { 1556 if (resp && resp.status === 200 && resp.result && resp.result.postcode) { 1557 var formattedPc = resp.result.postcode; 1558 data.postcode = formattedPc; 1559 $('#postcode1x').val(formattedPc); 1560 1561 if (data.addressConfirmed) { 1562 $('#addressConfirmed').val("1"); 1563 sendProfileUpdateAjax(data); 1564 return; 1565 } 1566 1567 if (isSuspiciousAddress(data.address, formattedPc)) { 1568 var typedAddr = data.address || ""; 1569 fetchAddressSuggestionsFromServer(formattedPc, typedAddr, function (suggestions) { 1570 showAddressIssueModal( 1571 "YOUR ADDRESS IS INCOMPLETE.\n\n" + 1572 "We cannot deliver your order without a house/flat number or house name and postcode.\n\n" + 1573 "Please select your complete address below or press Edit address.", 1574 1575 suggestions, 1576 1577 function onPick(addr) { 1578 1579 const parts = addr.split(',').map(p => p.trim()); 1580 const shortAddress = parts.slice(0, 2).join(', '); 1581 1582 $('#address1x').val(shortAddress); 1583 $('#profileAddressConfirmed').val('yes'); 1584 1585 data.address = shortAddress; 1586 data.addressConfirmed = true; 1587 1588 sendProfileUpdateAjax(data); 1589 }, 1590
1591 null, // Do not allow an incomplete address to be used 1592 1593 function onEdit() { 1594 $('#address1x').focus(); 1595 endEvent(); 1596 } 1597 ); 1598}); 1599 } else { 1600 sendProfileUpdateAjax(data); 1601 } 1602 return; 1603 } 1604 sendProfileUpdateAjax(data); 1605 }) 1606 1607 // ---------- FAIL (404 / 0 / others) ---------- 1608 .fail(function (xhr, status, error) { 1609 if (xhr.status === 404) { 1610 var typedPc = rawPostcode; 1611 var typedAddr = data.address || ""; 1612 1613 fetchAddressSuggestionsFromServer(typedPc, typedAddr, function (suggestions) { 1614 showAddressIssueModal( 1615 "We couldn't find this postcode.\n\n" + 1616 "Please pick a suggested address below or edit your address.", 1617 suggestions, 1618 function onPick(addr) { 1619 const parts = addr.split(',').map(p => p.trim()); 1620 const shortAddress = parts.slice(0, 2).join(', '); 1621 1622 $('#address1x').val(shortAddress); 1623 $('#profileAddressConfirmed').val('yes'); 1624 1625 data.address = shortAddress; 1626 data.addressConfirmed = true; 1627 1628 sendProfileUpdateAjax(data); 1629}, 1630 function onUseTyped() { 1631 $('#profileAddressConfirmed').val('yes'); 1632 data.addressConfirmed = true; 1633 sendProfileUpdateAjax(data); 1634 }, 1635 function onEdit() { 1636 $('#address1x').focus(); 1637 endEvent(); 1638 } 1639 ); 1640 }); 1641 return; 1642 } 1643 1644 // 0 â network 1645 if (xhr.status === 0) { 1646 if (isSuspiciousAddress(data.address, data.postcode) && !data.addressConfirmed) { 1647 showAddressIssueModal( 1648 "This address looks incomplete (e.g. missing house/flat number).\n\n" + 1649 "Please edit or continue with what you typed.", 1650 [], 1651 function onPick() { 1652 sendProfileUpdateAjax(data); 1653 }, 1654 function onUseTyped() { 1655 $('#profileAddressConfirmed').val('yes'); 1656 data.addressConfirmed = true; 1657 sendProfileUpdateAjax(data); 1658 }, 1659 function onEdit() { 1660 $('#address1x').focus(); 1661 endEvent(); 1662 } 1663 ); 1664 } else { 1665 sendProfileUpdateAjax(data); 1666 } 1667 return; 1668 } 1669 sendProfileUpdateAjax(data); 1670 }); 1671 } 1672 1673//profile update 1674 function sendProfileUpdateAjax(data) { 1675 var sendUrl = "/updateInformation"; 1676 ajaxHandler("POST", sendUrl, data, function (response) { 1677 if (response.responseText == "Email Same") { 1678 alertUser("Your email is registered before. Please use forget password link or try different email."); 1679 endEvent(); 1680 return; 1681 } 1682 else if (response.responseText == "error") { 1683 endEvent(); 1684 alertUser("There has been a problem. Please try again later."); 1685 return; 1686 } 1687 try { 1688 var y = response.responseJSON; 1689 $('#getDistance').val(y.distance); 1690 $('#profileModal').modal('hide'); 1691 alertIos("Success", "You have updated your information"); 1692 updateC(data); 1693 endEvent(); 1694 return; 1695 } catch (e) { 1696 endEvent(); 1697 alertUser("There has been a problem. Please try again later."); 1698 return; 1699 } 1700 }); 1701 } 1702 1703 1704 $('#address1x, #postcode1x').on('input', function () { 1705 $('#profileAddressConfirmed').val('no'); 1706 }); 1707 1708 function getValidTelephone(inputSelector) { 1709 1710 console.log("input selector",inputSelector); 1711 var telephone = ($(inputSelector).val() || '').trim(); 1712 1713 // Remove spaces, brackets, dots and hyphens 1714 telephone = telephone.replace(/[\s().-]/g, ''); 1715 1716 // Convert 00 international prefix into + 1717 if (telephone.indexOf('00') === 0) { 1718 telephone = '+' + telephone.substring(2); 1719 } 1720 1721 // Convert UK +44 into leading 0 1722 if (telephone.indexOf('+44') === 0) { 1723 telephone = '0' + telephone.substring(3); 1724 } 1725
1726 var validUkNumber = /^0\d{10}$/.test(telephone); 1727 var validInternationalNumber = 1728 /^\+[1-9]\d{7,14}$/.test(telephone); 1729 1730 if (!validUkNumber && !validInternationalNumber) { 1731 alertUser( 1732 'Please enter an 11-digit UK number (e.g. 07761111111), or an international number including the country code (e.g. +447761111111).' 1733 ); 1734 1735 $(inputSelector).focus(); 1736 endEvent(); 1737 1738 return false; 1739 } 1740 1741 return telephone; 1742} 1743 1744 $("#myProfileForm").submit(function (e) { 1745 stopForm(e); 1746 var data = {}; 1747 data.name = $('#name1x').val(); 1748 data.email = ($('#email1x').val() || "").toLowerCase(); 1749 data.address = $('#address1x').val(); 1750 data.postcode = $('#postcode1x').val(); 1751 data.telephone = getValidTelephone('#telephone1x'); 1752if (!data.telephone) { 1753 endEvent(); 1754 return; 1755} 1756 data.addressConfirmed = ($('#profileAddressConfirmed').val() === 'yes'); 1757 1758 if (!data.address || data.address.length < 2) { 1759 alertUser("Your address should have more than 2 characters"); 1760 endEvent(); 1761 return; 1762 } 1763 if (!data.postcode || data.postcode.length < 4) { 1764 alertUser("Your postcode should have more than 4 characters"); 1765 endEvent(); 1766 return; 1767 } 1768 var emailMe = $('#emailswitch').prop("checked"); 1769 data.emailOrder = emailMe ? 1 : 0; 1770 validateProfilePostcodeAndAddressThenUpdate(data); 1771 }); 1772 1773 function validatePostcodeAndAddressThenRegister(data) { 1774 1775 console.log("test"); 1776 var rawPostcode = (data.postcode || "").trim(); 1777 if (!rawPostcode) { 1778 alertNow("Please enter your postcode", endEvent); 1779 return; 1780 } 1781 var roughPattern = /^[A-Z]{1,2}\d[A-Z\d]?\s*\d[A-Z]{2}$/i; 1782 if (!roughPattern.test(rawPostcode)) { 1783 alertNow("Your postcode doesn't look right. Please check it.", endEvent); 1784 return; 1785 } 1786 1787 var url = "https://api.postcodes.io/postcodes/" + encodeURIComponent(rawPostcode); 1788 $.ajax({ 1789 url: url, 1790 method: "GET", 1791 dataType: "json", 1792 timeout: 5000 1793 }) 1794 .done(function (resp, status, xhr) { 1795 if (resp && resp.status === 200 && resp.result && resp.result.postcode) { 1796 var formattedPc = resp.result.postcode; 1797 data.postcode = formattedPc; 1798 $('#postcode1').val(formattedPc); 1799 if (data.addressConfirmed) { 1800 sendRegisterAjax(data); 1801 return; 1802 } 1803 if (isSuspiciousAddress(data.address, formattedPc)) { 1804 var typedAddr = data.address || ""; 1805 fetchAddressSuggestionsFromServer(formattedPc, typedAddr, function (suggestions) { 1806 showAddressIssueModal( 1807 "This address looks incomplete (e.g. missing house/flat number).\n\n" + 1808 "Please pick one of the suggestions below or edit your address.", 1809 suggestions, 1810 function onPick(addr) { 1811 1812 const parts = addr.split(',').map(p => p.trim()); 1813 const shortAddress = parts.slice(0, 2).join(', '); 1814 $('#address1').val(shortAddress); 1815 data.address = shortAddress; 1816 sendRegisterAjax(data); 1817 }, 1818 function onUseTyped() { 1819 sendRegisterAjax(data); 1820 }, 1821 function onEdit() { 1822 $('#address1').focus(); 1823 endEvent(); 1824 } 1825 ); 1826 }); 1827 } else { 1828 sendRegisterAjax(data); 1829 } 1830 return; 1831 } 1832 sendRegisterAjax(data); 1833 }) 1834 1835 .fail(function (xhr, status, error) { 1836 if (xhr.status === 404) { 1837 var typedPc = rawPostcode; 1838 var typedAddr = data.address || ""; 1839 1840 fetchAddressSuggestionsFromServer(typedPc, typedAddr, function (suggestions) { 1841 showAddressIssueModal( 1842 "We couldn't find this postcode.\n\n" + 1843 "Please pick a suggested address below or edit your address.", 1844 suggestions, 1845 function onPick(addr) { 1846 1847 const parts = addr.split(',').map(p => p.trim()); 1848 const shortAddress = parts.slice(0, 2).join(', '); 1849 1850 1851 $('#address1').val(shortAddress); 1852 data.address = shortAddress; 1853 sendRegisterAjax(data); 1854 }, 1855 function onUseTyped() { 1856 sendRegisterAjax(data); 1857 }, 1858 function onEdit() { 1859 $('#address1').focus(); 1860 endEvent(); 1861 } 1862 ); 1863 }); 1864 return; 1865 } 1866 1867 if (xhr.status === 0) { 1868 if (isSuspiciousAddress(data.address, data.postcode)) { 1869 showAddressIssueModal( 1870 "This address looks incomplete (e.g. missing house/flat number).\n\n" + 1871 "Please edit or continue with what you typed.", 1872 [], 1873 function onPick() { 1874 sendRegisterAjax(data); 1875 }, 1876 function onUseTyped() { 1877 sendRegisterAjax(data); 1878 }, 1879 function onEdit() { 1880 $('#address1').focus(); 1881 endEvent(); 1882 } 1883 ); 1884 } else { 1885 sendRegisterAjax(data); 1886 } 1887 return; 1888 } 1889 sendRegisterAjax(data); 1890 }); 1891 } 1892function togglePasswordField(el) { 1893 var input = $(el).siblings('input').first(); 1894 1895 if (!input.length) return; 1896 1897 if (input.attr('type') === 'password') { 1898 input.attr('type', 'text'); 1899 } else { 1900 input.attr('type', 'password'); 1901 } 1902}
1903 function fetchAddressSuggestionsFromServer(postcode, typedAddress, cb) { 1904 $.getJSON('/address-suggestions', { 1905 postcode: postcode, 1906 address: typedAddress 1907 }) 1908 .done(function (res) { 1909 if (res && Array.isArray(res.suggestions)) { 1910 cb(res.suggestions); 1911 } else { 1912 cb([]); 1913 } 1914 }) 1915 .fail(function (xhr, status, error) { 1916 cb([]); 1917 }); 1918 } 1919 1920 $("#registerForm").submit(function (e) { 1921 stopForm(e); 1922 1923 var data = {}; 1924 data.name = $('#name1').val(); 1925 data.username = ($('#email1').val() || "").toLowerCase(); 1926 data.password = $('#password1').val(); 1927 data.verifypassword = $('#verifypassword1').val(); 1928 data.address = $('#address1').val(); 1929 data.postcode = $('#postcode1').val(); 1930 1931 data.telephone = getValidTelephone('#telephone1'); 1932if (!data.telephone) { 1933 endEvent(); 1934 return; 1935} 1936 1937$('#telephone1').val(data.telephone); 1938 1939 1940 1941 if (data.password.length < 5) { 1942 alertNow("Your password can not be lower than 5 characters", endEvent); 1943 return; 1944 } 1945 1946 if (data.password != data.verifypassword) { 1947 alertNow("Passwords don't match", endEvent); 1948 return; 1949 } 1950 1951 if (!data.address || data.address.length < 2) { 1952 alertNow("Your address should have more than 2 characters", endEvent); 1953 return; 1954 } 1955 validatePostcodeAndAddressThenRegister(data); 1956 }); 1957 1958 function updateC(data) { 1959 $('#customerName').val(data.name); 1960 $('#emailCustomer').val(data.email); 1961 $('#telCustomer').val(data.telephone); 1962 $('#addressCustomer').val(data.address); 1963 $('#postcodeCustomer').val(data.postcode); 1964 } 1965 1966$("#telephoneModal").submit(function (e) { 1967 stopForm(e); 1968 1969 var data = {}; 1970 1971 data.telephone = ($('#telephone3x').val() || '').trim(); 1972 data.name = $('#contactName3x').val(); 1973 1974 data.telephone = getValidTelephone('#telephone3x'); 1975 1976if (!data.telephone) { 1977 endEvent(); 1978 return; 1979} 1980 1981 var sendUrl = "/updatePhone"; 1982 1983 ajaxHandler("POST", sendUrl, data, function (response) { 1984 if (response.responseText == 'Success') { 1985 $('#telephoneModal').modal('hide'); 1986 alertUser("You have updated your information"); 1987 1988 // Uses the cleaned number 1989 $('#telCustomer').val(data.telephone); 1990 1991 endEvent(); 1992 return; 1993 } 1994 1995 endEvent(); 1996 alertUser("There has been a problem. Please try again later."); 1997 }); 1998}); 1999 2000 $("#addressModal").submit(function (e) { 2001 2002 stopForm(e); 2003 var data = {}; 2004 data.telephone = $('#telephone2x').val(); 2005 data.name = $('#contactName2x').val(); 2006 data.address = $('#address2x').val(); 2007 data.postcode = $('#postcode2x').val(); 2008 if (data.address == "" || (data.address).length < 2) { alertUser("Your address should have more than 2 characters"); endEvent(); return; } 2009 if (data.postcode == "" || (data.postcode).length < 4) { alertUser("Your postcode should have more than 4 characters"); endEvent(); return; } 2010 2011data.telephone = getValidTelephone('#telephone2x'); 2012 2013if (!data.telephone) { 2014 endEvent(); 2015 return; 2016} 2017 2018 var sendUrl = "/updateAddress"; 2019 ajaxHandler("POST", sendUrl, data, function (response) { 2020 2021 if (response.responseText == 'error') { 2022 endEvent(); alertUser("There has been a problem. Please try again later."); return; 2023 } 2024 else { 2025 try { var y = response.responseJSON; } catch (e) { endEvent(); alertUser("There has been a problem. Please try again later."); return; } 2026 $('#addressModal').modal('hide'); alertUser("You have updated your information"); 2027 $('#addressCustomer').val(data.address); 2028 $('#postcodeCustomer').val(data.postcode); 2029 $('#telCustomer').val(data.telephone); 2030 if (y.distance != "not found") { 2031 $('#getDistance').val(y.distance); 2032 } 2033 else { 2034 alert("Your postcode could not be found. Please make sure you enter a correct UK postcode"); 2035 } 2036 endEvent(); return; 2037 } 2038 }); 2039 }); 2040 2041 $("#changePassForm").submit(function (e) { 2042 stopForm(e); 2043 var data = {}; 2044 data.password = $('#password3x').val(); 2045 data.verifypassword = $('#retypex').val(); 2046 if (data.password.length < 5) { alertUser("Your password can not be lower than 5 characters"); endEvent(); return; } 2047 if (data.password != data.verifypassword) { alertUser("Passwords don't match"); endEvent(); return; } 2048 var sendUrl = "/passwordChange"; 2049 ajaxHandler("POST", sendUrl, data, function (response) { 2050 if (response.responseText == 'Successfully Updated') { alertUser("You have successfully updated your password"); endEvent(); $('#passChangeModal').modal('hide'); return; } 2051 else { endEvent(); alertUser("There has been a problem. Please try again later."); } 2052 }); 2053 }); 2054 2055 $("#changefpassword").submit(function (e) { 2056 stopForm(e); 2057 var data = {}; 2058 data.password = $('#password1xx').val(); 2059 data.verifypassword = $('#verifypassword1xx').val(); 2060 data.reset = $('#resetcode').val(); 2061 data.username = $('#forgetEmailxx').val().toLowerCase(); 2062 if (data.password.length < 5) { alertUser("Your password can not be lower than 5 characters"); endEvent(); return; } 2063 if (data.password != data.verifypassword) { alertUser("Passwords don't match"); endEvent(); return; } 2064 var sendUrl = "/resetPasswordCode"; 2065 ajaxHandler("POST", sendUrl, data, function (response) { 2066 if (response.responseText == 'success') { window.location.reload(); } 2067 else if (response.responseText == "Expired") { 2068 endEvent(); alertIos("Expired", "Your reset code expired. Please visit send reset link again"); 2069 return; 2070 } 2071 else { 2072 endEvent(); alertIos("Unsuccessfull", "Please check the reset code or email address and try again."); 2073 return; 2074 } 2075 }); 2076 }); 2077 2078 function triggerIosCheckout() {
2079 try { window.webkit.messageHandlers["scriptHandler"].postMessage("go checkout"); } catch (e) { window.location.href = "/xx12"; } 2080 $('#popupModal').modal('hide'); 2081 } 2082 2083 function alertIos(title, text) { 2084 $('#titlex1').text(title); 2085 $('#textx1').text(text); 2086 $('#iosAlert').modal('show'); 2087 } 2088 2089 function alertIosx(title, text, footer) { 2090 $('#titlex').text(title); 2091 $('#textx').text(text); 2092 $('#coolal-btnWrapperx').html(footer); 2093 $('#iosAlertx').modal('show'); 2094 } 2095 2096 2097 function iosFbLog() { 2098 try { window.webkit.messageHandlers["scriptHandler"].postMessage("fblog"); } catch (e) { } 2099 } 2100 2101 function iosGLog() { 2102 try { window.webkit.messageHandlers["scriptHandler"].postMessage("glog"); } catch (e) { } 2103 } 2104 2105 function iosAsign() { 2106 try { window.webkit.messageHandlers["scriptHandler"].postMessage("asign"); } catch (e) { } 2107 } 2108 2109 2110 function appleSign(sign) { 2111 var sendUrl = '/auth/apple/callback?id_token=' + sign.id_token; 2112 ajaxHandler("GET", sendUrl, "data", function (response) { 2113 if (response.responseText == "access") { 2114 window.location.reload(); 2115 } 2116 else { 2117 alertUser("There has been a problem, please try again or use a different login method"); 2118 } 2119 }); 2120 } 2121 2122 function faSign(sign) { faSignF(sign.access_token); } 2123 function faSignG(sign) { faSignF(sign); } 2124 2125 function faSignF(sign) {
2126 var sendUrl = '/fsign?access_token=' + sign; 2127 ajaxHandler("GET", sendUrl, "", function (response) { 2128 if (response.responseText == "access") { 2129 window.location.reload(); 2130 } 2131 else { 2132 alertUser("There has been a problem, please try again or use a different login method"); 2133 } 2134 }); 2135 } 2136 2137 function ffmessage(messagex) { 2138 var sendUrl = '/ffmessage?id_token=' + messagex; 2139 ajaxHandler("GET", sendUrl, "data", function (response) { 2140 if (response.responseText == "error") { 2141 alertUser("There has been a problem, please try again or use a different login method"); 2142 } 2143 }); 2144 } 2145 2146 function ggSign(sign) { gSignG(sign); } 2147 function gaSign(sign) { gSignG(sign.id_token); } 2148 2149 2150 function gSignG(sign) { 2151 var sendUrl = '/gsign?id_token=' + sign; 2152 ajaxHandler("GET", sendUrl, "data", function (response) { 2153 if (response.responseText == "access") { 2154 try { window.webkit.messageHandlers["scriptHandler"].postMessage("refresh"); } catch (e) { window.location.reload(); } 2155 } 2156 else { 2157 alertUser("There has been a problem, please try again or use a different login method"); 2158 } 2159 }); 2160 } 2161 2162 document.addEventListener('AppleIDSignInOnSuccess', (event) => { 2163 2164 // console.log("APPLE SUCCESS EVENT", event); 2165 2166 // alert( 2167 // "APPLE SUCCESS EVENT\n\n" + 2168 // "Has code: " + 2169 // !!event?.detail?.authorization?.code 2170 // ); 2171 2172 var sendUrl = '/auth/apple/callback?code=' + event.detail.authorization.code; 2173 ajaxHandler("GET", sendUrl, "", function (response) { 2174 if (response.responseText == "access") { 2175 window.location.reload(); 2176 } 2177 else { 2178 alertUser("There has been a problem, please try again or use a different login method"); 2179 endEvent(); 2180 } 2181 }); 2182 }); 2183 2184// document.addEventListener("click", function (event) { 2185// if (event.target.closest("#appleid-signin")) { 2186// alert( 2187// "APPLE BUTTON COUNT:" +document.querySelectorAll("#appleid-signin").length 2188// ); 2189// } 2190// }); 2191 2192 function startAppleLogin() { 2193 2194 var btn = document.querySelector("#appleid-signin"); 2195 2196 if (btn) { 2197 btn.click(); 2198 } 2199} 2200 2201// document.addEventListener("AppleIDSignInOnSuccess", function (event) { 2202// alert( 2203// "APPLE SUCCESS EVENT\n\n" + 2204// JSON.stringify(event.detail, null, 2) 2205// ); 2206 2207// if ( 2208// !event.detail || 2209// !event.detail.authorization || 2210// !event.detail.authorization.code 2211// ) { 2212// alert("Apple success event fired, but no code was returned."); 2213// return; 2214// } 2215 2216// var sendUrl = 2217// "/auth/apple/callback?code=" + 2218// encodeURIComponent(event.detail.authorization.code); 2219 2220// ajaxHandler("GET", sendUrl, "", function (response) { 2221// alert( 2222// "APPLE AJAX FINISHED\n\n" + 2223// "Status: " + response.status + "\n" + 2224// "ReadyState: " + response.readyState + "\n" + 2225// "Response: " + response.responseText 2226// ); 2227 2228// if (response.responseText === "access") { 2229// window.location.reload(); 2230// } else { 2231// alertUser( 2232// "There has been a problem, please try again or use a different login method" 2233// ); 2234// endEvent(); 2235// } 2236// }); 2237// }); 2238 2239// document.addEventListener("AppleIDSignInOnFailure", function (event) { 2240// alert( 2241// "APPLE FAILURE EVENT\n\n" + 2242// JSON.stringify(event.detail, null, 2) 2243// ); 2244// }); 2245 2246// (function watchAppleSignIn() { 2247// var timer = setInterval(function () { 2248// if ( 2249// window.AppleID && 2250// AppleID.auth && 2251// typeof AppleID.auth.signIn === "function" && 2252// !AppleID.auth.signIn.__watched 2253// ) { 2254// clearInterval(timer); 2255 2256// var originalAppleSignIn = AppleID.auth.signIn.bind(AppleID.auth); 2257
2258// function watchedAppleSignIn() { 2259// alert( 2260// "APPLE SIGN-IN CALLED\n\n" + 2261// "Time: " + new Date().toISOString() + "\n\n" + 2262// "Stack:\n" + new Error().stack 2263// ); 2264 2265// return originalAppleSignIn.apply(null, arguments); 2266// } 2267 2268// watchedAppleSignIn.__watched = true; 2269// AppleID.auth.signIn = watchedAppleSignIn; 2270// } 2271// }, 100); 2272// })(); 2273 2274// document.addEventListener("click", function (event) { 2275// var appleButton = event.target.closest( 2276// "#appleid-signin, .appleid-signin, [data-appleid-signin]" 2277// ); 2278 2279// if (!appleButton) { 2280// return; 2281// } 2282 2283// alert( 2284// "APPLE BUTTON CLICK\n\n" + 2285// "Time: " + new Date().toISOString() + "\n" + 2286// "Target: " + event.target.tagName + "\n" + 2287// "Button ID: " + appleButton.id + "\n" + 2288// "Button class: " + appleButton.className 2289// ); 2290// }, true); 2291 2292// setTimeout(function () { 2293// var buttons = document.querySelectorAll( 2294// "#appleid-signin, .appleid-signin, [data-appleid-signin]" 2295// ); 2296 2297// alert( 2298// "APPLE BUTTON COUNT: " + buttons.length + "\n\n" + 2299// Array.from(buttons).map(function (button, index) { 2300// return ( 2301// (index + 1) + ": " + 2302// button.outerHTML.substring(0, 300) 2303// ); 2304// }).join("\n\n") 2305// ); 2306// }, 1500); 2307 2308 document.addEventListener('AppleIDSignInOnFailure', (event) => { 2309 alertUser("An error occured while signing in with AppleId") 2310 }); 2311 2312 function myProfile() { 2313 var sendUrl = "/profilx"; var sendData = {}; 2314 ajaxHandler("GET", sendUrl, "", function (response) { 2315 if (response.responseText == "error") { alertUser("An error occured while loading your information from server. Please try again."); } 2316 else { 2317 try { var y = response.responseJSON; } catch (e) { alertUser("An error occured while loading your information from server. Please try again."); return; } 2318 $('#email1x').val(y.email); 2319 $('#name1x').val(y.name); 2320 $('#telephone1x').val(y.telephone); 2321 $('#address1x').val(y.address); 2322 $('#postcode1x').val(y.postcode); 2323 if (y.emailOrder == 1) { 2324 $('#emailswitch').prop('checked', true); 2325 } 2326 $('#profileModal').modal('show'); 2327 } 2328 }); 2329 } 2330 2331 $("#addressModal").submit(function (e) { 2332 2333 stopForm(e); 2334 var data = {}; 2335 data.name = $('#contactName2x').val(); 2336 data.telephone = $('#telephone2x').val(); 2337 data.address = $('#address2x').val(); 2338 data.postcode = $('#postcode2x').val(); 2339 if (data.address == "" || (data.address).length < 2) { alertUser("Your address should have more than 2 characters"); endEvent(); return; } 2340 if (data.postcode == "" || (data.postcode).length < 4) { alertUser("Please enter a valid postcode"); endEvent(); return; } 2341 2342 2343 data.telephone = getValidTelephone('#telephone2x'); 2344 2345if (!data.telephone) { 2346 endEvent(); 2347 return; 2348} 2349 2350 2351 var sendUrl = "/updateAddress"; 2352 ajaxHandler("POST", sendUrl, data, function (response) { 2353 if (response.responseText == 'Success') { 2354 $('#addressModal').modal('hide'); alertUser("You have updated your information"); 2355 $('#addressCustomer').val(data.address); 2356 $('#postcodeCustomer').val(data.postcode); 2357 $('#telCustomer').val(data.telephone); 2358 $('#customerName').val(data.name); 2359 endEvent(); return; 2360 } 2361 else { endEvent(); alertUser("There has been a problem. Please try again later."); } 2362 }); 2363 }); 2364 2365 function lostPassword() { 2366 $('#loginModal').modal('hide'); 2367 $('#fgModal').modal('show'); 2368 } 2369 2370 function loginFormOpen() { 2371 $("#lostPassword").hide(); 2372 $("#lostPasswordOpen").show(); 2373 $("#loginFormOpen").hide(); 2374 $("#loginForm").show(); 2375 $('#loginHeader').text("Login"); 2376 $("#forgotPass2").hide(); 2377 } 2378
2379 function showMessage(cmessage, subject, situation, reply) { 2380 var shopTel = $('#shopTel').text(); 2381 $('#situation').text(situation); 2382 $('#yourMessage').html("<h1 class='yourMessage'>Your Message</h1>" + "<h1 class='yourMessagex'>" + cmessage + "</h1>"); 2383 if (reply) { 2384 $('#shopReply').html("<h1 class='shopReply'>Shop's Reply</h1>" + "<h1 class='shopReplyx'>" + reply + "</h1>"); 2385 $('#generic').html("<h1 class='shopGeneric'>If this reply did not satisfy you please give us a call. <span style='color:red; width: 100%;'>" + shopTel + "</span></h1>"); 2386 } 2387 else { 2388 $('#shopReply').html("<h1 class='shopGeneric'>Your message hos not been replied by shop. Please allow us some time or give us a call</h1>"); 2389 } 2390 $('#messageModal').modal('show'); 2391 } 2392 2393 $(".cookieConsentOK").on("click", function () { 2394 $("#cookieConsent").css("display", "none"); 2395 sessionStorage.setItem("999", "Cookies Ok"); 2396 var sendUrl = "/cookie"; 2397 ajaxHandler("GET", sendUrl, "noData", function (response) { 2398 if (response.responseText == 'success') { } 2399 else { endEvent(); } 2400 }); 2401 }); 2402 2403 function repeatOrder(orderId, rtype) { 2404 var sendUrl = '/repeatOrder' + '?id=' + orderId + '&rtype=' + rtype; 2405 ajaxHandler("GET", sendUrl, "noData", function (response) { 2406 if (response.responseText == 'error') { alertUser("Order Could Not be Found"); } 2407 else { 2408 var y = response.responseJSON; var currentLength = "", itemInfo = ""; 2409 for (var i = 0; i < y.length; ++i) { 2410 currentLength = localStorage.length + 1; while (localStorage.getItem(currentLength) != null) { ++currentLength; } 2411 y[i].basePrice = parseFloat(y[i].basePrice); 2412 y[i].fullPrice = parseFloat(y[i].fullPrice); 2413 if (y[i].availability == 0) { 2414 console.log("yi ney",y[i]); 2415 if(y[i].basePrice!=0){ 2416 alertUser(y[i].name + " is not available at the moment. The remainder of your order is added to your basket"); 2417 } 2418 2419 } 2420 else { 2421 localStorage.setItem(currentLength, JSON.stringify(y[i])); 2422 2423 } 2424 } 2425 loadPopUp(); 2426 $('#popupModal').modal('show'); 2427 } 2428 }); 2429 } 2430 2431 function stopForm(event) { 2432 event.preventDefault(); 2433 event.stopPropagation(); 2434 event.stopImmediatePropagation(); 2435 $('.submitButtons').prop('disabled', true); 2436 } 2437 2438 2439 $("#formAddress").submit(function (e) { 2440 stopForm(e); 2441 var sendData = {}; 2442 var sendUrl = '/addressChange'; 2443 sendData.address = $('#addressChange1').val(); 2444 sendData.postcode = $('#postChange1').val(); 2445 ajaxHandler("POST", sendUrl, sendData, function (response) { 2446 if (response.responseText == "Successfully Updated") { 2447 $("#ajaxMessage3").text("Your Address Successfully Updated"); 2448 alertUser("Your Address Successfully Updated"); 2449 } 2450 else { $("#ajaxMessage3").text("An error occured please try later"); } 2451 endEvent(); 2452 }); 2453 }); 2454 2455 $("#formPassword").submit(function (e) { 2456 stopForm(e); 2457 var sendData = {}; 2458 var sendUrl = '/passwordChange'; 2459 sendData.password = $("#password3").val(); 2460 sendData.verifypassword = $("#retype").val(); 2461 if (sendData.password != sendData.verifypassword) { 2462 $("#ajaxMessage2").text("Passwords do not match").fadeIn("slow").delay(1500).fadeOut("slow"); 2463 endEvent(); 2464 return; 2465 } 2466 ajaxHandler("POST", sendUrl, sendData, function (response) { 2467 if (response.responseText == "Successfully Updated") { alertUser("Your password is updated"); } 2468 else { alertUser("An error occured"); } 2469 endEvent(); 2470 }); 2471 }); 2472 2473 $("#formDetails").submit(function (e) { 2474 stopForm(e); 2475 var sendData = {}; 2476 var sendUrl = '/profileUpdate'; 2477 var sendData = {}; 2478 sendData.name = $("#nameC").val(); 2479 sendData.email = $("#emailC").val(); 2480 sendData.telephone = $("#telephoneC").val(); 2481 var emailMe = document.getElementById("emailPreferences").checked; 2482 if (emailMe == false) { sendData.emailPreferences = 0; } else { sendData.emailPreferences = 1; } 2483 ajaxHandler("POST", sendUrl, sendData, function (response) { 2484 if (response.responseText == "Successfully Updated") { 2485 $("#ajaxMessage1").html('Your Details Successfully Updated'); 2486 alertUser("Your details successfully updated"); 2487 } 2488 else { $("#ajaxMessage1").html('This Email is Used By Another User.'); } 2489 endEvent(); 2490 }); 2491 }); 2492 2493 function termsconditions() { 2494 $('#termsModalBody').load('/terms?q=pop'); 2495 $('#termsModal').modal('show'); 2496 $('#termheader').text('Terms and privacy policy for our applications and website'); 2497 } 2498 2499 function allergy() { 2500 $('#termsModalBody').load('/allergy?q=pop'); 2501 $('#termsModal').modal('show'); 2502 $('#termheader').text('Allergen Information'); 2503 } 2504 2505 2506 function triggerAlert(message) { alertUser(message + ' can not be empty.'); } 2507 function endEvent() { $('.submitButtons').removeAttr('disabled'); } 2508 2509 function stripeTokenHandler(token) { var sendData = {}; var form = document.getElementById('payment-form'); var hiddenInput = document.createElement('input'); hiddenInput.setAttribute('type', 'hidden'); hiddenInput.setAttribute('name', 'stripeToken'); hiddenInput.setAttribute('value', token.id); form.appendChild(hiddenInput); form.submit(); $("payment-form").trigger("reset"); } 2510 2511 function clearCarts() { 2512 localStorage.clear(); 2513 loadPopUp(); 2514 $('.cart-item').remove(); 2515 fullPriceTotal = 0;
2516 try { window.location.reload(); } catch (e) { } 2517 } 2518 2519 function modalHide() { 2520 setTimeout(function () { 2521 $('#alertUser').modal('hide'); 2522 $('.modal-backdrop').remove(); 2523 }, 60); 2524 } 2525 2526 $('#alertUser').on('hidden.bs.modal', function () { 2527 //remove the backdrop 2528 $('.modal-backdrop').remove(); 2529 }) 2530 2531 function alertUser(message) { 2532 if (message.length < 1) { return; } 2533 var body = ''; 2534 body += '<div class="modal fade " id="alertUser" tabindex="-1" role="dialog" aria-labelledby="alertUser" style="z-index: 99999;" ><div class="modal-dialog modal-sm" role="dialog" style="text-align: center; top: 17%;"><div class="modal-content" style="margin-top: 2%; background: #f4f2ed; border:none;"> <button type="button" class="close_new2x" data-backdrop="" data-dismiss="modal" aria-label="Close" onclick="modalHide();"> Ã </button><div class="modal-body modal-alertxx" >' + message + '</div> </div></div></div>'; 2535 document.getElementById("modalArea3").innerHTML = body; 2536 $('#alertUser').modal('show'); 2537 } 2538 $(document).on('hidden.bs.modal', '.modal', function () { 2539 $('.modal:visible').length && $(document.body).addClass('modal-open'); 2540 }); 2541 document.addEventListener('touchmove', function (event) { 2542 if (event.scale !== 1) { event.preventDefault(); } 2543 }, false); 2544 2545 function enableCart() { 2546 $('#popupModal').modal('show'); 2547 } 2548 2549 function notavailable() { 2550 alertUser("Sorry this item is out of stock for today."); 2551 } 2552 2553 2554 2555 $(window).ready(function () { loadPopUp(); }); 2556 2557 2558function getCartKeys() { 2559 return Object.keys(localStorage) 2560 .filter(k => /^\d+$/.test(k)) // ONLY numeric keys are cart items 2561 .sort((a, b) => Number(a) - Number(b)); 2562} 2563 2564function normalizeItem(raw) { 2565 2566 //const item = raw && typeof raw === 'object' ? raw : {}; 2567 const item = (raw && typeof raw === 'object' && !Array.isArray(raw)) ? raw : {}; 2568 if (!item.rName) item.rName = item.name || ''; 2569 item.customization = item.customization || {}; 2570 item.customization.additions = item.customization.additions || ''; 2571 item.customization.features = item.customization.features || ''; 2572 item.customization.extraxyz = item.customization.extraxyz || ''; 2573 2574 item.amount = Number(item.amount || 1); 2575 item.basePrice = Number(item.basePrice || 0); 2576 item.fullPrice = Number(item.fullPrice || item.basePrice || 0); 2577 2578 // Keep your existing BOGO model fields stable 2579 2580 if (item.rPrice == null) { 2581 item.rPrice = Number(item.basePrice || item.fullPrice || 0); 2582} 2583 2584 //if (item.rPrice == null) item.rPrice = item.basePrice; 2585 if (item.ePrice == null) { 2586 // extra cost = full - base (never negative) 2587 const ep = Number(item.fullPrice) - Number(item.basePrice); 2588 item.ePrice = ep > 0 ? ep : 0; 2589 } 2590 2591 // Normalize typex 2592 if (item.typex == null) item.typex = 'no'; 2593 2594 return item; 2595} 2596 2597// Apply BOGO pricing to items in storage (only if needed) 2598// function applyBogoPricingIfNeeded() { 2599// const keys = getCartKeys(); 2600// if (!keys.length) return; 2601 2602// const items = []; 2603// const rest = []; 2604// const groupedUnits = {}; 2605// let hasBogo = false; 2606 2607// for (const key of keys) { 2608// const raw = localStorage.getItem(key); 2609// if (!raw) { localStorage.removeItem(key); continue; } 2610 2611// let temp; 2612// try { temp = JSON.parse(raw); } 2613// catch (e) { localStorage.removeItem(key); continue; } 2614 2615// temp = normalizeItem(temp); 2616// temp._key = key; 2617 2618// if (isBogoEligibleClient(temp)) { 2619// hasBogo = true; 2620// items.push(temp); 2621 2622// const groupKey = getPromoGroupKeyClient(temp); 2623// if (!groupedUnits[groupKey]) groupedUnits[groupKey] = []; 2624 2625// const amount = parseInt(temp.amount, 10) || 1; 2626// for (let q = 0; q < amount; q++) { 2627// groupedUnits[groupKey].push({ 2628// key: key, 2629// basePrice: Number(temp.rPrice || temp.basePrice || 0) 2630// }); 2631// } 2632// } else { 2633// rest.push(temp); 2634// } 2635// } 2636 2637// if (!hasBogo) return; 2638 2639// const discountedCounts = {}; 2640 2641// for (const groupKey in groupedUnits) { 2642// const units = groupedUnits[groupKey]; 2643// units.sort((a, b) => a.basePrice - b.basePrice); 2644 2645// let divider = parseInt(groupKey.split("|")[0], 10); 2646// if (!isFinite(divider) || divider <= 0) divider = 2; 2647 2648// const discountCount = Math.floor(units.length / divider); 2649 2650// for (let i = 0; i < discountCount; i++) { 2651// discountedCounts[units[i].key] = (discountedCounts[units[i].key] || 0) + 1; 2652// } 2653// } 2654 2655// for (let i = 0; i < items.length; i++) { 2656// const it = items[i]; 2657 2658// const amount = parseInt(it.amount, 10) || 1; 2659// let discountedCount = discountedCounts[it._key] || 0; 2660// if (discountedCount > amount) discountedCount = amount; 2661 2662// const normalCount = amount - discountedCount; 2663 2664// const rawTypex = String(it.typex || '').trim().toLowerCase(); 2665// const pct = Math.max(0, Math.min(100, parseFloat(rawTypex) || 0)); 2666 2667// const normalBase = Number(it.rPrice || it.basePrice || 0); 2668// const extra = Number(it.ePrice || 0); 2669// const discountedBase = getDiscountedBaseClient(it); 2670 2671// it.basePrice = Number(((normalCount * normalBase) + (discountedCount * discountedBase)).toFixed(2)); 2672// it.fullPrice = Number((it.basePrice + (extra * amount)).toFixed(2)); 2673 2674// const originalName = it.rName || it.name || ''; 2675// it.displayName = originalName;
2676// it.name = originalName; 2677 2678// if (discountedCount > 0) { 2679// if (rawTypex === "0") { 2680// it.displayName = originalName + " (FREE)"; 2681// it.name = originalName + " (FREE)"; 2682// } else if (rawTypex.indexOf("fixed_") === 0) { 2683// const fixedPrice = getFixedPriceFromTypexClient(it.typex, it.portion); 2684// if (fixedPrice !== null) { 2685// it.displayName = originalName + " (£" + fixedPrice.toFixed(2) + ")"; 2686// it.name = originalName + " (£" + fixedPrice.toFixed(2) + ")"; 2687// } 2688// } else if (pct < 100) { 2689// it.displayName = originalName + " (" + pct + "% OFF)"; 2690// it.name = originalName + " (" + pct + "% OFF)"; 2691// } 2692// } 2693// } 2694 2695// const all = items.concat(rest).sort((a, b) => Number(a.fullPrice) - Number(b.fullPrice)); 2696 2697// for (const k of keys) localStorage.removeItem(k); 2698 2699// for (let i = 0; i < all.length; i++) { 2700// delete all[i]._key; 2701// localStorage.setItem(String(i + 1), JSON.stringify(all[i])); 2702// } 2703// } 2704 2705function applyBogoPricingIfNeeded() { 2706 const keys = getCartKeys(); 2707 if (!keys.length) return; 2708 2709 const items = []; 2710 const rest = []; 2711 const groupedUnits = {}; 2712 let hasBogo = false; 2713 2714 for (const key of keys) { 2715 const raw = localStorage.getItem(key); 2716 if (!raw) { localStorage.removeItem(key); continue; } 2717 2718 let temp; 2719 try { temp = JSON.parse(raw); } 2720 catch (e) { localStorage.removeItem(key); continue; } 2721 2722 temp = normalizeItem(temp); 2723 temp._key = key; 2724 2725 if (isBogoEligibleClient(temp)) { 2726 hasBogo = true; 2727 items.push(temp); 2728 2729 const groupKey = getPromoGroupKeyClient(temp); 2730 if (!groupedUnits[groupKey]) groupedUnits[groupKey] = []; 2731 2732 const amount = parseInt(temp.amount, 10) || 1; 2733 for (let q = 0; q < amount; q++) { 2734 groupedUnits[groupKey].push({ 2735 key: key, 2736 basePrice: Number(temp.rPrice || temp.basePrice || 0) 2737 }); 2738 } 2739 } else { 2740 rest.push(temp); 2741 } 2742 } 2743 2744 if (!hasBogo) return; 2745 2746const discountedCounts = {}; 2747 2748for (const groupKey in groupedUnits) { 2749 const units = groupedUnits[groupKey]; 2750 2751 2752 units.sort((a, b) => b.basePrice - a.basePrice); 2753 2754 let divider = parseInt(groupKey.split("|")[0], 10); 2755 if (!isFinite(divider) || divider <= 0) divider = 2; 2756 2757 for (let i = divider - 1; i < units.length; i += divider) { 2758 discountedCounts[units[i].key] = 2759 (discountedCounts[units[i].key] || 0) + 1; 2760 } 2761} 2762 2763 for (let i = 0; i < items.length; i++) { 2764 const it = items[i]; 2765 2766 const amount = parseInt(it.amount, 10) || 1; 2767 let discountedCount = discountedCounts[it._key] || 0; 2768 if (discountedCount > amount) discountedCount = amount; 2769 2770 const normalCount = amount - discountedCount; 2771 2772 const rawTypex = String(it.typex || '').trim().toLowerCase(); 2773 const pct = Math.max(0, Math.min(100, parseFloat(rawTypex) || 0)); 2774 2775 const normalBase = Number(it.rPrice || it.basePrice || 0); 2776 const extra = Number(it.ePrice || 0); 2777 const discountedBase = getDiscountedBaseClient(it); 2778 2779 it.basePrice = Number(((normalCount * normalBase) + (discountedCount * discountedBase)).toFixed(2)); 2780 it.fullPrice = Number((it.basePrice + (extra * amount)).toFixed(2)); 2781 2782 const originalName = it.rName || it.name || ''; 2783 it.displayName = originalName; 2784 it.name = originalName; 2785 2786 if (discountedCount > 0) { 2787 if (rawTypex === "0") { 2788 it.displayName = originalName + " (FREE)"; 2789 it.name = originalName + " (FREE)"; 2790 } else if (rawTypex.indexOf("fixed_") === 0) { 2791 const fixedPrice = getFixedPriceFromTypexClient(it.typex, it.portion); 2792 if (fixedPrice !== null) { 2793 it.displayName = originalName + " (£" + fixedPrice.toFixed(2) + ")"; 2794 it.name = originalName + " (£" + fixedPrice.toFixed(2) + ")"; 2795 } 2796 } else if (pct < 100) { 2797 it.displayName = originalName + " (" + pct + "% OFF)"; 2798 it.name = originalName + " (" + pct + "% OFF)"; 2799 } 2800 } 2801 } 2802 2803 const all = items.concat(rest).sort((a, b) => Number(a.fullPrice) - Number(b.fullPrice)); 2804 2805 for (const k of keys) localStorage.removeItem(k); 2806 2807 for (let i = 0; i < all.length; i++) { 2808 delete all[i]._key; 2809 localStorage.setItem(String(i + 1), JSON.stringify(all[i])); 2810 } 2811} 2812 2813 2814 2815function popupNumber() { 2816 const count = getCartKeys().length; // numeric cart keys only 2817 const total = (Number(fullPriceTotal) || 0).toFixed(2); 2818 2819 $('.basketxyz').html(` ${count} Items - £${total}`); 2820 try { window.webkit.messageHandlers["scriptHandler"].postMessage((getCartKeys().length).toString()); } catch (e) { } 2821} 2822 2823 2824// Single entry point: rebuild prices (BOGO if needed) then render from scratch 2825function loadPopUp() { 2826 // clear UI + totals so no duplicates ever 2827 2828 fullPriceTotal = 0; 2829 2830 // clear ALL possible render targets (pick the ones you actually use) 2831 try { $('.popupxyz').html(''); } catch (e) {} 2832 2833 2834 2835 2836 // adjust prices if BOGO items exist 2837 applyBogoPricingIfNeeded(); 2838 2839 // render all cart items 2840 const keys = getCartKeys(); 2841 for (const key of keys) { 2842 popupCart(key); 2843 } 2844 2845 if (keys.length <= 0) { 2846 $('.basketxyz').html(' 0 Items'); 2847 } else { 2848 popupNumber(); 2849 } 2850} 2851 2852// Remove: simplest + correct for BOGO (full redraw) 2853function removePopUp(removeId, priceId) { 2854 localStorage.removeItem(String(removeId)); 2855 loadPopUp(); 2856 try { lcheckout(); } catch (e) { } 2857} 2858 2859// Core render for one item (defensive) â based on your normal version :contentReference[oaicite:2]{index=2} 2860var fullPriceTotal = 0; 2861 2862function popupCart(sessionKey) { 2863 const raw = localStorage.getItem(sessionKey); 2864 if (!raw) return; 2865 2866 let itemInfo; 2867 try { 2868 itemInfo = JSON.parse(raw); 2869 } catch (e) { 2870 localStorage.removeItem(sessionKey); 2871 return; 2872 } 2873 2874 itemInfo = normalizeItem(itemInfo); 2875 const itemFeatures = itemInfo.customization; 2876 const additions = itemFeatures.additions || ''; 2877 const features = itemFeatures.features || ''; 2878 2879 const portion = itemInfo.portion || ''; 2880 const amount = Number(itemInfo.amount) || 0; 2881 const fullPrice = Number(itemInfo.fullPrice) || 0; 2882 const image = itemInfo.image || ''; 2883 //const name = itemInfo.name || ''; 2884 const name = itemInfo.displayName || itemInfo.name || ''; 2885 2886 2887 let popupBody = ''; 2888 2889 popupBody += '<div class="cart-item col-xs-8 popupId' + sessionKey + '">'; 2890 popupBody += ' <div class="cart-item-left">
2890<img src="' + image + '" class="cartItemImages"></div>'; 2891 popupBody += ' <div class="cart-item-right">'; 2892 popupBody += ' <h6 class="cartItemNames">' + amount + ' x ' + portion + ' - ' + name; 2893 2894 popupBody += ' <button type="button" class="close_new2" ' + 2895 ' onclick="removePopUp(' + sessionKey + ',' + fullPrice + ')" ' + 2896 ' data-json="' + sessionKey + '" data-pricefull="' + fullPrice + '">' + 2897 ' <svg viewBox="0 0 24 24" class="close_new3 cart-remove-icon"><path d="M3 6h18"></path><path d="M8 6V4h8v2"></path><path d="M6 6l1 15h10l1-15"></path><path d="M10 10v7"></path><path d="M14 10v7"></path></svg> </button>'; 2898 popupBody += ' </h6>'; 2899 2900 popupBody += additions + features; 2901 2902 popupBody += ' <h6 class="ptotal">Product Total' + 2903 ' <span style="float:right; right:0; position:absolute; color:black;">' + 2904 ' £' + fullPrice.toFixed(2) + 2905 ' </span>' + 2906 ' </h6>'; 2907 popupBody += ' </div>'; 2908 popupBody += '</div>'; 2909 2910 // If you also use .popupxyz container in some templates 2911 var el1 = document.getElementById("cartPopUpx"); 2912if (el1) el1.innerHTML += popupBody; 2913else { try { $('.popupxyz').append(popupBody); } catch (e) {} } 2914 2915 2916 fullPriceTotal += fullPrice; 2917 fullPriceTotal = Math.round(fullPriceTotal * 100) / 100; 2918} 2919 2920function cartChanged() { 2921 loadPopUp(); // recalculates BOGO + redraws + updates basketxyz 2922 try { lcheckout(); } catch(e) {} 2923} 2924 2925 2926 </script>
2926 2927<style> 2928 2929.col-xs-6xx { 2930 max-height: 235px; 2931 height: 235px; 2932 align-items: center; 2933 align-content: center; 2934} 2935 2936.itemNames { 2937 font-size: 18px; 2938 /* height: 27px; */ 2939 margin-top:0 !important; 2940 margin-bottom: 0 !important; 2941 min-width: 120px; 2942 max-height: 18px; 2943} 2944 2945.menuImage { 2946 margin-left: 9px; 2947 display: none; 2948} 2949 2950.explainItem { 2951 line-height: 1; 2952 color: #3a3838; 2953 font-size: 12px; 2954 text-align: center; 2955 font-family: 'Source Sans Pro', sans-serif; 2956 font-weight: bold; 2957 /* page-break-after: always; */ 2958 display: block; 2959 /* padding: 8px 0px 2px 5px; */ 2960 padding: 15px 0px 0px 0px; 2961 font-size: 14px; 2962} 2963 2964 .explainP { 2965 padding-left: 1px; 2966 padding-right: 1px; 2967 /* height: 37px; */ 2968 line-height: 15px; 2969 font-weight: 700; 2970 align-items: flex-start; 2971 align-self: center; 2972 display: inline-flex; 2973 text-align: center; 2974 overflow-y: auto; 2975 color: #515151; 2976 font-family: 'Open-Sans'; 2977 text-align: center; 2978 padding: 0 3px; 2979 height: unset; 2980 text-align: center; 2981 max-height: unset; 2982 margin-right: -8px; 2983 /* margin-top: 33px; */ 2984 padding-top: 16px; 2985height: auto; 2986} 2987 2988.wrapfmodals { 2989 2990 display: ruby; 2991} 2992 2993 2994</style> 2995
2996<script> 2997 2998$(document).on('click', ".wrapItems", function (e) { 2999var t=$('#foodInfo').text(); 3000if(t.includes("2 Toppings")){ 3001maximumToppings=2; 3002} 3003else{ 3004maximumToppings=4; 3005} 3006 3007 3008if(t.includes("Calzone")){ 3009 3010$('#stuffedCrust24').closest('label').hide(); 3011 3012 3013$('label[for="stuffedCrust24"]').hide(); 3014 3015console.log("bu neyki",$('label[for="stuffedCrust24"]').text()); 3016} 3017 3018}); 3019 3020 3021 3022 // Core modal builder 3023 window.showBoostModal = function (opts) { 3024 opts = opts || {}; 3025 var id = 'boost-generic-modal-overlay'; 3026 3027 // Avoid duplicates 3028 var existing = document.getElementById(id); 3029 if (existing) existing.remove(); 3030 3031 var overlay = document.createElement('div'); 3032 overlay.id = id; 3033 overlay.style.position = 'fixed'; 3034 overlay.style.inset = '0'; 3035 overlay.style.background = 'rgba(0, 0, 0, 0.6)'; 3036 overlay.style.zIndex = '999999'; 3037 overlay.style.display = 'flex'; 3038 overlay.style.alignItems = 'center'; 3039 overlay.style.justifyContent = 'center'; 3040 3041 var box = document.createElement('div'); 3042 box.style.background = '#ffffff'; 3043 box.style.borderRadius = '10px'; 3044 box.style.padding = '18px 16px'; 3045 box.style.maxWidth = '320px'; 3046 box.style.width = '80%'; 3047 box.style.boxShadow = '0 8px 20px rgba(0,0,0,0.3)'; 3048 box.style.textAlign = 'center'; 3049 box.style.fontFamily = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'; 3050 3051 var title = document.createElement('div'); 3052 title.textContent = opts.title || 'Notice'; 3053 title.style.fontWeight = '700'; 3054 title.style.fontSize = '18px'; 3055 title.style.marginBottom = '8px'; 3056 3057 var msg = document.createElement('div'); 3058 msg.textContent = opts.message || ''; 3059 msg.style.fontSize = '14px'; 3060 msg.style.marginBottom = '14px'; 3061 msg.style.whiteSpace = 'pre-line'; 3062 3063 var buttonsWrap = document.createElement('div'); 3064 buttonsWrap.style.display = 'flex'; 3065 buttonsWrap.style.justifyContent = opts.showCancel ? 'space-between' : 'center'; 3066 buttonsWrap.style.gap = '10px'; 3067 3068 function close(result) { 3069 overlay.remove(); 3070 if (typeof opts.onResult === 'function') { 3071 opts.onResult(result); 3072 } 3073 } 3074 3075 // OK button 3076 var okBtn = document.createElement('button'); 3077 okBtn.textContent = opts.okText || 'OK'; 3078 okBtn.style.border = 'none'; 3079 okBtn.style.borderRadius = '999px'; 3080 okBtn.style.padding = '8px 20px'; 3081 okBtn.style.fontSize = '14px'; 3082 okBtn.style.fontWeight = '600'; 3083 okBtn.style.cursor = 'pointer'; 3084 okBtn.style.background = '#e53935'; 3085 okBtn.style.color = '#fff'; 3086 okBtn.style.flex = '1'; 3087 okBtn.onclick = function () { close(true); }; 3088 3089 buttonsWrap.appendChild(okBtn); 3090 3091 // Cancel button (for confirm) 3092 if (opts.showCancel) { 3093 var cancelBtn = document.createElement('button'); 3094 cancelBtn.textContent = opts.cancelText || 'Cancel'; 3095 cancelBtn.style.border = '1px solid #ccc'; 3096 cancelBtn.style.borderRadius = '999px'; 3097 cancelBtn.style.padding = '8px 20px'; 3098 cancelBtn.style.fontSize = '14px'; 3099 cancelBtn.style.fontWeight = '500'; 3100 cancelBtn.style.cursor = 'pointer'; 3101 cancelBtn.style.background = '#f5f5f5'; 3102 cancelBtn.style.color = '#333'; 3103 cancelBtn.style.flex = '1'; 3104 cancelBtn.onclick = function () { close(false); }; 3105 buttonsWrap.appendChild(cancelBtn); 3106 } 3107 3108 box.appendChild(title); 3109 box.appendChild(msg); 3110 box.appendChild(buttonsWrap); 3111 overlay.appendChild(box); 3112 document.body.appendChild(overlay); 3113 }; 3114 3115 // Simple alert: one button 3116 window.alertNow = function (message, cb) { 3117 window.showBoostModal({ 3118 title: 'Notice', 3119 message: message, 3120 showCancel: false, 3121 okText: 'OK', 3122 onResult: function () { 3123 if (typeof cb === 'function') cb(); 3124 } 3125 }); 3126 }; 3127 3128 // Confirm-style: two buttons, callback(true/false) 3129 window.confirmNow = function (message, cb) { 3130 window.showBoostModal({ 3131 title: 'Please confirm', 3132 message: message, 3133 showCancel: true, 3134 okText: 'Yes', 3135 cancelText: 'No', 3136 onResult: function (result) { 3137 if (typeof cb === 'function') cb(result); 3138 } 3139 }); 3140 }; 3141 3142 3143 window.showAddressIssueModal = function (message, suggestions, onPick, onUseTyped, onEdit) { 3144 var id = 'boost-address-issue-overlay'; 3145 var existing = document.getElementById(id); 3146 if (existing) existing.remove(); 3147
3148 var overlay = document.createElement('div'); 3149 overlay.id = id; 3150 overlay.style.position = 'fixed'; 3151 overlay.style.inset = '0'; 3152 overlay.style.background = 'rgba(0, 0, 0, 0.6)'; 3153 overlay.style.zIndex = '999999'; 3154 overlay.style.display = 'flex'; 3155 overlay.style.alignItems = 'center'; 3156 overlay.style.justifyContent = 'center'; 3157 overlay.style.color = 'red'; 3158 3159 var box = document.createElement('div'); 3160 box.style.background = '#ffffff'; 3161 box.style.borderRadius = '10px'; 3162 box.style.padding = '18px 20px'; 3163 box.style.maxWidth = '340px'; 3164 box.style.width = '90%'; 3165 box.style.boxShadow = '0 8px 20px rgba(0,0,0,0.3)'; 3166 box.style.fontFamily = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'; 3167 3168 var title = document.createElement('div'); 3169 title.textContent = 'Address check'; 3170 title.style.fontWeight = '700'; 3171 title.style.fontSize = '18px'; 3172 title.style.marginBottom = '8px'; 3173 3174 var msg = document.createElement('div'); 3175 msg.textContent = message || 'We could not confirm this address.'; 3176 msg.style.fontSize = '14px'; 3177 msg.style.marginBottom = '10px'; 3178 msg.style.whiteSpace = 'pre-line'; 3179 3180 box.appendChild(title); 3181 box.appendChild(msg); 3182 3183 3184 if (suggestions && suggestions.length) { 3185 var listWrap = document.createElement('div'); 3186 listWrap.style.maxHeight = '180px'; 3187 listWrap.style.overflowY = 'auto'; 3188 listWrap.style.marginBottom = '10px'; 3189 3190 suggestions.forEach(function (addr) { 3191 var item = document.createElement('button'); 3192 item.textContent = addr; 3193 item.style.display = 'block'; 3194 item.style.width = '100%'; 3195 item.style.textAlign = 'left'; 3196 item.style.marginBottom = '6px'; 3197 item.style.border = '1px solid #ddd'; 3198 item.style.borderRadius = '6px'; 3199 item.style.padding = '6px 8px'; 3200 item.style.fontSize = '13px'; 3201 item.style.cursor = 'pointer'; 3202 item.style.background = '#f7f7f7'; 3203 3204 item.onclick = function () { 3205 overlay.remove(); 3206 if (typeof onPick === 'function') onPick(addr); 3207 }; 3208 3209 listWrap.appendChild(item); 3210 }); 3211 3212 box.appendChild(listWrap); 3213 } 3214var buttonsWrap = document.createElement('div'); 3215buttonsWrap.style.display = 'flex'; 3216buttonsWrap.style.justifyContent = 'space-between'; 3217buttonsWrap.style.gap = '10px'; 3218 3219var hasSuggestions = suggestions && suggestions.length > 0; 3220 3221// Edit button 3222var editBtn = document.createElement('button'); 3223editBtn.textContent = 'Edit address'; 3224editBtn.style.flex = '1'; 3225editBtn.style.border = 'none'; 3226editBtn.style.borderRadius = '999px'; 3227editBtn.style.padding = '8px 10px'; 3228editBtn.style.fontSize = '13px'; 3229editBtn.style.cursor = 'pointer'; 3230editBtn.style.background = '#e53935'; 3231editBtn.style.color = '#fff'; 3232 3233editBtn.onclick = function () { 3234 overlay.remove(); 3235 3236 if (typeof onEdit === 'function') { 3237 onEdit(); 3238 } 3239}; 3240 3241buttonsWrap.appendChild(editBtn); 3242 3243// Only allow the typed address when no suggestions were found 3244if (!hasSuggestions) { 3245 var useTypedBtn = document.createElement('button'); 3246 3247 useTypedBtn.textContent = 'Use address I typed'; 3248 useTypedBtn.style.flex = '1'; 3249 useTypedBtn.style.border = '1px solid #ccc'; 3250 useTypedBtn.style.borderRadius = '999px'; 3251 useTypedBtn.style.padding = '8px 10px'; 3252 useTypedBtn.style.fontSize = '13px'; 3253 useTypedBtn.style.cursor = 'pointer'; 3254 useTypedBtn.style.background = '#f5f5f5'; 3255 3256 useTypedBtn.onclick = function () { 3257 overlay.remove(); 3258 3259 if (typeof onUseTyped === 'function') { 3260 onUseTyped(); 3261 } 3262 }; 3263 3264 buttonsWrap.appendChild(useTypedBtn); 3265} 3266 3267var editNote = document.createElement('div'); 3268 3269editNote.textContent = hasSuggestions 3270 ? 'Only edit your address if you cannot find it in the list above.' 3271 : 'No matching address was found. Check your details or continue with the address you entered.'; 3272 3273editNote.style.fontSize = '13px'; 3274editNote.style.fontWeight = '600'; 3275editNote.style.textAlign = 'center'; 3276editNote.style.color = hasSuggestions ? '#3044c5' : '#e53935'; 3277editNote.style.margin = '8px 0'; 3278 3279box.appendChild(editNote); 3280box.appendChild(buttonsWrap); 3281 overlay.appendChild(box); 3282 document.body.appendChild(overlay); 3283 }; 3284 3285 function getFixedPriceFromTypexClient(typex, portion) { 3286 var rawTypex = String(typex || "").trim().toLowerCase();
3287 var rawPortion = String(portion || "").toLowerCase(); 3288 3289 if (rawTypex.indexOf("fixed_") !== 0) return null; 3290 3291 var config = rawTypex.slice(6); 3292 3293 // fixed_1.99 3294 if (config.indexOf(":") === -1 && config.indexOf("|") === -1) { 3295 var fixedOne = parseFloat(config); 3296 if (isFinite(fixedOne)) return +fixedOne.toFixed(2); 3297 } 3298 3299 // fixed_9:1.99|12:2.99 3300 var portionMatch = rawPortion.match(/\d+(\.\d+)?/); 3301 if (!portionMatch) return null; 3302 3303 var portionNumber = portionMatch[0]; 3304 var pairs = config.split("|"); 3305 3306 for (var i = 0; i < pairs.length; i++) { 3307 var parts = pairs[i].split(":"); 3308 if (parts.length !== 2) continue; 3309 3310 var sizeKey = String(parts[0]).trim().toLowerCase(); 3311 var price = parseFloat(parts[1]); 3312 3313 if (sizeKey === portionNumber && isFinite(price)) { 3314 return +price.toFixed(2); 3315 } 3316 } 3317 3318 return null; 3319} 3320 3321function isBogoEligibleClient(item) { 3322 if (!item) return false; 3323 if (item.name === "Delivery Fee") return false; 3324 if (item.typex == null) return false; 3325 3326 const rawTypex = String(item.typex).trim().toLowerCase(); 3327 if (rawTypex === "" || rawTypex === "no") return false; 3328 if (rawTypex.indexOf("fixed_") === 0) return true; 3329 3330 const pct = parseFloat(rawTypex); 3331 return isFinite(pct) && pct >= 0 && pct <= 100; 3332} 3333 3334// function getPromoGroupKeyClient(item) { 3335// let divider = parseInt(item.divider, 10); 3336// if (!isFinite(divider) || divider <= 0) divider = 2; 3337 3338// const portion = String(item.portion || "").trim().toLowerCase(); 3339 3340// return divider + "|" + portion; 3341// } 3342 3343function getPromoGroupKeyClient(item) { 3344 let divider = parseInt(item.divider, 10); 3345 if (!isFinite(divider) || divider <= 0) divider = 2; 3346 3347 const rawTypex = String(item.typex || "").trim().toLowerCase(); 3348 const portion = String(item.portion || "").trim().toLowerCase(); 3349 3350 if (rawTypex.indexOf("fixed_") === 0 && rawTypex.indexOf(":") !== -1) { 3351 return divider + "|" + rawTypex + "|" + portion; 3352 } 3353 3354 3355 return divider + "|" + rawTypex; 3356} 3357 3358 3359 3360function getDiscountedBaseClient(item) { 3361 const rawTypex = String(item.typex || "").trim().toLowerCase(); 3362 3363 if (rawTypex.indexOf("fixed_") === 0) { 3364 const fixedPrice = getFixedPriceFromTypexClient(item.typex, item.portion); 3365 if (fixedPrice !== null) return fixedPrice; 3366 3367 return Number(item.rPrice || item.basePrice || 0); 3368 } 3369 3370 const pct = parseFloat(rawTypex); 3371 if (!isFinite(pct)) return Number(item.rPrice || item.basePrice || 0); 3372 3373 return Number((Number(item.rPrice || item.basePrice || 0) * (pct / 100)).toFixed(2)); 3374} 3375 3376 </script>
3376 3377
3378<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"b01278eecb134251a5760176d7c1f283","r":1,"spa":2}' crossorigin="anonymous"></script>
3378 3379</body></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.