1<!doctype html> 2<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4 <link rel="canonical" href="//42" /> 5 <!-- Google Tag Manager --> 6
6<script>
vendor: 341 bytes, lines 6-11
6 7 (function(w,d,s,l,i){ w[l]=w[l]||[];w[l].push({ 'gtm.start': 8 new Date().getTime(),event:'gtm.js' });var f=d.getElementsByTagName(s)[0], 9 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 10 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 11 })(window,document,'script','dataLayer','
11GTM-NC7DX9L
vendor: 5 bytes, lines 11-12
11'); 12
12</script>
12 13 <!-- End Google Tag Manager --> <!-- Facebook Pixel Code --> 14
14<script>
vendor: 421 bytes, lines 14-23
14 15 !function(f,b,e,v,n,t,s) 16 { if(f.fbq)return;n=f.fbq=function(){ n.callMethod? 17 n.callMethod.apply(n,arguments):n.queue.push(arguments) }; 18 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 19 n.queue=[];t=b.createElement(e);t.async=!0; 20 t.src=v;s=b.getElementsByTagName(e)[0]; 21 s.parentNode.insertBefore(t,s) }(window, document,'script', 22 'https://connect.facebook.net/en_US/fbevents.js'); 23 fbq('init', '
23812489879998827
vendor: 33 bytes, lines 23-25
23'); 24 fbq('track', 'PageView'); 25
25</script>
25 26 <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=812489879998827&ev=PageView&noscript=1"/></noscript> 27 <!-- End Facebook Pixel Code --> <!-- MS Clarity --> 28
28<script type="text/javascript"> 29 (function(c,l,a,r,i,t,y){ 30 c[a]=c[a]||function(){ (c[a].q=c[a].q||[]).push(arguments) }; 31 t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; 32 y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); 33 })(window, document, "clarity", "script", "vjs9pqjznd"); 34 waitForClarity(function() { 35 window.clarity('consentv2',{ 36 ad_storage: "granted", 37 analytics_storage: "granted" 38 }); 39 }); 40 function waitForClarity(callback){ 41 if(typeof clarity !== 'undefined'){ 42 callback() 43 } else { 44 setTimeout(function () { 45 waitForClarity(callback) 46 }, 100) 47 } 48 }; 49 </script>
49 50 <!-- End MS Clarity --> <title>Food & Beverage</title> 51 <meta charset="utf-8"> 52 <meta name="description" content="* Please note the cafe is not open when the farm park is closed"> 53 <meta name="keywords" content="Food & Beverage"> 54 <meta property="og:locale" content="en_GB" /> 55 <meta property="og:type" content="website" /> 56 <meta property="og:title" content="Food & Beverage" /> 57 <meta property="og:description" content="* Please note the cafe is not open when the farm park is closed" /> 58 <meta property="og:url" content="https://bookings.cantref.com/shop/food-and-beverage" /> 59 <meta property="og:site_name" content="" /> <meta property="og:image" content="" /> 60 <meta name="twitter:card" content="summary" /> 61 <meta name="twitter:description" content="* Please note the cafe is not open when the farm park is closed" /> 62 <meta name="twitter:title" content="Food & Beverage" /> 63 <meta name="twitter:site" content="" /> <meta name="twitter:creator" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5"> 64 <link rel="canonical" href="https://bookings.cantref.com/shop/food-and-beverage" /> 65 <!-- Favicon --> 66 <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png"> 67 <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png"> 68 <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png"> 69 <link rel="manifest" href="/assets/favicon/site.webmanifest"> 70 <link rel="mask-icon" href="/assets/favicon/safari-pinned-tab.svg" color="#5bbad5"> 71 <link rel="shortcut icon" href="/assets/favicon/favicon.ico"> 72 <meta name="msapplication-TileColor" content="#ffd422"> 73 <meta name="msapplication-config" content="/assets/favicon/browserconfig.xml"> 74 <meta name="theme-color" content="#ffffff"> 75 <link href="/common/assets/bootstrap-4.6.2/css/bootstrap.min.css" rel="stylesheet" ><link href="/common/assets/fonts/fontawesome-pro-6.5.2-web/css/all.min.css" rel="stylesheet" media="none" onload="if(media!='all')media='all'"> 76 <link href="/assets/css/style.css?cc=1722873678" rel="stylesheet" type="text/css" media="none" onload="if(media!='all')media='all'"/> 77 <noscript> 78 <link href="/assets/css/style.css?cc=1722873678" rel="stylesheet" type="text/css"/> 79 <link href="/common/assets/fonts/fontawesome-pro-6.5.2-web/css/all.min.css" rel="stylesheet" type="text/css"/> 80 </noscript> 81 <!-- JS --> 82
82<script src="/common/assets/js/jquery-3.7.1.min.js"></script>
82 83 <!-- popper --> 84
84<script src="/common/assets/bootstrap-4.6.2/js/popper.min.js"></script>
84 85 <!-- Bootstrap--> 86
86<script src="/common/assets/bootstrap-4.6.2/js/bootstrap.min.js"></script>
86 87
87<script type="application/ld+json"> 88 { "@context":"http://schema.org", 89 "@type":"Organization", 90 "legalName":"", 91 "url":"", 92 "logo":"", 93 "contactPoint":[{ 94 "@type":"ContactPoint", 95 "telephone":"", 96 "contactType":"customer service" 97 }] 98 } 99</script>
99 <meta name="robots" content="noindex,nofollow"> 100 <link rel="stylesheet" href="/common/assets/fonts/erudus-food-allergy-icons/style.css"> 101 102
102<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 103var WS_USER = "cantref"; 104var BASE_CURRENCY = "GBP"; 105var CURRENCY_STRING = "£"; 106var language = ""; 107//console.log("Including /common/assets/js/common.tpl"); 108</script>
108 109 110
111<script src="/common/assets/js/common.js?v=1783678918" nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M=" ></script>
vendor: 1 bytes, line 111
111
112<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 113var WS_USER = "cantref"; 114var devmode = 0; 115var currency = "£"; 116var USE_V2_JOURNEY = 0; 117var userId = ""; 118var FB_event_id = "6abb24ba73dda0.95237068"; 119var ismobile = ""; 120var displaySessionAlreadyStartedWarning = 0; 121var showActivityPricingBreakdown = 0; 122var todaysDate = '2026-09-29'; 123var usePricingTypeColors = 0; 124var showSpacesFree = 0; // Display spaces available on timeslots 125var showPricingTypes = 0; // Display pricing types under timeslots 126var displayVerifyMembershipDetails = 0; 127var accessCardNoPlusOneError = "Your access card is not eligible for an essential companion ticket. Please contact Nimbus Disability to reassess your requirements, or to check eligibility."; 128var isVouchersOnlyCategory = 0; 129</script>
129 130
131<script src="/shop/includes/js_include.js?v=1788957191" nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M=" ></script>
131 <style> 132 #promotionBanners .carousel-caption { 133 text-shadow: 1px 1px 1px rgba(0,0,0,0.8) 134 color: #fff; 135 } 136 137 #promotionBanners .carousel-caption { 138 justify-content:center; 139 align-items:center; 140 } 141 #promotionBanners .carousel-caption-title, #promotionBanners .carousel-caption-description{ 142 background: rgba(255,255,255,0.4); 143 padding: 5px 10px; 144 145 } 146 147 #promotionBanners .carousel-control-prev-icon, #promotionBanners .carousel-control-next-icon{ 148 background-color: black; 149 border-radius: 50px; 150 overflow:hidden; 151 display:flex; 152 align-items:center; 153 justify-content:center; 154 height: 35px; 155 width:35px; 156 background-size: 20px; 157 background-position: center; 158 } 159 160 161 .notSuitable { 162 opacity: 0.2; 163 } 164 165 </style> 166
166<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 167 $(function() { 168 $("#divAllergensFilter").on("change", "input:checkbox", function() { 169 var allergen = $(this).val(); 170 var checked = 0; 171 if($(this).is(":checked")) checked = 1; 172 173 console.log("allergen: "+allergen); 174 console.log("checked: "+checked); 175 176 $.ajax({ 177 method: "POST", 178 url: "/shop/ajax.php", 179 data: { "saveAllergenFilter":1, "allergen":allergen, "checked":checked }, 180 dataType: "json", 181 }).done(function(data) { 182 }); 183 }); 184 }); 185 </script>
185 186</head> 187<body id="food-and-beverage" class=""> 188 <!-- Google Tag Manager (noscript) -->
vendor: 68 bytes, lines 188-189
188 189<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=
189GTM-NC7DX9L
vendor: 83 bytes, line 189
189" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
190<!-- End Google Tag Manager (noscript) --><a href="#content" class="sr-only">Skip to content</a> 191<!-- wrapper --> 192<div id="wrapper" class="h-100 d-flex flex-column"> 193 <div id="header"> 194 195 <div id="headerWrapper"> 196 <div id="topBar"> 197 <ul class="nav w-100 justify-content-end"> 198 <li class="nav-item d-none d-md-block mr-5"> 199 <a class="nav-link pr-2" href="/booking/select-voucher-type">Redeem vouchers</a> 200 </li> 201 <li class="nav-item "> 202 <a class="nav-link px-2" href="/shop/basket"><i class="fa-regular fa-basket-shopping"></i></a> 203 </li> 204 <li class="nav-item "> 205 <a class="nav-link pl-3 pr-2 pr-md-3 pl-md-2" href="/user/my_account"><i class="fa-regular fa-circle-user"></i></a> 206 </li> 207 208 </ul> 209 </div> 210 <nav class="navbar navbar-expand-lg"> 211 <a href="https://www.cantref.com" class="btn btn-primary"><span class="d-none d-md-inline-block">Return to</span> homepage</a> 212 213 <a href="/booking/select-voucher-type" class="btn btn-primary d-md-none">Redeem</a> 214 </nav> 215 216 </div> 217 <a id="headerLogo" class="" href="https://www.cantref.com"> 218 <img src="/assets/images/logo.webp" height="58px" width="auto" alt="FuseMetrix Group Logo"> 219 </a> 220 </div> <!-- shop/food-and-beverage.tpl --> 221 <div class="bg-white food-beverage-top" id="fnb-content"> 222 <div id="content" class="container py-4"> 223 224 <nav aria-label="breadcrumb"> 225 <ol class="breadcrumb px-0"> 226 <li class="breadcrumb-item"><a href="/shop/food-and-beverage">Menu</a></li> 227 </ol> 228 </nav> 229 <h1 class="text-center">Food & Beverage</h1> 230 231 <div class="mb-1"> 232 * Please note the cafe is not open when the farm park is closed
233 </div> 234 </div> 235 236 </div> 237 <div class="container py-4"> 238 <div class="row"> 239 <div class="col-12 col-md-3"> 240 <div class="collapse navbar-collapse mb-3 mb-md-0" id="navbarFoodMenu"> 241 <div class="list-group"> 242 <a class="" id="cat_tab_26" href="/shop/food-and-beverage?id=26#fnb-content"> 243 <li class="list-group-item list-group-item-action d-flex align-items-center justify-content-between v1 " data-toggle="collapse" data-bs-toggle="collapse" href="#collapse_26" role="button" aria-expanded="false" aria-controls="collapse_26"> 244 <div>Breakfast (9.00am -11.00am) 245 </div><i class="fa-solid fa-chevron-down"></i> 246 </li> 247 </a> 248 <div class="collapse" id="collapse_26"> 249 <a class="list-group-item list-group-item-action " id="cat_tab_27" href="/shop/food-and-beverage?id=27#fnb-content">Breakfast Menu</a> 250 <a class="list-group-item list-group-item-action " id="cat_tab_28" href="/shop/food-and-beverage?id=28#fnb-content">Hot Drinks</a> 251 <a class="list-group-item list-group-item-action " id="cat_tab_37" href="/shop/food-and-beverage?id=37#fnb-content">Cold Drinks</a> 252 </div> 253 <a class="" id="cat_tab_11" href="/shop/food-and-beverage?id=11#fnb-content"> 254 <li class="list-group-item list-group-item-action d-flex align-items-center justify-content-between v1 " data-toggle="collapse" data-bs-toggle="collapse" href="#collapse_11" role="button" aria-expanded="false" aria-controls="collapse_11"> 255 <div>Lunch Menu (11.00am -4.15pm) 256 </div><i class="fa-solid fa-chevron-down"></i> 257 </li> 258 </a> 259 <div class="collapse" id="collapse_11"> 260 <a class="list-group-item list-group-item-action " id="cat_tab_121" href="/shop/food-and-beverage?id=121#fnb-content">Adult Meals</a> 261 <a class="list-group-item list-group-item-action " id="cat_tab_122" href="/shop/food-and-beverage?id=122#fnb-content">Kids Meals</a> 262 <a class="list-group-item list-group-item-action " id="cat_tab_148" href="/shop/food-and-beverage?id=148#fnb-content">Stretched Homemade Pizza - Save 20% when you purchase online</a> 263 <a class="list-group-item list-group-item-action " id="cat_tab_18" href="/shop/food-and-beverage?id=18#fnb-content">Sides</a> 264 <a class="list-group-item list-group-item-action " id="cat_tab_19" href="/shop/food-and-beverage?id=19#fnb-content">Hot Drinks</a> 265 <a class="list-group-item list-group-item-action " id="cat_tab_20" href="/shop/food-and-beverage?id=20#fnb-content">Cold Drinks</a> 266 <a class="list-group-item list-group-item-action " id="cat_tab_21" href="/shop/food-and-beverage?id=21#fnb-content">Cakes</a> 267 <a class="list-group-item list-group-item-action " id="cat_tab_23" href="/shop/food-and-beverage?id=23#fnb-content">Snacks</a> 268 <a class="list-group-item list-group-item-action " id="cat_tab_24" href="/shop/food-and-beverage?id=24#fnb-content">Chocolate / Sweets</a> 269 <a class="list-group-item list-group-item-action " id="cat_tab_25" href="/shop/food-and-beverage?id=25#fnb-content">Alcoholic Drinks</a> 270 <a class="list-group-item list-group-item-action " id="cat_tab_22" href="/shop/food-and-beverage?id=22#fnb-content">Ice Creams</a> 271 </div> 272 </div> 273 </div> 274 275 276 </div> 277 <div class="col-12 col-md-9"> 278 279 <div class="row justify-content-start" id="productWrapper"> 280 <div class="col-12 col-sm-6 productItemWrapper mb-3"> 281 <a class="bg-white p-4 mb-3 productItem fnbProductItem h-100 overflow-hidden d-block" href="/shop/food-and-beverage?id=26"> 282 <div class="row h-100"> 283 <div class="col-6 col-md-7"> 284 <div class="h-100 d-flex flex-column align-items-start justify-content-center"> 285 <div class="" style="max-width:100%; overflow:hidden;"> 286 <h6 class="foodCategoryTitle mb-0">Breakfast (9.00am -11.00am)</h6> 287 </div> 288 <div class="FBCategoryDescription my-3" style="opacity:0.6; font-size:0.9rem;"> 289 (please only order when onsite & ready to collect)... 290 </div> 291 </div> 292 </div> 293 <div class="col-6 d-flex align-items-center col-md-5"> 294 <img class="foodCategoryImg" src="https://cantref.fusemetrix.com/common/inc_imageget.php?icc=1&sc=true&id=26&code=4e732c&crop=400x400&defaulturl=https://cantref.fusemetrix.com/bespoke/no_image.jpg" alt="Breakfast (9.00am -11.00am)" /> 295 </div> 296 </div> 297 </a> 298 </div> 299 <div class="col-12 col-sm-6 productItemWrapper mb-3"> 300 <a class="bg-white p-4 mb-3 productItem fnbProductItem h-100 overflow-hidden d-block" href="/shop/food-and-beverage?id=11"> 301 <div class="row h-100"> 302 <div class="col-6 col-md-7"> 303 <div class="h-100 d-flex flex-column align-items-start justify-content-center"> 304 <div class="" style="max-width:100%; overflow:hidden;"> 305 <h6 class="foodCategoryTitle mb-0">Lunch Menu (11.00am -4.15pm)</h6> 306 </div> 307 <div class="FBCategoryDescription my-3" style="opacity:0.6; font-size:0.9rem;"> 308 (please only order when onsite & ready to collect)... 309 </div> 310 </div> 311 </div> 312 <div class="col-6 d-flex align-items-center col-md-5"> 313 <img class="foodCategoryImg" src="https://cantref.fusemetrix.com/common/inc_imageget.php?icc=3&sc=true&id=11&code=6512bd&crop=400x400&defaulturl=https://cantref.fusemetrix.com/bespoke/no_image.jpg" alt="Lunch Menu (11.00am -4.15pm)" /> 314 </div> 315 </div> 316 </a> 317 </div> 318 </div> 319 320 321 <div class="alert alert-warning" data-toggle="modal" data-target="#allergensModal" data-bs-toggle="modal" data-bs-target="#allergensModal" style="cursor:pointer;"> 322 Important Allergen and Ingredients information can be found here <i class="mdi mdi-chevron-double-right"></i> 323 <div class="d-flex mt-2 align-items-center"> 324 Allergen key: <span class="ml-3 ms-3 badge badge-warning bg-warning">May Contain</span> <span class="badge badge-danger bg-danger">Contains</span> <span class="badge badge-success bg-success">Suitable</span> 325 326 </div> 327 </div> 328 </div> 329 </div> 330 </div> 331 332 <div id="footer" class="mt-auto"> 333 <div class="footerLogo text-center"><img src="/assets/images/logo.webp" height="58px" width="auto" alt="Cantref Adventure Farm Logo"></div> 334 <div id="footerWrapper" class="pb-3"> 335 <div class="container py-4"> 336 <div class="row"> 337 338 </div> 339 <div class="border-top border-bottom py-4 my-4 text-center">
340 <a href="https://www.fusemetrix.com" target="_blank" class="">Powered by <img class="fmxlogo" src="/common/fmx-logos/logo-fmx-group-white.svg" height="30px" width="auto" alt="FuseMetrix Group logo"></a> 341 </div> 342 <div class="row align-items-end"> 343 <div class="col-12 col-lg-8 footerCopy text-center text-lg-left order-2 order-lg-1"> 344 © Copyright 2026 Cantref Adventure Farm | Upper Cantref Farm, Cantref, Brecon, Powys LD3 8LR 345 </div> 346 <div class="col-12 col-lg-4 order-1 order-lg-2"> 347 <div id="socialIcons" class="d-flex align-items-center justify-content-center justify-content-lg-end mb-4 mb-lg-0"> 348 <a href="https://www.facebook.com/Cantref/" class="ml-2 ml-lg-0"><i class="fa-brands fa-facebook-f"></i></a> 349 <a href="https://www.youtube.com/user/CantrefFarmcant" class="ml-2"><i class="fa-brands fa-youtube"></i></a> 350 <a href="https://www.tiktok.com/place/Cantref-Adventure-Farm-21568295483131158" class="ml-2"><i class="fa-brands fa-tiktok"></i></a> 351 <a href="https://www.instagram.com/cantref_adventure_farm/" class="ml-2"><i class="fa-brands fa-instagram"></i></a> 352 <a href="https://x.com/cantref" class="ml-2"><i class="fa-brands fa-twitter"></i></a> 353 </div> 354 </div> 355 </div> 356 </div> 357 </div> 358</div> 359 360 <!-- footer includes file dev/common/footer-includes.php --> 361 362 363
363<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 364 let popups = [] 365 366 function Popup(id, members, page) { 367 this.id = id 368 this.members = members 369 this.page = page 370 } 371 //grab vars from template for checks 372 var scriptName = '/shop/food-and-beverage.php' 373 var isMember = '' 374 375 376 const validPopup = (members, page) => { 377 let allow = true 378 379 switch(page) { 380 case 'home': 381 (scriptName == '/index.php' || scriptName == '/shop/category.php') ? null : allow = false 382 break; 383 case 'my-account': 384 scriptName == '/user/my_account.php' ? null : allow = false 385 break; 386 } 387 388 if(parseInt(members)){ 389 parseInt(isMember) ? null : allow = false 390 } 391 return allow; 392 } 393 </script>
393 394 395
395<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 396 console.log(popups) 397 398 $('document').ready(() => { 399 //loop through the popups arr and try to fire them 400 for(let i = 0; i < popups.length; i++) { 401 let popupCookie = getCookie("popuploaded"+popups[i].id); 402 if(popupCookie == ''){ 403 //check page and member conditions 404 if(validPopup(popups[i].members, popups[i].page)) { 405 $('#sitePopup'+popups[i].id).modal('show') 406 } 407 } 408 } 409 }) 410 function setCookie(cname, cvalue, exdays) { 411 var d = new Date(); 412 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 413 var expires = "expires="+d.toUTCString(); 414 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 415 } 416 417 function getCookie(cname) { 418 var name = cname + "="; 419 var ca = document.cookie.split(';'); 420 for(var i = 0; i < ca.length; i++) { 421 var c = ca[i]; 422 while (c.charAt(0) == ' ') { 423 c = c.substring(1); 424 } 425 if (c.indexOf(name) == 0) { 426 return c.substring(name.length, c.length); 427 } 428 } 429 return ""; 430 } 431 </script>
431 432 433
433<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 434 function genAlertMsg(title, msg, e = {}){ 435 e.target ? e.preventDefault() : null; 436 437 $('#genAlertModalTitle').html(title); 438 $('#genAlertModalBody').html(msg); 439 $('#genAlertModal').modal('show') 440 } 441</script>
441 442 443<div style='z-index: 1000000' id='genAlertModal' class="modal" tabindex="-1"> 444 <div class="modal-dialog"> 445 <div class="modal-content"> 446 <div class="modal-header"> 447 <h5 id='genAlertModalTitle' class="modal-title">Error</h5> 448 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 449 <span aria-hidden="true">×</span> 450 </button> 451 </div> 452 <div class="modal-body"> 453 <p id='genAlertModalBody'></p> 454 </div> 455 <div class="modal-footer"> 456 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> 457 </div> 458 </div> 459 </div> 460</div> 461 <style> 462 #basketUpdateAlert { 463 position: fixed; 464 top: 0; 465 z-index: 99999; 466 right: 0; 467 top: 65px; 468 min-width: 350px; 469 background-color: #fff; 470 display: none; 471 } 472 #basketUpdateAlert p { 473 padding-bottom: 4px; 474 margin-bottom: 0px; 475 } 476</style> 477 478<section id='basketUpdateAlert' class='shadow p-3'> 479 <div class='d-flex align-items-center justify-content-between mb-2'> 480 <strong class='pl-3'>Added to Cart</strong> 481 <div data-action="basketUpdateAlertToggle" class="text-right font-weight-bold">×</div> 482 </div> 483 <div class='mx-auto d-flex'> 484 <div style='max-width: 100px'> 485 <img id='basketUpdateProductImage' src="" alt="placeholder image"> 486 </div> 487 <div class='pl-3'> 488 <p id='basketUpdateProductName'></p> 489 <p id='basketUpdateProductPrice'></p> 490 <p>Qty: <span id='basketUpdateProductQty'></span></p> 491 </div> 492 </div> 493 <div class='mt-2'> 494 <a href="/shop/basket" class='btn basketAlert-btn btn-primary w-100'>Checkout</a> 495 </div> 496</section> 497
498<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 499 $(document).on('click', '[data-action="basketUpdateAlertToggle"]', function (e) { 500 e.preventDefault(); 501 $('#basketUpdateAlert').fadeOut() 502 }); 503 504</script>
504 505 506 507 508 509<style> 510 #foodModal{ 511 padding-right: 0px !important; 512 } 513 #foodModal .modal-dialog { 514 width: 100% !important; 515 height: 100% !important; 516 padding: 0px; 517 margin: 0 auto; 518 } 519 520 521 #foodModal .modal-body{ 522 position:relative; 523 overflow:hidden; 524 } 525 #foodModal .modal-content { 526 min-height: 100%; 527 width:100%; 528 border-radius: 0; 529 } 530 531 #foodModal .modal-body-scroll-content{ 532 position: absolute; 533 top:0px; 534 left:0px; 535 height: 100%; 536 height: 100%; 537 width:100%; 538 padding: 15px; 539 overflow:auto; 540 max-height:100%; 541 } 542 543 #foodModal.autoHeight{ 544 height: auto !important; 545 } 546 547 #foodModal.autoHeight{ 548 height: auto !important; 549 } 550 .flex-center { 551 display: flex; 552 align-items: center; 553 } 554 555 556 @media (min-width: 576px) { 557 #foodModal { 558 padding-top:30px; 559 padding-bottom: 30px; 560 } 561 } 562 563 #foodModal label{ 564 cursor: pointer; 565 } 566 567 #basketBar{ 568 position: fixed; 569 bottom: 0px; 570 left: 0px; 571 width: 100%; 572 background: #fff; 573 color: #fff; 574 text-align:center; 575 transition: bottom .3 ease; 576 z-index: 10; 577 } 578 579 #basketBar.slideDown{ 580 bottom: -100%; 581 transition: bottom .3 ease; 582 } 583 584 #basketBar .btn{ 585 width: 100%; 586 max-width: 450px; 587 } 588 589 .allergens-bg { 590 background-color: white; 591 } 592 593 @media (min-width: 768px) { 594 595 596 } 597 @media (min-width: 768px) { 598 #navbarFoodMenu.collapse:not(.show) { 599 display: block; 600 601 } 602 603 } 604 /* AW - 18/5/21 removed the below as it messes with font sizes. Change these in the websites style.css file 605 @media (max-width: 768px) { 606 .foodCategoryTitle{ 607 font-size: 140%; 608 609 } 610 611 .foodProductTitle{ 612 font-size: 110%; 613 } 614 } 615 */ 616</style> 617<style> 618 .slideUp{ 619 bottom: 0% !important; 620 transition: bottom .3 ease; 621 } 622 623 .choice-rules { 624 display:inline-block; 625 font-size:0.9em; 626 background:#eee; 627 color:#444; 628 margin-right:10px; 629 margin-bottom:10px; 630 } 631 632 .selected-choice { 633 display:inline-block; 634 font-size:0.9em; 635 background:#444; 636 color:#fff; 637 margin-right:10px; 638 margin-bottom:10px; 639 } 640 641 .text-sm { 642 font-size:0.9em; 643 } 644 645 .text-xs { 646 font-size:0.8em; 647 } 648 649 .cursor-pointer { 650 cursor:pointer; 651 } 652 653 .opacity-50 { 654 opacity: 0.5; 655 } 656 657</style> 658
659<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 660 661function addProductChoiceOption(choicekey, optionkey) { 662 // Get the total number of options already selected 663 var totalOptions = 0; 664 $('[data-choicekey="'+choicekey+'"]').each(function() { 665 totalOptions = parseInt(totalOptions+parseInt($(this).val())); 666 }); 667 668 $('[data-choiceoption="'+choicekey+'_'+optionkey+'"]').each(function() { 669 var price = $(this).data('optionprice'); 670 var min = $(this).data('choicemin'); 671 var max = $(this).data('choicemax'); 672 var allowNoOption = $(this).data('choiceallownooption'); 673 674 if(totalOptions >= max && max > 0) { 675 if(max == 1) { 676 alert('Sorry, you can only select 1 option'); 677 } else { 678 alert('Sorry, you can only select '+max+' options'); 679 } 680 } else { 681 var qty = $(this).val(); 682 var newQty = parseInt(parseInt(qty)+1); 683 684 $(this).val(newQty); 685 updateSelectedOptionsList(choicekey); 686 } 687 }); 688} 689 690function reduceProductChoiceOption(choicekey, optionkey) { 691 $('[data-choiceoption="'+choicekey+'_'+optionkey+'"]').each(function() { 692 var qty = $(this).val(); 693 var newQty = parseInt(parseInt(qty)-1); 694 695 if(newQty >= 0) { 696 $(this).val(newQty); 697 updateSelectedOptionsList(choicekey); 698 } 699 }); 700} 701 702function removeProductChoiceOption(choicekey, optionkey) { 703 $('[data-choiceoption="'+choicekey+'_'+optionkey+'"]').val(0); 704 updateSelectedOptionsList(choicekey); 705} 706 707function updateSelectedOptionsList(choicekey) { 708 html = ''; 709 $('[data-choicekey="'+choicekey+'"]').each(function() { 710 if($(this).val() > 0) { 711 var optionkey = $(this).data('optionkey'); 712 html+= '<div class="selected-choice rounded px-2 py-1">'; 713 html+= $(this).val()+' x '+$(this).data('optionname'); 714 html+= '<i class="fas fa-trash text-xs opacity-50 ml-3 ms-3 cursor-pointer" onclick="removeProductChoiceOption('+choicekey+', '+optionkey+');"></i>'; 715 html+= '</div>'; 716 } 717 }); 718 $('#choiceSelections'+choicekey).html(html); 719 recalcPriceModal(); 720} 721 722</script>
722 723<!-- Dev\shop\includes\food-and-beverage.tpl --> 724 <div class="alert alert-success text-center" id="basket-add-confirmation" style="position:fixed;bottom: -100%; left: 0px; width:100%; margin-bottom: 0px; z-index:999;transition: bottom .3 ease;"> 725 <p id='basket-confirm-msg'>Success!</p> 726 </div> 727 <div id="basketBar" class="slideDown py-2 px-2"> 728 <a href="/shop/basket" class="btn btn-secondary">Place Order (<span class="orderTotal">£0.00</span>)</a> 729 </div> 730 731 <!-- Modal allergensModal --> 732 <div class="modal fade" id="allergensModal" tabindex="-1" role="dialog" aria-hidden="true"> 733 <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> 734 <div class="modal-content"> 735 <div class="modal-header"> 736 <h4 class="text-center flex-grow-1 mb-0">Allergens</h4> 737 <button type="button" class="close btn-close" data-dismiss="modal" aria-label="Close"> 738 <span class="visually-hidden" aria-hidden="true">×</span> 739 </button> 740 </div> 741 <div class="modal-body"> 742 <div class="d-flex align-items-center"> 743 Allergen key: 744 <span class="ml-3 ms-3 badge badge-warning flex-center">May Contain</span> 745 <span class="badge badge-danger flex-center">Contains</span> 746 <span class="badge badge-success flex-center">Suitable</span> 747 </div> 748 <div class="bg-white py-2"> 749 <div class="d-flex align-items-center justify-content-start"> 750 <div class=""> 751 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 752 <i class="eicon eicon-circle-mustard text-dark" style="font-size:55px"></i> 753 </div> 754 </div> 755 <div class=""> 756 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 757 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 758 <h6 class="mb-0 text-truncate">Mustard</h6> 759 </div> 760 </div> 761 </div> 762 763 </div> 764 </div> 765 <div class="bg-white py-2"> 766 <div class="d-flex align-items-center justify-content-start"> 767 <div class=""> 768 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title="(including celeriac)"> 769 <i class="eicon eicon-circle-celery text-dark" style="font-size:55px"></i> 770 </div> 771 </div> 772 <div class=""> 773 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 774 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 775 <h6 class="mb-0 text-truncate">Celery</h6> 776 </div> 777 <div class="" style="opacity:0.6;"> 778 (including celeriac) 779 </div> 780 </div> 781 </div> 782 783 </div> 784 </div> 785 <div class="bg-white py-2"> 786 <div class="d-flex align-items-center justify-content-start"> 787 <div class=""> 788 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 789 <i class="eicon eicon-circle-gluten text-dark" style="font-size:55px"></i> 790 </div> 791 </div> 792 <div class=""> 793 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 794 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 795 <h6 class="mb-0 text-truncate">Gluten Free</h6> 796 </div> 797 </div> 798 </div> 799 800 </div> 801 </div> 802 <div class="bg-white py-2"> 803 <div class="d-flex align-items-center justify-content-start"> 804 <div class=""> 805 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 806 <i class="eicon eicon-circle-vegetarian text-dark" style="font-size:55px"></i> 807 </div> 808 </div> 809 <div class=""> 810 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 811 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 812 <h6 class="mb-0 text-truncate">Vegetarian</h6> 813 </div> 814 </div> 815 </div> 816 817 </div> 818 </div> 819 <div class="bg-white py-2"> 820 <div class="d-flex align-items-center justify-content-start"> 821 <div class=""> 822 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 823 <i class="eicon eicon-circle-fish text-dark" style="font-size:55px"></i> 824 </div> 825 </div> 826 <div class=""> 827 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 828 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 829 <h6 class="mb-0 text-truncate">Fish</h6> 830 </div> 831 </div> 832 </div> 833 834 </div> 835 </div> 836 <div class="bg-white py-2"> 837 <div class="d-flex align-items-center justify-content-start"> 838 <div class=""> 839 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 840 <i class="eicon eicon-circle-soya text-dark" style="font-size:55px"></i> 841 </div> 842 </div> 843 <div class=""> 844 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 845 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 846 <h6 class="mb-0 text-truncate">Soybeans</h6> 847 </div> 848 </div> 849 </div> 850 851 </div> 852 </div> 853 <div class="bg-white py-2"> 854 <div class="d-flex align-items-center justify-content-start"> 855 <div class=""> 856 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title="Containing gluten, namely: wheat (such as spelt and khorasan wheat), rye, barley, oats"> 857 <i class="eicon eicon-circle-cereal text-dark" style="font-size:55px"></i> 858 </div> 859 </div> 860 <div class=""> 861 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 862 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 863 <h6 class="mb-0 text-truncate">Cereals</h6> 864 </div> 865 <div class="" style="opacity:0.6;"> 866 Containing gluten, namely: wheat (such as spelt and khorasan wheat), rye, barley, oats 867 </div> 868 </div> 869 </div> 870 871 </div> 872 </div> 873 <div class="bg-white py-2"> 874 <div class="d-flex align-items-center justify-content-start"> 875 <div class=""> 876 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 877 <i class="eicon eicon-circle-gluten text-dark" style="font-size:55px"></i> 878 </div> 879 </div> 880 <div class=""> 881 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 882 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 883 <h6 class="mb-0 text-truncate">Gluten</h6> 884 </div> 885 </div> 886 </div> 887 888 </div> 889 </div> 890 <div class="bg-white py-2"> 891 <div class="d-flex align-items-center justify-content-start"> 892 <div class=""> 893 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title="For example prawns, crabs, lobster, crayfish"> 894 <i class="eicon eicon-circle-crustaceans text-dark" style="font-size:55px"></i> 895 </div> 896 </div> 897 <div class=""> 898 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 899 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 900 <h6 class="mb-0 text-truncate">Crustaceans</h6> 901 </div> 902 <div class="" style="opacity:0.6;"> 903 For example prawns, crabs, lobster, crayfish 904 </div> 905 </div> 906 </div> 907 908 </div> 909 </div> 910 <div class="bg-white py-2"> 911 <div class="d-flex align-items-center justify-content-start"> 912 <div class=""> 913 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title="Like, mussels, whelks, oysters, snails and squid"> 914 <i class="eicon eicon-circle-molluscs text-dark" style="font-size:55px"></i> 915 </div> 916 </div> 917 <div class=""> 918 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 919 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 920 <h6 class="mb-0 text-truncate">Molluscs</h6> 921 </div> 922 <div class="" style="opacity:0.6;"> 923 Like, mussels, whelks, oysters, snails and squid 924 </div> 925 </div> 926 </div> 927 928 </div> 929 </div> 930 <div class="bg-white py-2"> 931 <div class="d-flex align-items-center justify-content-start"> 932 <div class=""> 933 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 934 <i class="eicon eicon-circle-vegan text-dark" style="font-size:55px"></i> 935 </div> 936 </div> 937 <div class=""> 938 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 939 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 940 <h6 class="mb-0 text-truncate">Vegan</h6> 941 </div> 942 </div> 943 </div> 944 945 </div> 946 </div> 947 <div class="bg-white py-2"> 948 <div class="d-flex align-items-center justify-content-start"> 949 <div class=""> 950 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title="Namely almonds, hazelnuts, walnuts, cashews, pecan nuts, Brazil nuts, pistachio nuts, macadamia (or Queensland) nuts"> 951 <i class="eicon eicon-circle-nuts text-dark" style="font-size:55px"></i> 952 </div> 953 </div> 954 <div class=""> 955 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 956 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 957 <h6 class="mb-0 text-truncate">Nuts</h6> 958 </div> 959 <div class="" style="opacity:0.6;"> 960 Namely almonds, hazelnuts, walnuts, cashews, pecan nuts, Brazil nuts, pistachio nuts, macadamia (or Queensland) nuts 961 </div> 962 </div> 963 </div> 964 965 </div> 966 </div> 967 <div class="bg-white py-2"> 968 <div class="d-flex align-items-center justify-content-start"> 969 <div class=""> 970 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title="(including lactose)"> 971 <i class="eicon eicon-circle-milk text-dark" style="font-size:55px"></i> 972 </div> 973 </div> 974 <div class=""> 975 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 976 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 977 <h6 class="mb-0 text-truncate">Milk</h6> 978 </div> 979 <div class="" style="opacity:0.6;"> 980 (including lactose) 981 </div> 982 </div> 983 </div> 984 985 </div> 986 </div> 987 <div class="bg-white py-2"> 988 <div class="d-flex align-items-center justify-content-start"> 989 <div class=""> 990 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 991 <i class="eicon eicon-circle-eggs text-dark" style="font-size:55px"></i> 992 </div> 993 </div> 994 <div class=""> 995 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 996 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 997 <h6 class="mb-0 text-truncate">Eggs</h6> 998 </div> 999 </div> 1000 </div> 1001 1002 </div> 1003 </div> 1004 <div class="bg-white py-2"> 1005 <div class="d-flex align-items-center justify-content-start"> 1006 <div class=""> 1007 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 1008 <i class="eicon eicon-circle-peanuts text-dark" style="font-size:55px"></i> 1009 </div> 1010 </div> 1011 <div class=""> 1012 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 1013 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 1014 <h6 class="mb-0 text-truncate">Peanuts</h6> 1015 </div> 1016 </div> 1017 </div> 1018 1019 </div> 1020 </div> 1021 <div class="bg-white py-2"> 1022 <div class="d-flex align-items-center justify-content-start"> 1023 <div class=""> 1024 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 1025 <i class="eicon eicon-circle-sesame text-dark" style="font-size:55px"></i> 1026 </div> 1027 </div> 1028 <div class=""> 1029 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 1030 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 1031 <h6 class="mb-0 text-truncate">
1031Sesame</h6> 1032 </div> 1033 </div> 1034 </div> 1035 1036 </div> 1037 </div> 1038 <div class="bg-white py-2"> 1039 <div class="d-flex align-items-center justify-content-start"> 1040 <div class=""> 1041 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title=""> 1042 <i class="eicon eicon-halal text-dark" style="font-size:55px"></i> 1043 </div> 1044 </div> 1045 <div class=""> 1046 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 1047 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 1048 <h6 class="mb-0 text-truncate">Halal</h6> 1049 </div> 1050 </div> 1051 </div> 1052 1053 </div> 1054 </div> 1055 <div class="bg-white py-2"> 1056 <div class="d-flex align-items-center justify-content-start"> 1057 <div class=""> 1058 <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top" title="Where added and at a level above 10mg/kg or 10mg/L in the finished product. This can be used as a preservative in dried fruit"> 1059 <i class="eicon eicon-circle-so2 text-dark" style="font-size:55px"></i> 1060 </div> 1061 </div> 1062 <div class=""> 1063 <div class="h-100 d-flex flex-column align-items-start justify-content-start"> 1064 <div class="allergenNAme" style="max-width:100%; overflow:hidden;"> 1065 <h6 class="mb-0 text-truncate">Sulphur dioxide/sulphites</h6> 1066 </div> 1067 <div class="" style="opacity:0.6;"> 1068 Where added and at a level above 10mg/kg or 10mg/L in the finished product. This can be used as a preservative in dried fruit 1069 </div> 1070 </div> 1071 </div> 1072 1073 </div> 1074 </div> 1075 1076 1077 </div> 1078 <div class="modal-footer justify-content-between"> 1079 <button type="button" class="btn btn-primary w-100" data-dismiss="modal" data-bs-dismiss="modal">Close</button> 1080 </div> 1081 </div> 1082 </div> 1083 </div> 1084 1085 1086 <!-- Modal foodModal --> 1087 <div class="modal fade" id="foodModal" tabindex="-1" role="dialog" aria-hidden="true"> 1088 <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> 1089 <div class="modal-content"> 1090 <div class="modal-header align-items-center"> 1091 <h4 class="text-center flex-grow-1 mb-0" id="selectedProductName">Product Name</h4> 1092 <button type="button" class="close btn-close" data-dismiss="modal" aria-label="Close" data-bs-dismiss="modal"> 1093 <span class="visually-hidden" aria-hidden="true">×</span> 1094 </button> 1095 </div> 1096 <div class="modal-body"> 1097 1098 <div class="modal-body-scroll-content"> 1099 <form id="modalAddMultipleProducts" type="" class="h-100 d-flex flex-column"> 1100 <div> 1101 <input id="" type="hidden" name="addMultipleProductsToBasket" value="1"/> 1102 <input id="selectedProductId" type="hidden" name="productId" value=""/> 1103 <input id="selectedProductPrice" type="hidden" name="price" value=""/> 1104 <div class="row justify-content-center"> 1105 <div class="col-9 col-sm-10 col-md-9"> 1106 <div id="selectedProductImage" class="mb-3 text-center ">Image</div> 1107 </div> 1108 </div> 1109 <div class="row justify-content-center"> 1110 <div class="col-12 col-sm-10 col-md-9"> 1111 <div id="selectedProductDescription">Desc</div> 1112 </div> 1113 </div> 1114 1115 <div class="row justify-content-center"> 1116 <div class="col-12 col-sm-10 col-md-9"> 1117 <div id="selectedProductAllergens">Allergens</div> 1118 </div> 1119 </div> 1120 <div class="row justify-content-center"> 1121 <div class="col-12 col-sm-10 col-md-9"> 1122 <div id="selectedProductCalories">Calories</div> 1123 </div> 1124 </div> 1125 <div class="row justify-content-center my-4 d-none" id="selectedProductSubTypes"> 1126 <div class="col-12" style=> 1127 <div id="selectedProductSubTypesWrapper"class="pt-4 py-2">SubTypes</div> 1128 </div> 1129 </div> 1130 1131 <div id="selectedProductChoices" class="d-none my-4">Choices</div> 1132 1133 <div class="row justify-content-center hasSelectedProductUprades my-4" id="selectedProductUpgrades"> 1134 <div class="col-12" style=> 1135 <div id="selectedProductUpgradesWrapper"class="pt-4 py-2">Upgrades</div> 1136 </div> 1137 </div> 1138 1139 1140 <div id="selectedProductAddons" class=" my-4">Addons</div> 1141 </div> 1142 <div class="mt-auto"> 1143 <div class="row justify-content-center mt-4 mb-3"> 1144 <div class="col-8 col-sm-7 col-md-8 col-lg-5"> 1145 <div class="input-group justify-content-end"> 1146 <div class="input-group-prepend"> 1147 <input type="button" value="-" class="btn btn-primary btn-disabled" field="quantity" onclick="decreaseQuantityModal();return false;"> 1148 </div> 1149 <input type="" id="selectedProductQty" name="qty" aria-label="Product quantity" value="1" class="form-control text-center qtySmall" min="1" data-minqty="1" max="10" rel="10" onfocus="this.blur()"> 1150 <div class="input-group-append"> 1151 <input type="button" value="+" class="btn btn-primary" field="quantity" onclick="increaseQuantityModal();return false;"> 1152 </div> 1153 </div> 1154 </div> 1155 </div> 1156 <div id="modalProductNotes"> 1157 <h6> 1158 Special requests? 1159 </h6> 1160 <textarea id="selectedProductNotes" aria-label="Special requests input" class="form-control mb-4" name="notes" placeholder="Enter any notes here e.g. no lettuce"></textarea> 1161 </div> 1162 </div> 1163 1164 </div> 1165 </form> 1166 1167 </div> 1168 <div class="modal-footer justify-content-between"> 1169 <button type="button" class="btn btn-secondary flex-grow-2" data-dismiss="modal" data-bs-dismiss="modal">Back</button> 1170 <button type="button" class="btn btn-primary flex-grow-1 disabled" disabled id="addMultipleFoodItemsToBasket" onclick="addMultipleFoodItemsToBasket();"> 1171 <span id="addMultipleFoodItemsToBasketText">Add for <span id="selectedProductTotalPrice"></span></span> 1172 <div class="spinner-grow spinner-grow-sm text-light d-none" role="status"><span class="sr-only">Loading...</span></div></button> 1173 </div> 1174 </div> 1175 </div> 1176 </div> 1177
1177<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 1178 $(function () { 1179 $('[data-toggle="tooltip"]').tooltip(); 1180 }); 1181 </script>
1181 1182 1183
1183<script nonce="xQscCpEKJDL9A7/2bZp2TBKBVqmaT1P35Ytrxam6j9M="> 1184 1185 var WS_USER = "cantref"; 1186 const allergenInformation = "" 1187 1188 $(function () { 1189 // 1190 1191 $('#foodModal').on('show.bs.modal', function (event) { 1192 var button = $(event.relatedTarget) // Button that triggered the modal 1193 prodid = button.data("productid"); 1194 hasChildProducts = button.data("haschildproducts"); 1195 price = button.data("price"); 1196 getProductById(prodid); 1197 }) 1198 }); 1199 1200 function increaseQuantityModal(){ 1201 currentQty = $('#selectedProductQty').val(); 1202 if (currentQty == 0) { 1203 var qty = parseInt($('#selectedProductQty').data("minqty")); 1204 }else{ 1205 var qty = parseInt(parseInt($('#selectedProductQty').val()) + 1); 1206 } 1207 1208 var maxqty = $('#selectedProductQty').attr('rel'); 1209 if (qty <= maxqty){ 1210 $('#selectedProductQty').siblings(".input-group-prepend").children(".btn").removeClass("btn-disabled"); 1211 $('#selectedProductQty, .addOnQty').val(qty); 1212 recalcPriceModal(); 1213 } 1214 } 1215 1216 function decreaseQuantityModal(){ 1217 currentQty = $('#selectedProductQty').val(); 1218 if (currentQty == $('#selectedProductQty').data("minqty")) { 1219 var qty = 0; 1220 }else{ 1221 var qty = parseInt(parseInt($('#selectedProductQty').val()) - 1); 1222 } 1223 var minqty = $('#selectedProductQty').attr('min'); 1224 if (qty >= minqty){ 1225 if (qty == 0){ $('#selectedProductQty').siblings(".input-group-prepend").children(".btn").addClass("btn-disabled"); } 1226 $('#selectedProductQty').val(qty); 1227 recalcPriceModal("selectedProductQty"); 1228 } 1229 } 1230 1231 function recalcPriceModal(type) { 1232 price = $("#selectedProductPrice").val(); 1233 qty = $('#selectedProductQty').val(); 1234 totalprice = qty * parseFloat(price); 1235 1236 addOnTotalPrice = 0; 1237 choicesTotalPrice = 0; 1238 $("#selectedProductAddonsWrapper").find(".addOnProductItem").each(function() { 1239 addOnItemPrice = $(this).find("input[type=checkbox]").data("price"); 1240 if ($(this).find("input[type=checkbox]").prop("checked") === true){ 1241 addOnItemPrice = qty * parseFloat(addOnItemPrice); 1242 addOnTotalPrice = +addOnTotalPrice + +addOnItemPrice; 1243 } 1244 }); 1245 /* 1246 if (!$("#selectedProductSubTypes").hasClass("d-none")){ 1247 $("#selectedProductSubTypesWrapper").find(".productSubTypeItem").each(function() { 1248 subTypePrice = $(this).find("input[type=checkbox]").data("price"); 1249 if ($(this).find("input[type=checkbox]").prop("checked") === true){ 1250 subTypePrice = qty * parseFloat(subTypePrice); 1251 subTypeTotalPrice = +subTypeTotalPrice + +subTypePrice; 1252 } 1253 }); 1254 } 1255 */ 1256 1257 // Add any extra cost for choice options 1258 $('[data-choiceoption]').each(function() { 1259 if($(this).val() > 0) { 1260 var qty = $(this).val(); 1261 var price = $(this).data('optionprice'); 1262 if(price > 0) { 1263 choicePrice = qty * parseFloat(price); 1264 choicesTotalPrice = +choicesTotalPrice + +choicePrice; 1265 } 1266 } 1267 }); 1268 1269 totalprice = +totalprice + +addOnTotalPrice + +choicesTotalPrice; 1270 1271 $("#selectedProductTotalPrice").html(showprice(totalprice)); 1272 1273 } 1274 1275 function selectSubType(prodid){ 1276 $("#selectedProductSubTypesWrapper").find(".productSubTypeItem").find("input[type=checkbox]").prop("checked", false); 1277 $("#product_subtype_checkbox_"+prodid).prop("checked", "true"); 1278 1279 subTypePrice = $("#product_subtype_checkbox_"+prodid).data("price"); 1280 1281 $("#selectedProductPrice").val(subTypePrice); 1282 1283 $('#selectedProductId').val(prodid); 1284 1285 if($('div.productItem[data-productid="' + prodid + '"]').data('canpurchase') === 'no') { 1286 $("#addMultipleFoodItemsToBasket").addClass("disabled").attr("disabled", true); 1287 } else { 1288 $("#addMultipleFoodItemsToBasket").removeClass("disabled").attr("disabled", false); 1289 } 1290 1291 recalcPriceModal(); 1292 } 1293 1294 1295 1296 function getProductById(prodid){ 1297 $("#selectedProductSubTypes").addClass("d-none"); 1298 $("#selectedProductSubTypesWrapper").html(""); 1299 $("#selectedProductChoices").html(""); 1300 $("#selectedProductChoices").addClass("d-none"); 1301 1302 console.log("get product by ID"); 1303 console.log("Location: 1"); 1304 $.ajax({ 1305 url: '/shop/ajax.php', 1306 type: 'POST', 1307 data: { "getProductById":1, "productId":prodid, "ajax":1, "type": "food", locationId: "1"}, 1308 dataType: 'json', 1309 success: function(data){ 1310 console.log(data); 1311 product = data.product; 1312 1313 // Update fields 1314 $("#selectedProductId").attr("name", "productId_"+prodid).val(prodid); 1315 price = product.price; 1316 1317 if (product.price < product.priceorig) { 1318 1319 } else if (product.price != product.priceorig){ 1320 price = product.priceorig; 1321 } 1322 1323 $("#selectedProductPrice").val(price); 1324 $("#selectedProductTotalPrice").html(showprice(price)); 1325 1326 $("#selectedProductName").text(product.name); 1327 $("#selectedProductImage").html('<img src="'+product.thumb+'" alt="'+product.name+'" style="max-height: 300px"/>'); 1328 1329 description = product.description; 1330 1331 if (product.hasOwnProperty("promoData")){ 1332 if (product.promoData.hasOwnProperty("promoDesc") && product.promoData.promoDesc != ""){ 1333 description += "<div class=\"alert alert-info\">"+product.promoData.promoDesc+"</div>"; 1334 } 1335 } 1336 1337 if (product.hasOwnProperty("isAlcoholic") && product.isAlcoholic == 1){ 1338 if (product.abv != "" && product.serving_size != "" ){ 1339 description += "<br/><br/>"; 1340 } 1341 if (product.abv != ""){ 1342 description += "<span class=\"font-weight-bold\">ABV (%):</span> "+product.abv+"<br/>"; 1343 }
1344 if (product.serving_size > 0){ 1345 description += "<span class=\"font-weight-bold\">Serving Size (ml):</span> "+product.serving_size+"<br/>"; 1346 } 1347 1348 1349 } 1350 $("#selectedProductDescription").html(description); 1351 1352 allergens = ""; 1353 1354 if (product.extra.hasOwnProperty("allergens")){ 1355 allergens += '<div class="mt-3">'; 1356 if ("" != ""){ 1357 allergens += '<div class="bg-white py-2">'; 1358 //HC - allergenInformation is set as $allergenInfo coming from include food-and-beverage.tpl 13/04/2023 1359 //allergens += allergenInformation || allergen.desc; 1360 allergens += '<div class="alert alert-warning"></div>'; 1361 allergens += '</div>'; 1362 } 1363 1364 if ("" == 1){ 1365 allergens += '<div class="allergens-bg py-2">'; 1366 //HC - allergenInformation is set as $allergenInfo coming from include food-and-beverage.tpl 13/04/2023 1367 //allergens += allergenInformation || allergen.desc; 1368 allergens += '<div class="alert alert-warning">For allergen information, please speak to a member of the team.</div>'; 1369 allergens += '</div>'; 1370 }else{ 1371 $.each(product.extra.allergens, function( key, allergen ) { 1372 if (key == "Not Set"){ 1373 allergens += '<div class="allergens-bg py-2">'; 1374 //HC - allergenInformation is set as $allergenInfo coming from include food-and-beverage.tpl 13/04/2023 1375 //allergens += allergenInformation || allergen.desc; 1376 allergens += '<div class="alert alert-warning">For allergen information, please speak to a member of the team.</div>'; 1377 allergens += '</div>'; 1378 }else{ 1379 allergens += '<div class="allergens-bg py-2">'; 1380 allergens += ' <div class="d-flex align-items-center justify-content-start">'; 1381 allergens += ' <div class="">'; 1382 allergens += ' <div class="mr-3 me-3" data-toggle="tooltip" data-placement="top">'; 1383 allergens += ' <i class="eicon '+allergen.icon+'" style="font-size:25px"></i>'; 1384 allergens += ' </div>'; 1385 1386 allergens += ' </div>'; 1387 allergens += ' <div class="">'; 1388 allergens += ' <div class="h-100 d-flex flex-column align-items-start justify-content-start">'; 1389 allergens += ' <div class="allergen-name" style="max-width:100%; overflow:hidden;">'; 1390 allergens += ' <span class="h6">'+allergen.name+'</span> '; 1391 //allergens += ' </div>'; 1392 if (allergen.description != "" && allergen.description != allergen.name){ 1393 allergens += ' <small class="" style="opacity:0.6;">'; 1394 allergens += allergen.description; 1395 allergens += ' </small>'; 1396 } 1397 allergens += ' </div>'; 1398 allergens += ' </div>'; 1399 allergens += ' </div>'; 1400 allergens += ' </div>'; 1401 allergens += '</div>'; 1402 } 1403 }); 1404 } 1405 1406 allergens += '</div>'; 1407 } 1408 //console.log(allergens) 1409 1410 $("#selectedProductAllergens").html(allergens); 1411 calories = ""; 1412 if (product.calories > 0){ 1413 calories = product.calories+" kcal"; 1414 } 1415 $("#selectedProductCalories").html(calories); 1416 1417 if (product.haschildproducts == 1){ 1418 $("#addMultipleFoodItemsToBasket").addClass("disabled").attr("disabled", true); 1419 getProductChildProducts(prodid); 1420 } 1421 1422 if(product.hasChoiceCards == 1) { 1423 getProductChoices(prodid); 1424 } 1425 1426 if (product.hasOwnProperty("related") && product.related.hasOwnProperty("upgrades")){ 1427 upgradeProducts = product.related.upgrades.products; 1428 1429 html = '<h6 class="font-weight-bold mb-3">Upgrade your '+product.name+"</h6>"; 1430 html += '<div class="row align-items-start justify-content-start" id="selectedProductUpgradesWrapper">'; 1431 $.each(upgradeProducts, function( key, product ) { 1432 productname = product.name; 1433 productname = productname.replace(/[^a-zA-Z ]/g, "").toLowerCase(); 1434 if (product.haschildproducts == 1){ 1435 price = product.fromprice_gross; 1436 }else{ 1437 //OD Added Math.round 2021-04-23 1438 if (product.upgradePrice > 0){ 1439 price = showprice((Math.round(product.upgradePrice * 100) / 100)); 1440 }else{ 1441 price = showprice((Math.round(product.upgradePrice * 100) / 100)); 1442 //price = price.replace(/[^a-zA-Z ]/g, ""); 1443 } 1444 1445 } 1446 1447 //OD Added 2021-04-23 - product.description was undefined on Hobbledown. 1448 const prodDesc = product.description == null ? '' : product.description; 1449 1450 html += ''; 1451 html += '<div class="col-12 col-sm-6" id="productUpgrade_'+product.id+'">'; 1452 html += ' <div class="bg-white p-4 mb-3 productItem h-100" onclick="getProductById('+product.id+');" data-productid="'+product.id+'" data-containsupgrades="'+product.containsUpgrades+'" data-containsaddons="'+product.addOns+'" data-haschildproducts="'+product.hashchildproducts+'">'; 1453 html += ' <div class="row">'; 1454 html += ' <div class="col-7">'; 1455 html += ' <div class="h-100 d-flex flex-column align-items-start justify-content-start">'; 1456 html += ' <div>'; 1457 html += ' <h6 class="mb-0">
1457'+product.name+'</h6>'; 1458 html += ' </div>'; 1459 html += ' <div class="my-3 border" style="opacity:0.6; font-size:0.9rem;">'; 1460 html += prodDesc; //OD Changed 2021-04-23 - this was showing as undefined on hobbledown was using product.description before 1461 html += ' </div>'; 1462 html += ' <div class="mt-auto font-weight-bold">'; 1463 html += ' '+price; 1464 html += ' </div>'; 1465 html += ' </div>'; 1466 html += ' </div>'; 1467 html += ' <div class="col-5">'; 1468 html += ' <img src="'+product.image+'" alt=""/>'; 1469 html += ' </div>'; 1470 html += ' </div>'; 1471 html += ' </div>'; 1472 html += '</div>'; 1473 }); 1474 html += '</div>'; 1475 $("#selectedProductUpgrades").removeClass("d-none"); 1476 }else{ 1477 $("#selectedProductUpgrades").addClass("d-none"); 1478 html = ""; 1479 } 1480 $("#selectedProductUpgradesWrapper").html(html); 1481 1482 $("#selectedProductQty").attr("value", 1); 1483 $("#selectedProductQty").val("1"); 1484 if (product.runtozero == 1){ 1485 if (product.freestock < 1){ 1486 $("#addMultipleFoodItemsToBasket").addClass("disabled"); 1487 }else{ 1488 console.log("--"+product.stockfree); 1489 $("#selectedProductQty").attr("rel", product.stockfree); 1490 $("#selectedProductQty").attr("max", product.stockfree); 1491 } 1492 }else { 1493 $("#selectedProductQty").attr("rel", 10); 1494 $("#selectedProductQty").attr("max", 10); 1495 } 1496 1497 1498 if (product.hasOwnProperty("related") && product.related.hasOwnProperty("addons")){ 1499 addonsProducts = product.related.addons.products; 1500 1501 html = '<h6 class="font-weight-bold mb-3">Add</h6>'; 1502 html += '<div class="" id="selectedProductAddonsWrapper">'; 1503 //console.log("addonsProducts"); 1504 //console.log(addonsProducts); 1505 $.each(addonsProducts, function( key, product ) { 1506 1507 productname = product.name; 1508 productname = productname.replace(/[^a-zA-Z ]/g, "").toLowerCase(); 1509 if (product.haschildproducts == 1){ 1510 price = product.fromprice_gross; 1511 }else{ 1512 price = product.price; 1513 } 1514 1515 if (product.hasOwnProperty("extra")){ 1516 if ("" == 1){ 1517 1518 }else{ 1519 if(product.extra.allergens && product.extra.allergens.length > 0) { 1520 product.name = product.name + ' '; 1521 $.each( product.extra.allergens, function( allergenKey, allergen ) { 1522 product.name += ' <span class="mr-1 me-1 mt-1" data-toggle="tooltip" data-placement="top" title="'+allergen.description+'"><i class="eicon '+allergen.icon+' " style="font-size:20px"></i></span>'; 1523 }); 1524 } 1525 } 1526 } 1527 1528 html += ' <label id="productAddon_'+key+'" class="addOnProductItem d-flex align-items-center" for="product_checkbox_'+product.id+'">'; 1529 html += ' <div class="checkbox mr-3 me-3">'; 1530 html += ' <input id="product_checkbox_'+product.id+'" name="productId_'+product.id+'" type="checkbox" value="1" onchange="recalcPriceModal();" data-price="'+price+'"/>'; 1531 html += ' </div>'; 1532 html += ' <div class="mr-auto me-auto">'; 1533 html += ' <h6 class="mb-0">'+product.name+'</h6>'; 1534 html += ' </div>'; 1535 html += ' <div class="ml-3 ms-3">'; 1536 html += ' (+£'+price+')'; 1537 html += ' </div>'; 1538 html += ' </label>'; 1539 }); 1540 html += '</div>'; 1541 $("#selectedProductAddons").removeClass("d-none"); 1542 }else{ 1543 html = ""; 1544 $("#selectedProductAddons").addClass("d-none"); 1545 } 1546 $("#selectedProductAddons").html(html); 1547 $("#selectedProductId").attr("name", "productId_"+prodid).val(prodid); 1548 1549 if ($("#selectedProductId").val() == prodid && product.haschildproducts != 1){ 1550 if($('div.productItem[data-productid="' + prodid + '"]').data('canpurchase') === 'no') { 1551 $("#addMultipleFoodItemsToBasket").addClass("disabled").attr("disabled", true); 1552 } else { 1553 $("#addMultipleFoodItemsToBasket").removeClass("disabled").attr("disabled", false); 1554 } 1555 } 1556 1557 $('[data-toggle="tooltip"]').tooltip(); 1558 1559 }, 1560 fail: function(data){ 1561 console.log("fail"); 1562 console.log(data); 1563 },
1564 complete: function(data){ 1565 console.log('complete'); 1566 // console.log(data); 1567 } 1568 },'json'); 1569 } 1570 1571 function getProductChildProducts(prodid, parentPrice){ 1572 parentPrice = parentPrice; 1573 $.ajax({ 1574 url: '/shop/ajax.php', 1575 type: 'POST', 1576 data: { "getProductSubOptions":1, "productId":prodid, "ajax":1, "type":"food", locationId: "1"}, 1577 1578 dataType: 'json', 1579 success: function(data){ 1580 console.log("The data is :" +data); 1581 1582 1583 1584 // Update fields 1585 html = ""; 1586 //$("#selectedProductName").text("Which would you like?"); 1587 if (data.hasOwnProperty("subProducts")){ 1588 products = data.subProducts.products; 1589 //html = "<h6 class=\"font-weight-bold mb-3\">Upgrade your "+product.name+"</h6>"; 1590 parentName = $("#selectedProductName").text(); 1591 html += "<h6 class=\"font-weight-bold mb-3\">Which "+parentName+" would you like?</h6>"; 1592 html += '<div class="row align-items-start justify-content-start" id="">'; 1593 1594 $.each(products, function( key, product ) { 1595 console.log("subtype product data"); 1596 console.log(product); 1597 productname = product.name; 1598 productname = productname.replace(/[^a-zA-Z ]/g, "").toLowerCase(); 1599 if (product.haschildproducts == 1){ 1600 price = product.fromprice_gross; 1601 }else{ 1602 price = product.price; 1603 1604 } 1605 1606 //onclick="getProductById('+key+');" 1607 html += ''; 1608 html += '<div class="col-12 col-sm-6 mb-1" id="productSubType_'+key+'">'; 1609 html += ' <label class=" p-3 p-sm-4 productSubTypeItem h-100 d-block" data-productid="'+key+'" for="product_subtype_checkbox_'+key+'">'; 1610 html += ' <div class="row align-items-center">'; 1611 html += ' <div class="col-9">'; 1612 html += ' <div class="d-flex h-100 align-items-center">'; 1613 html += ' <div class="checkbox mr-3 me-3">'; 1614 html += ' <input id="product_subtype_checkbox_'+key+'" name="productId_'+key+'" type="checkbox" value="1" onchange="selectSubType('+key+');" data-price="'+price+'"/>'; 1615 html += ' </div>'; 1616 html += ' <div class="h-100 d-flex flex-column align-items-start justify-content-start">'; 1617 html += ' <div>'; 1618 html += ' <h6 class="mb-0">'+product.name+'</h6>'; 1619 html += ' </div>'; 1620 1621 1622 1623 if (product.hasOwnProperty("allergens")){ 1624 if (product.allergens.hasOwnProperty("allergens")){ 1625 if ("" == 1){ 1626 allergens += '<div class="bg-white py-2">'; 1627 //HC - allergenInformation is set as $allergenInfo coming from include food-and-beverage.tpl 13/04/2023 1628 //allergens += allergenInformation || allergen.desc; 1629 html += '<div class="alert alert-warning">For allergen information, please speak to a member of the team.</div>'; 1630 html += '</div>'; 1631 }else{ 1632 html += '<div class="d-flex justify-contents-center align-items-center flex-wrap">'; 1633 $.each(product.allergens.allergens, function( key, allergen ) { 1634 html += '<span class="mr-1 me-1 mt-1"><i class="eicon '+allergen.icon+' " style="font-size:20px"></i></span>'; 1635 }); 1636 html += '</div>'; 1637 } 1638 1639 } 1640 } 1641 1642 if (product.hasOwnProperty("calories") && product.calories > 0){ 1643 html += ' <small>'+product.calories+' kcal</small>'; 1644 } 1645 1646 //html += ' <div class="my-3 border" style="opacity:0.6; font-size:0.9rem;">'; 1647 //html += product.description; 1648 //html += ' </div>'; 1649 html += ' <div class="mt-auto font-weight-bold">'; 1650 html += ' £'+price; 1651 html += ' </div>'; 1652 html += ' </div>'; 1653 html += ' </div>';
1654 html += ' </div>'; 1655 html += ' <div class="col-3">'; 1656 html += ' <img src="'+product.image+'" alt=""/>'; 1657 html += ' </div>'; 1658 1659 html += ' </div>'; 1660 html += ' </label>'; 1661 html += '</div>'; 1662 1663 }); 1664 html += '</div>'; 1665 $("#selectedProductSubTypes").removeClass("d-none"); 1666 $("#addMultipleFoodItemsToBasket").addClass("disabled").attr("disabled", true); 1667 }else{ 1668 html = ""; 1669 $("#selectedProductSubTypes").addClass("d-none"); 1670 1671 if($('div.productItem[data-productid="' + prodid + '"]').data('canpurchase') === 'no') { 1672 $("#addMultipleFoodItemsToBasket").addClass("disabled").attr("disabled", true); 1673 } else { 1674 $("#addMultipleFoodItemsToBasket").removeClass("disabled").attr("disabled", false); 1675 } 1676 } 1677 1678 $("#selectedProductSubTypesWrapper").html(html); 1679 }, 1680 fail: function(data){ 1681 console.log("fail"); 1682 console.log(data); 1683 }, 1684 complete: function(data){ 1685 } 1686 },'json'); 1687 } 1688 1689 function getProductChoices(prodid) { 1690 $.ajax({ 1691 url: '/shop/ajax.php', 1692 type: 'POST', 1693 data: { "getProductChoices":1, "productId":prodid, "ajax":1}, 1694 dataType: 'json', 1695 success: function(data){ 1696 console.log('getProductChoices success'); 1697 console.log(data); 1698 var count = 0; 1699 var html = ''; 1700 $(data.productChoices).each(function(choicekey, choice) { 1701 count++; 1702 if(count == 1) { 1703 html+= '<div class="row no-gutters border-top">'; 1704 } 1705 html+= '<div class="col-12">'; 1706 1707 html+= '<div data-choicecontainer='+choicekey+' class="bg-light border-bottom p-3">'; 1708 1709 html+= '<div class="row no-gutters">'; 1710 html+= '<div class="col-8">'; 1711 html+= '<h4 class="mb-2">
1711'+choice.name+'</h4>'; 1712 html+= '</div>'; 1713 html+= '<div class="col-4 text-right">'; 1714 html+= '<a href="#" data-choicebutton='+choicekey+' onclick="$(\'[data-choiceoptions='+choicekey+']\').slideToggle(); return false;" class="btn btn-primary btnwithcaret"><i class="fas fa-caret-down mr-2 me-2"></i>Choose</a>'; 1715 html+= '</div>'; 1716 html+= '<div class="col-12 pt-1">'; 1717 1718 // List of selected options 1719 html+= '<div data-choiceselection='+choicekey+' class="text-muted">'; 1720 1721 html+= '<div class="choice-rules rounded px-2 py-1">'; 1722 html+= '<i class="fas fa-info-circle mr-1 me-1 opacity-50"></i>'; 1723 if(choice.allowNoOption == 1) { 1724 html+= 'Optional'; 1725 } else if(choice.minQty == choice.maxQty || choice.minQty == 0 ) { 1726 html+= 'Please choose '+ choice.minQty; 1727 } else { 1728 html+= 'Please choose '+choice.minQty+' - '+choice.maxQty; 1729 } 1730 html+= '</div>'; 1731 html+= '<div id="choiceSelections'+choicekey+'" class="d-inline-block"></div>'; 1732 1733 html+= '</div>'; 1734 1735 // List of choices (hidden) 1736 html+= '<div data-choiceoptions='+choicekey+' style="display:none;">'; 1737 html+= '<div class="row no-gutters">'; 1738 1739 $(choice.options).each(function(optionkey, option) { 1740 html+= '<div class="col-12 h-100 col-lg-6 pr-3 pe-3 pt-3">'; 1741 html+= '<div class="border h-100 bg-white rounded p-2 text-sm text-center">'; 1742 html+= '<h6 class="mb-0">'+option.name+(option.price > 0 ? ' + '+showprice(option.price) : '')+'</h6>'; 1743 1744 // Display allergen icons 1745 var allergencount = 0; 1746 if(0 != 1) { 1747 $(option.allergens).each(function(allergenkey, allergen) { 1748 allergencount++; 1749 if(allergencount == 1) { 1750 html+= '<div class="w-100 my-1">'; 1751 } 1752 html+= '<i class="eicon '+allergen.icon+' '+(allergencount > 1 ? 'ml-1 ms-1' : '')+'" style="font-size:18px;"></i>'; 1753 }); 1754 if(allergencount > 0) { 1755 html+= '</div>'; 1756 } 1757 } 1758 // Plus/minus qty 1759 html+= '<div class="mt-2 btn-group">'; 1760 //html+= '<i class="fas fa-minus-circle mr-3 cursor-pointer" onclick="reduceProductChoiceOption('+choicekey+', '+optionkey+');"></i>'; 1761 html+= '<div class="btn btn-primary" onclick="reduceProductChoiceOption('+choicekey+', '+optionkey+');">-</div>'; 1762 html+= '<input type="text" data-choiceoption="'+choicekey+'_'+optionkey+'" data-choicekey="'+choicekey+'" data-choiceid="'+choice.id+'" data-optionkey="'+optionkey+'" data-optionid="'+option.id+'" data-optionprice="'+option.price+'" data-choicemin="'+choice.minQty+'" data-choicemax="'+choice.maxQty+'" data-choiceallownooption="'+choice.allowNoOption+'" data-optionname="'+option.name+'" data-prodid="'+option.prodid+'" data-price="'+option.price+'" value="0" style="width:50px;" class="form-control text-center qtySmall" readonly>'; 1763 //html+= '<i class="fas fa-plus-circle ml-3 cursor-pointer" onclick="addProductChoiceOption('+choicekey+', '+optionkey+');"></i>'; 1764 html+= '<div class="btn btn-primary" onclick="addProductChoiceOption('+choicekey+', '+optionkey+');">+</div>'; 1765 html+= '</div>'; 1766 1767 html+= '</div>'; 1768 html+= '</div>'; 1769 }); 1770 1771 html+= '</div>'; 1772 html+= '</div>'; 1773 1774 html+= '</div>'; 1775 html+= '</div>'; 1776 1777 html+= '</div>'; 1778 1779 html+= '</div>'; 1780 }); 1781 1782 if(count > 0) { 1783 html+= '</div>'; 1784 html = '<h6 class="font-weight-bold mb-3">Make it yours</h6>'+html; 1785 $('#selectedProductChoices').html(html); 1786 $('#selectedProductChoices').removeClass('d-none'); 1787 } else { 1788 $('#selectedProductChoices').addClass('d-none'); 1789 } 1790 }, 1791 fail: function(data){ 1792 console.log('getProductChoices fail'); 1793 console.log(data); 1794 }, 1795 complete: function(data){ 1796 } 1797 }); 1798 } 1799 1800 pageNo = 1; 1801 pages = 0; 1802 $.fn.isInViewport = function() { 1803 var elementTop = $(this).offset().top; 1804 var elementBottom = elementTop + $(this).outerHeight(); 1805 1806 var viewportTop = $(window).scrollTop(); 1807 var viewportBottom = viewportTop + $(window).height(); 1808 1809 return elementBottom > viewportTop && elementTop < viewportBottom; 1810 }; 1811 loadingProducts = false;
1812 loadedAllProducts = false; 1813 if (pages == 1){ 1814 loadedAllProducts = true; 1815 } 1816 1817 1818 if (pages > 1 && pageNo != pages && !loadingProducts && !loadedAllProducts){ 1819 $(window).on('scroll', function() { 1820 if ($("#productLoader").isInViewport()) { 1821 getProducts(); 1822 } 1823 }); 1824 } 1825 1826 function getProducts() { 1827 if(!loadingProducts) { 1828 loadingProducts = true; 1829 1830 $.ajax({ 1831 url: "/shop/ajax.php", 1832 type: "POST", 1833 data: { "getProductsByCategory":1, "pageNo":pageNo, "catId":42, "ajax":1, "type": "food", "truncateDescription": 150}, 1834 dataType: "json", 1835 success: function(data) { 1836 loadingProducts = false; 1837 pageNo = data.pageNo; 1838 pages = data.pages; 1839 html = ""; 1840 1841 $.each( data.results, function(key, product) { 1842 productname = product.name; 1843 productname = productname.replace(/[^a-zA-Z ]/g, "").toLowerCase(); 1844 1845 if(product.haschildproducts == 1) { 1846 price = product.fromprice_gross; 1847 } else { 1848 price = product.price; 1849 } 1850 1851 var disableProduct = 0; 1852 if(product.runtozero == 1 && product.stockfree < 1) disableProduct = 1; 1853 1854 html += '<div class="col-12 col-sm-6 mb-3 productItemWrapper" data-productname="'+productname+'">'; 1855 1856 if(disableProduct == 1) { 1857 html += '<div class="bg-white p-4 h-100 disabled" style="opacity:0.6">'; 1858 } else { 1859 html += '<div class="bg-white p-4 h-100 productItem fnbProductItem" data-toggle="modal" data-bs-toggle="modal" data-target="#foodModal" data-bs-target="#foodModal" data-productid="'+product.id+'" data-containsupgrades="'+product.containsUpgrades+'" data-containsaddons="'+product.containsAddons+'" data-haschildproducts="'+product.haschildproducts+'" data-price="'+price+'">'; 1860 } 1861 1862 html += '<div class="row h-100">'; 1863 html += '<div class="col-6 col-md-7">'; 1864 html += '<div class="h-100 d-flex flex-column">'; 1865 html += '<div class="product-name" style="max-width:100%; overflow:hidden;">'; 1866 html += '<h6 class="foodProductTitle mb-0">'+product.name+'</h6>'; 1867 if(product.extra.allergens.length > 0 && "" != 1) { 1868 html += '<div class="d-flex justify-contents-center align-items-center flex-wrap">'; 1869 $.each( product.extra.allergens, function( allergenKey, allergen ) { 1870 html += '<div class="mr-1 me-1 mt-1" data-toggle="tooltip" data-placement="top" title="'+allergen.description+'"><i class="eicon '+allergen.icon+' " style="font-size:20px"></i></div>'; 1871 }); 1872 html += '</div>'; 1873 } 1874 if (product.hasOwnProperty("isDrink") && product.hasOwnProperty("isAlcoholic")){ 1875 if (product.isDrink == 1 && product.isAlcoholic == 1){ 1876 html += ' <div class="" style="opacity:0.9; font-size:0.8rem;">'; 1877 1878 if (product.hasOwnProperty("abv") && product.abv != ""){ 1879 html += ' <strong>ABV (%):</strong> '+product.abv+'<br/>'; 1880 } 1881 if (product.hasOwnProperty("serving_size") && product.serving_size > 0){ 1882 html += ' <strong>Serving Size (ml):</strong> '+product.serving_size+'<br/>'; 1883 } 1884 html += ' </div>'; 1885 1886 } 1887 } 1888 1889 1890 html += ' </div>'; 1891 1892 if (product.description != ""){ 1893 html += ' <div class="my-3 d-none d-md-block" style="opacity:0.6; font-size:0.9rem;">'; 1894 html += ' '+product.descriptionTruncated; 1895 html += ' </div>'; 1896 } 1897 1898 html += ' <div class="mt-auto font-weight-bold d-flex align-items-center">'; 1899 if (product.haschildproducts == 1){ 1900 html += ' From '; 1901 } 1902 //OD Added 2020-08-03, original price wasn't showing with a line through on walby farm park 1903 if (product.price < product.priceorig) { 1904 html += ' <span class="" style="text-decoration:line-through">£'+product.priceorig+'</span> <span class="text-danger">£'+product.promoData.discountPrice+'</span>'; 1905 } else if (product.price != product.priceorig){ 1906 html += ' '+showprice(product.priceorig); 1907 }else{ 1908 html += ' '+showprice(price); 1909 } 1910 html += ' </div>'; 1911 html += ' </div>'; 1912 html += ' </div>'; 1913 html += ' <div class="col-6 col-md-5">'; 1914 html += ' <img src="'+product.thumbimg+'" alt=""/>'; 1915 html += ' </div>'; 1916 html += ' </div>';
1917 html += ' </div>'; 1918 html += ' </div>'; 1919 1920 /* 1921 html += '<li data-productname="'+productname+'" class="list-group-item productItem">'; 1922 html += '<div class="row justify-content-center align-items-center" id="product_'+key+'">'; 1923 html += ' <div class="col-4 col-sm-3 col-md-2 col-lg-1">'; 1924 html += ' <img src="'+product.thumbimg+'" alt=""/>'; 1925 html += ' </div>'; 1926 html += ' <div class="col-8 col-sm-6 col-md-7 col-lg-9">'; 1927 html += ' <div class="d-flex align-items-center flex-wrap flex-md-nowrap">'; 1928 html += ' <div class="flex-grow-1">'; 1929 html += ' <div class="d-flex align-items-center">'; 1930 html += ' <h3 class="mb-0">'+product.name+'</h3>'; 1931 html += ' </div>'; 1932 1933 if (product.haschildproducts == 1){ 1934 price = product.fromprice_gross; 1935 }else{ 1936 price = product.price; 1937 } 1938 1939 html += ' £'+price; 1940 html += ' </div>'; 1941 html += ' <div class="flex-grow-0">'; 1942 html += ' <div class="input-group mt-3 mt-md-0">'; 1943 html += ' <div class="input-group-prepend">'; 1944 html += ' <button onClick="decreaseQuantity('+key+'); return false;" class="btn btn-light qty-btn" value="-">-</button>'; 1945 html += ' </div>'; 1946 1947 html += ' <input type="number" class="form-control qty qty-input" name="qty" id="qty_'+key+'" value="1" max="" min="1" rel="10"/>'; 1948 html += ' <div class="input-group-append">'; 1949 html += ' <button onClick="increaseQuantity('+key+'}); return false;" class="btn btn-light qty-btn" value="+">+</button>'; 1950 html += ' </div>'; 1951 html += ' </div>';
1952 html += ' </div>'; 1953 html += ' </div>'; 1954 html += ' </div>'; 1955 html += ' <div class="col-12 col-sm-3 col-md-3 col-lg-2">'; 1956 html += ' <div id="addButton_'+key+'" class="btn btn-primary w-100 mt-3 mt-sm-0" onClick="addProductToBasket(\''+key+'\', \''+productname+'\');return false;" data-haschildproducts="'+product.haschildproducts+'">Add</div>'; 1957 html += ' </div>'; 1958 html += '</div>'; 1959 html += '</li>'; 1960 */ 1961 }); 1962 1963 $("#productWrapper").append(html); 1964 1965 if (pageNo == pages){ 1966 //console.log("Loaded all products.."); 1967 loadedAllProducts =true; 1968 $("#productLoader").addClass("d-none"); 1969 }else{ 1970 //console.log("Still products to load.."); 1971 } 1972 }, 1973 fail: function(data){ 1974 //console.log("fail"); 1975 //console.log(data); 1976 }, 1977 complete: function(data){ 1978 } 1979 },'json'); 1980 } else { 1981 //console.log("Already loading images... wait..."); 1982 } 1983 } 1984 $('#foodSearch').on("input keyup change", function () { 1985 searchProducts(); 1986 }); 1987 1988 function searchProducts(){ 1989 // Haven't loaded all products yet, let's load them first otherwise we won't show a full list of results 1990 if (!loadedAllProducts){ 1991 console.log("We haven't loaded all of the products yet... let's go get them"); 1992 getProducts(); 1993 setTimeout(function(){ 1994 console.log("Let's retry searching"); 1995 searchProducts(); 1996 }, 3000); 1997 }else{ 1998 var search = $("#foodSearch").val().toLowerCase(); 1999 console.log(search); 2000 var emptySearch = (search.length == 0); 2001 //$(".productItem").removeClass("text-success").removeClass("text-danger"); 2002 2003 if (emptySearch) { 2004 $(".productItemWrapper").removeClass("d-none"); 2005 //$(".productItem").removeClass("text-success").removeClass("text-danger"); 2006 return; 2007 } 2008 2009 $(".productItemWrapper").each(function() { 2010 if ($(this).data("productname").toLowerCase().indexOf(search) !== -1) { 2011 //$(this).addClass("text-success"); 2012 $(this).removeClass("d-none"); 2013 } else { 2014 //$(this).addClass("text-danger"); 2015 $(this).addClass("d-none"); 2016 } 2017 }); 2018 } 2019 } 2020 2021 2022 function increaseQuantity(productid){ 2023 currentQty = $('#qty_'+productid).val(); 2024 2025 var qty = parseInt(parseInt($('#qty_'+productid).val()) + 1); 2026 2027 var maxqty = $('#qty_'+productid).attr('rel'); 2028 console.log(maxqty); 2029 if (qty <= maxqty){ 2030 $('#qty_'+productid).val(qty); 2031 } 2032 } 2033 2034 function decreaseQuantity(productid){ 2035 currentQty = $('#qty_'+productid).val(); 2036 if (currentQty == $('#qty_'+productid).data("minqty")) { 2037 var qty = 0; 2038 }else{ 2039 var qty = parseInt(parseInt($('#qty_'+productid).val()) - 1); 2040 } 2041 var minqty = $('#qty_'+productid).attr('min'); 2042 if (qty >= minqty){ 2043 $('#qty_'+productid).val(qty); 2044 } 2045 } 2046 2047 2048 function addMultipleFoodItemsToBasket(){ 2049 var formData = []; 2050 var productIds = []; 2051 2052 var qty = $("#selectedProductQty").val(); 2053 var prodid = $("#selectedProductId").val(); 2054 var notes = $("#selectedProductNotes").val(); 2055 2056 console.log(notes); 2057 $("#addMultipleFoodItemsToBasket").find("#addMultipleFoodItemsToBasketText").addClass("d-none"); 2058 $("#addMultipleFoodItemsToBasket").find(".spinner-grow").removeClass("d-none"); 2059 productIds.push(prodid); 2060 2061 // Add ons 2062 $("#selectedProductAddonsWrapper").find("input[name]").each(function (index, item) { 2063 fields = $(item).attr("name").split('_'); 2064 if (fields[0] == "productId"){ 2065 if ($(item).attr("type") === "checkbox"){ 2066 if ($(item).prop("checked") === true){ 2067 productIds.push(fields[1]); 2068 } 2069 }else{ 2070 productIds.push(fields[1]); 2071 } 2072 } 2073 else{ 2074 //formData[item.name] = item.value; 2075 } 2076 }); 2077 2078 // Are there any mandatory choices which haven't been selected? 2079 var canProceed = true; 2080 var reasonNoProceed = ''; 2081 var choices = []; 2082 var i = 0; 2083 2084 // Loop through the choice buttons to get the choiceid, and then check quantities are correct 2085 $('[data-choicebutton]').each(function() { 2086 var choicekey = $(this).data('choicebutton'); 2087 var totalOptions = 0; 2088 var min = 0; 2089 var max = 0; 2090 var allowNoOption = 0; 2091 var count = 0; 2092 var choiceid = 0; 2093 var optionid = 0; 2094 var name = ''; 2095 $('[data-choicekey='+choicekey+']').each(function() { 2096 count++; 2097 if(count = 1) { 2098 min = $(this).data('choicemin'); 2099 max = $(this).data('choicemax'); 2100 allowNoOption = $(this).data('choiceallownooption'); 2101 choiceid = $(this).data('choiceid'); 2102 } 2103 2104 optionid = $(this).data('optionid'); 2105 prodid = $(this).data('prodid'); 2106 prodname = $(this).data('optionname'); 2107 price = $(this).data('price'); 2108 2109 if($(this).val() > 0) { 2110 choices[i] = { id: prodid, choiceid: choiceid, optionid: optionid, qty: $(this).val(), prodname: prodname, price: price }; 2111 i++; 2112 } 2113 2114 totalOptions = parseInt(totalOptions+parseInt($(this).val())); 2115 }); 2116 if(totalOptions < min && allowNoOption == 0) { 2117 canProceed = false;
2118 reasonNoProceed = 'One or more choices have not been selected'; 2119 $(this).addClass('bg-danger'); 2120 } 2121 }); 2122 2123 if(canProceed) { 2124 $.ajax({ 2125 url: '/shop/ajax.php', 2126 type: 'POST', 2127 data: { "addMultipleProductsToBasket":1, "qty":qty, "products": productIds, "notes": notes, "isChildOfParent": 1, "choices": choices}, 2128 2129 dataType: 'json', 2130 //contentType: 'multipart/form-data', 2131 success: function(data) { 2132 console.log("Success"); 2133 // console.log(data); 2134 prodname = $("#selectedProductName").text(); 2135 $("#foodModal").modal("hide"); 2136 $("#addMultipleFoodItemsToBasket").addClass("disabled").attr("disabled", true); 2137 $("#addMultipleFoodItemsToBasket").find("#addMultipleFoodItemsToBasketText").removeClass("d-none"); 2138 var x = parseFloat(data.basket.basketgrosstotal); 2139 2140 $(".orderTotal").html(showprice(+x)); 2141 $("#addMultipleFoodItemsToBasket").find(".spinner-grow").addClass("d-none"); 2142 2143 $('#basket-confirm-msg').html("Success! "+prodname+" is in the basket"); 2144 //$('#basket-confirm-msg').html("Success! "+prodname+" is in the basket <br /> <p>Your total is £" + x.toFixed(2) ); 2145 $('#basket-add-confirmation').addClass('slideUp'); 2146 2147 if ($("#basketBar").hasClass("slideDown")){ 2148 $("#basketBar").removeClass("slideDown"); 2149 } 2150 setTimeout(function(){ 2151 $('#basket-add-confirmation').removeClass('slideUp'); 2152 }, 3000); 2153 2154 //console.log(y);//total qty 2155 $('.badge').html(data.basket.totalbasketproducts); 2156 }, 2157 fail: function(data){ 2158 console.log("Fail"); 2159 }, 2160 complete: function(data){ 2161 setTimeout( 2162 function(){ 2163 location.reload(); 2164 },0001); 2165 } 2166 }); 2167 } else { 2168 alert(reasonNoProceed); 2169 $("#addMultipleFoodItemsToBasket").find("#addMultipleFoodItemsToBasketText").removeClass("d-none"); 2170 $("#addMultipleFoodItemsToBasket").find(".spinner-grow").addClass("d-none"); 2171 } 2172 2173 } 2174 /* 2175 function addProductToBasket(productid, prodname) { 2176 //alert("this one..."); 2177 $("#addButton_" + productid).html("<div class=\"spinner-grow spinner-grow-sm text-light\" role=\"status\"><span class=\"sr-only\">Loading...</span></div>"); 2178 name = prodname; 2179 qty = parseInt($("#qty_" + productid).val()); 2180 if (qty < 1){ qty = 1;} 2181 2182 if ($("#addButton_" + productid).data("haschildproducts") == 1){ 2183 alert("Has Child products ... DEVELOPEMENT IN PROGRESS"); 2184 return false; 2185 } 2186 //console.log("Add product to basket..."); 2187 $.post("/shop/ajax.php", { "addProductToBasketNew": 1, "productid": productid, "qty": qty, "ajax": 1 }, function (data) { 2188 $("#addButton_" + productid).html("Add"); 2189 //console.log("passed..."); 2190 //console.log(data); 2191 //console.log(data.basketgrosstotal.length); 2192 var x = parseFloat(data.basketgrosstotal); 2193 $('#basket-confirm-msg').html("You've added <b>" +qty+" "+ prodname + "</b> to your basket <br /> <p>your total is £" + x.toFixed(2) ); 2194 $('#basket-add-confirmation').addClass('slideUp'); 2195 $(".addButton_" + productid).html("Add"); 2196 setTimeout(function(){ 2197 $('#basket-add-confirmation').removeClass('slideUp'); 2198 }, 3000); 2199 //adds up total qty of items not just products. 2200 var y = 0; 2201 for(var i = 0; i < data.result.products.length; i++) 2202 { 2203 y += parseFloat(data.result.products[i].qty); 2204 } 2205 //console.log(y);//total qty 2206 $('.badge').html(data.count); 2207 2208 if (data.basketgrosstotal != "0") { 2209 2210 } else { 2211 2212 } 2213 }, 'json'); 2214 } 2215 */ 2216 function closeNotice() { 2217 $('#basket-add-confirmation').removeClass('d-block bottom-trans'); 2218 } 2219 2220 $('#foodModal').on('hidden.bs.modal', function (e) { 2221 // Reset Fields 2222 $("#selectedProductQty").val(1); 2223 $("#selectedProductId").val(""); 2224 $("#selectedProductPrice").val(""); 2225 $("#selectedProductImage").val(""); 2226 $("#selectedProductDescription").val(""); 2227 $("#selectedProductSubTypesWrapper").val(""); 2228 $("#selectedProductUpgradesWrapper").val(""); 2229 $("#addMultipleFoodItemsToBasket").addClass("disabled").attr("disabled", true); 2230 $("#selectedProductSubTypes").addClass("d-none"); 2231 }); 2232</script>
2232 2233 2234</body> 2235</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.