1<!doctype html> 2<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> 3<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> 4<!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]--> 5<!--[if IE 9 ]><html class="ie9 no-js"> <![endif]--> 6<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]--> 7<head> 8<meta name="google-site-verification" content="pfFMKhIbbm-wNV7diEok9cPU24PhZqPMYTZRkwVlbVo" /> 9 <!-- Basic page needs ================================================== --> 10 <meta charset="utf-8"> 11 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 12 13 14 <link rel="icon" href="https://cdn.store-assets.com/s/360437/f/4829761.png" /> 15 16 17 <!-- Title and description ================================================== --> 18 <title> 19 Login – Madam Yong Delight | Nyonya Kuih | Est. 1985 20 </title> 21 22 23 24 <!-- Social meta ================================================== --> 25 26 27 <meta property="og:type" content="website"> 28 <meta property="og:title" content="Login"> 29 <meta property="og:url" content="https://madamyongdelight.com/account/login"> 30 31 <meta property="og:image" content="https://cdn.store-assets.com/s/360437/f/4829734.png?width=350&format=webp"> 32 <meta property="og:image:secure_url" content="https://cdn.store-assets.com/s/360437/f/4829734.png?width=350&format=webp"> 33 34 35 36<meta property="og:description" content="Nyonya Kuih / Nyonya Kueh Supplier & Wholesaler"> 37<meta property="og:site_name" content="Madam Yong Delight | Nyonya Kuih | Est. 1985"> 38 39 40 41 <meta name="twitter:card" content="summary"> 42 43 44 45 46 47 48 49 <!-- Helpers ================================================== --> 50 <link rel="canonical" href="https://madamyongdelight.com/account/login"> 51 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=3.0"> 52 <meta name="theme-color" content=""> 53 54 <!-- CSS ================================================== --> 55 <link href="https://store-themes.easystore.co/360437/themes/3809/assets/timber.css?t=1787076042" rel="stylesheet" type="text/css" media="screen" /> 56 <link href="https://store-themes.easystore.co/360437/themes/3809/assets/theme.css?t=1787076042" rel="stylesheet" type="text/css" media="screen" /> 57 58 59 60 61 62<link href="https://fonts.googleapis.com/css?family=Karla:400,700&display=swap" rel="stylesheet"> 63 64 65
65<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript" ></script>
65 66 <!-- Header hook for plugins ================================================== --> 67 68<!-- ScriptTags -->
69<script>window.__st={p: "customers",cid: null,cem: null,cph: null,cfn: null,cln: null,cge: null,cdb: null,ccc: null};</script>
69<script src='/assets/events.js'></script>
69<script>(function(){function asyncLoad(){var urls=['/assets/facebook-pixel.js?v=1.2.1623053527','/assets/traffic.js?v=1'];for(var i=0;i<urls.length;i++){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=urls[i];var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);}}window.attachEvent ? window.attachEvent('onload', asyncLoad) : window.addEventListener('load', asyncLoad, false);})();</script>
69 70<!-- /ScriptTags --> 71 72 73 74<!--[if lt IE 9]>
75<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js" type="text/javascript" ></script>
vendor: 2 bytes, line 75
75
76<script src="https://store-themes.easystore.co/360437/themes/3809/assets/respond.min.js?t=1787076042" type="text/javascript" ></script>
76 77<link href="https://store-themes.easystore.co/360437/themes/3809/assets/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /> 78<link href="//madamyongdelight.com/search?q=b15159c3c4ee0e884d2174cc6f8e0417" id="respond-redirect" rel="respond-redirect" />
79<script src="//madamyongdelight.com/search?q=b15159c3c4ee0e884d2174cc6f8e0417" type="text/javascript"></script>
79 80<![endif]--> 81 82 83 84
84<script src="https://store-themes.easystore.co/360437/themes/3809/assets/modernizr.min.js?t=1787076042" type="text/javascript" ></script>
84 85 86 87 88
88<script src="/assets/shop_common.js" type="text/javascript" ></script>
88 89
89<script src="/assets/customer_area.js" type="text/javascript" ></script>
89 90 91
91<script> 92 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 93 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 94 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 95 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 96 97 ga('create', '', 'auto','myTracker'); 98 ga('myTracker.send', 'pageview'); 99 100 </script>
100 101 102<!-- Snippet:global/head: Google Search Console --> 103<meta name="google-site-verification" content="abc123"> 104<!-- /Snippet --> 105 106</head> 107 108<body id="login" class="template-customers " > 109 110 <ul id="MobileNav" class="mobile-nav"> 111 112 <li class="mobile-nav_icon-x"> 113 114 115 116 117 118 <span class="MobileNavTrigger icon icon-x"></span> 119 </li> 120 121 <li class="mobile-nav__link header-bar__search-wrapper"> 122 123 <div class="header-bar__module header-bar__search mobile-nav_search"> 124 125 <form action="/search" method="get" class="header-bar__search-form clearfix" role="search"> 126 127 <button type="submit" class="btn icon-fallback-text header-bar__search-submit"> 128 <span class="icon icon-search" aria-hidden="true"></span> 129 <span class="fallback-text">Search</span> 130 </button> 131 <input type="search" name="q" value="" aria-label="Search" class="header-bar__search-input" placeholder="Search" autocomplete="off"> 132 <div class="dropdown" id="searchDropdown"></div> 133 <input type="hidden" name="search_history" id="search_history"> 134 </form> 135 136 137 138
139<script> 140 var _search_history_listings = "" 141 if(_search_history_listings != "") localStorage.setItem('searchHistory', JSON.stringify(_search_history_listings)); 142 143 function clearAll() { 144 localStorage.removeItem('searchHistory'); 145 146 var customer = ""; 147 if(customer) { 148 // Your logic to clear all data or call an endpoint 149 fetch('/account/search_histories', { 150 method: 'DELETE', 151 headers: { 152 "Content-Type": "application/json", 153 "X-Requested-With": "XMLHttpRequest" 154 }, 155 body: JSON.stringify({ 156 _token: "Nisycvf9Sp9VbIf314he5pA7ev8jpbe0OkohF4un" 157 }), 158 }) 159 .then(response => response.json()) 160 } 161 } 162 // End - store view history in local storage 163 164 // search history dropdown 165 var searchInputs = document.querySelectorAll('input[type=search]'); 166 167 if(searchInputs.length > 0) { 168 169 searchInputs.forEach((searchInput)=>{ 170 171 searchInput.addEventListener('focus', function() { 172 var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown'); 173 searchDropdown.innerHTML = ''; // Clear existing items 174 175 // retrieve data from local storage 176 var searchHistoryData = JSON.parse(localStorage.getItem('searchHistory')) || []; 177 178 // Convert JSON to string 179 var search_history_json = JSON.stringify(searchHistoryData); 180 181 // Set the value of the hidden input 182 searchInput.closest('form').querySelector("#search_history").value = search_history_json; 183 184 // create dropdown items 185 var clearAllItem = document.createElement('div'); 186 clearAllItem.className = 'dropdown-item clear-all'; 187 clearAllItem.textContent = 'Clear'; 188 clearAllItem.addEventListener('click', function() { 189 clearAll(); 190 searchDropdown.style.display = 'none'; 191 searchInput.classList.remove('is-focus'); 192 }); 193 searchDropdown.appendChild(clearAllItem); 194 195 // create dropdown items 196 searchHistoryData.forEach(function(item) { 197 var dropdownItem = document.createElement('div'); 198 dropdownItem.className = 'dropdown-item'; 199 dropdownItem.textContent = item.term; 200 dropdownItem.addEventListener('click', function() { 201 searchInput.value = item.term; 202 searchDropdown.style.display = 'none'; 203 }); 204 searchDropdown.appendChild(dropdownItem); 205 }); 206 207 if(searchHistoryData.length > 0){ 208 // display the dropdown 209 searchInput.classList.add('is-focus'); 210 document.body.classList.add('search-input-focus'); 211 searchDropdown.style.display = 'block'; 212 } 213 }); 214 215 searchInput.addEventListener("focusout", (event) => { 216 var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown'); 217 searchInput.classList.remove('is-focus'); 218 searchDropdown.classList.add('transparent'); 219 setTimeout(()=>{ 220 searchDropdown.style.display = 'none'; 221 searchDropdown.classList.remove('transparent'); 222 document.body.classList.remove('search-input-focus'); 223 }, 400); 224 }); 225 }) 226 } 227 // End - search history dropdown 228</script>
228 229 </div> 230 231 </li> 232 233 234 235 <li class="mobile-nav__link" aria-haspopup="true"> 236 237 <a href="/" > 238 Home 239 </a> 240 241 </li> 242 243 244 <li class="mobile-nav__link" aria-haspopup="true"> 245 246 247 <a href="/collections/all" class="mobile-nav__parent-link"> 248 Products 249 </a> 250 <span class="mobile-nav__sublist-trigger"> 251 <span class="icon-fallback-text mobile-nav__sublist-expand"> 252 <span class="icon icon-plus" aria-hidden="true"></span> 253 <span class="fallback-text">+</span> 254</span> 255<span class="icon-fallback-text mobile-nav__sublist-contract"> 256 <span class="icon icon-minus" aria-hidden="true"></span> 257 <span class="fallback-text">-</span> 258</span> 259 260 </span> 261 <ul class="mobile-nav__sublist"> 262 263 264 <li class="mobile-nav__sublist-link" aria-haspopup="true"> 265 266 <a href="/collections/top-picks" > 267 Top Picks 268 </a> 269 270 </li> 271 272 273 <li class="mobile-nav__sublist-link" aria-haspopup="true"> 274 275 <a href="/collections/sweets" > 276 Sweets 277 </a> 278 279 </li> 280 281 282 <li class="mobile-nav__sublist-link" aria-haspopup="true"> 283 284 <a href="/collections/savouries" > 285 Savouries 286 </a> 287 288 </li> 289 290 291 <li class="mobile-nav__sublist-link" aria-haspopup="true"> 292 293 <a href="/collections/vegetarian-vegan" > 294 Vegan 295 </a> 296 297 </li> 298 299 300 <li class="mobile-nav__sublist-link" aria-haspopup="true"> 301 302 <a href="/collections/gift-sets" > 303 Gift Sets 304 </a> 305 306 </li> 307 308 309 <li class="mobile-nav__sublist-link" aria-haspopup="true"> 310 311 <a href="/collections/cny-specials" > 312 CNY Specials 313 </a> 314 315 </li> 316 317 318 <li class="mobile-nav__sublist-link" aria-haspopup="true"> 319 320 <a href="/collections/packaging" > 321 Packaging & Add-Ons 322 </a> 323 324 </li> 325 326 </ul> 327 328 </li> 329 330 331 <li class="mobile-nav__link" aria-haspopup="true"> 332 333 <a href="https://www.madamyongdelight.com/collections/gift-sets" > 334 Gift Sets 335 </a> 336 337 </li> 338 339 340 <li class="mobile-nav__link" aria-haspopup="true"> 341 342 <a href="/collections/packaging" > 343 Packaging & Add-Ons 344 </a> 345 346 </li> 347 348 349 <li class="mobile-nav__link" aria-haspopup="true"> 350 351 <a href="/apps/contact-form-plus" > 352 Wholesale 353 </a> 354 355 </li> 356 357 358 <li class="mobile-nav__link" aria-haspopup="true"> 359 360 <a href="/pages/media-feature" > 361 Media / Feature 362 </a> 363 364 </li> 365 366 367 <li class="mobile-nav__link" aria-haspopup="true"> 368 369 <a href="/pages/join-our-team" > 370 Join Our Team! 371 </a> 372 373 </li> 374 375 376 <li class="mobile-nav__link" aria-haspopup="true"> 377 378 <a href="/pages/faq" > 379 FAQ 380 </a> 381 382 </li> 383 384 385 <li class="mobile-nav__link" aria-haspopup="true"> 386 387 <a href="/pages/contact-us" > 388 Contact Us 389 </a> 390 391 </li> 392 393 394 395 396 397 398 399 <li class="mobile-nav__link"> 400 <a href="/account/login">Log in</a> 401 </li> 402 403 <li class="mobile-nav__link"> 404 <a href="/account/register">Create account</a> 405 </li> 406 407 408 409 410</ul> 411<div id="MobileNavOutside" class="mobile-nav-outside"></div> 412 413 414<div id="PageContainer" class="page-container"> 415 416<!-- Snippet:global/body_start: Console Extension --> 417<div id='es_console' style='display: none;'>360437</div> 418<!-- /Snippet --> 419 420 421 <style> 422 .search-modal__form{ 423 position: relative; 424 } 425 426 .dropdown-wrapper { 427 position: relative; 428 } 429 430 .dropdown-wrapper:hover .dropdown { 431 display: block; 432 } 433 434 .header-icon-nav .dropdown { 435 left: -80px; 436 } 437 438 .dropdown { 439 display: none; 440 position: absolute; 441 top: 100%; 442 left: 0px; 443 width: 100%; 444 padding: 8px; 445 background-color: #fff; 446 z-index: 1000; 447 border-radius: 5px; 448 border: 1px solid rgba(var(--color-foreground), 1); 449 border-top: none; 450 overflow-x: hidden; 451 overflow-y: auto; 452 max-height: 350px; 453 min-width: 150px; 454 box-shadow: 0 0 5px rgba(0,0,0,0.1); 455 } 456 457 .dropdown a{ 458 text-decoration: none; 459 color: #000 !important; 460 } 461 462 .dropdown-item { 463 padding: 0.4rem 2rem; 464 cursor: pointer; 465 line-height: 1.4; 466 overflow: hidden; 467 text-overflow: ellipsis; 468 white-space: nowrap; 469 } 470 471 .dropdown-item:hover{ 472 background-color: #f3f3f3; 473 } 474 475 .search__input.is-focus{ 476 border-radius: 15px; 477 border-bottom-left-radius: 0; 478 border-bottom-right-radius: 0; 479 border: 1px solid rgba(var(--color-foreground), 1); 480 border-bottom: none; 481 box-shadow: none; 482 } 483 484 .clear-all { 485 text-align: right; 486 padding: 0 2rem 0.2rem; 487 line-height: 1; 488 font-size: 70%; 489 margin-bottom: -2px; 490 } 491 492 .clear-all:hover{ 493 background-color: #fff; 494 } 495 496 .referral-notification { 497 position: absolute; 498 top: 100%; 499 right: -12px; 500 background: white; 501 border: 1px solid #e0e0e0; 502 border-radius: 8px; 503 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 504 width: 280px; 505 z-index: 1000; 506 padding: 16px; 507 margin-top: 8px; 508 font-size: 14px; 509 line-height: 1.4; 510 } 511 512 .referral-notification::before { 513 content: ''; 514 position: absolute; 515 top: -8px; 516 right: 20px; 517 width: 0; 518 height: 0; 519 border-left: 8px solid transparent; 520 border-right: 8px solid transparent; 521 border-bottom: 8px solid white; 522 } 523 524 .referral-notification::after { 525 content: ''; 526 position: absolute; 527 top: -9px; 528 right: 20px; 529 width: 0; 530 height: 0; 531 border-left: 8px solid transparent; 532 border-right: 8px solid transparent; 533 border-bottom: 8px solid #e0e0e0; 534 } 535 536 .referral-notification h4 { 537 margin: 0 0 8px 0; 538 color: #2196F3; 539 font-size: 16px; 540 font-weight: 600; 541 } 542 543 .referral-notification p { 544 margin: 0 0 12px 0; 545 color: #666; 546 } 547 548 .referral-notification .referral-code { 549 background: #f5f5f5; 550 padding: 8px; 551 border-radius: 4px; 552 font-family: monospace; 553 font-size: 13px; 554 text-align: center; 555 margin: 8px 0; 556 border: 1px solid #ddd; 557 } 558 559 .referral-notification .close-btn { 560 position: absolute; 561 top: 8px; 562 right: 8px; 563 background: none; 564 border: none; 565 font-size: 18px; 566 color: #999; 567 cursor: pointer; 568 padding: 0;
569 width: 20px; 570 height: 20px; 571 line-height: 1; 572 } 573 574 .referral-notification .close-btn:hover { 575 color: #333; 576 } 577 578 .referral-notification .action-btn { 579 background: #2196F3; 580 color: white; 581 border: none; 582 padding: 8px 16px; 583 border-radius: 4px; 584 cursor: pointer; 585 font-size: 12px; 586 margin-right: 8px; 587 margin-top: 8px; 588 } 589 590 .referral-notification .action-btn:hover { 591 background: #1976D2; 592 } 593 594 .referral-notification .dismiss-btn { 595 background: transparent; 596 color: #666; 597 border: 1px solid #ddd; 598 padding: 8px 16px; 599 border-radius: 4px; 600 cursor: pointer; 601 font-size: 12px; 602 margin-top: 8px; 603 } 604 605 .referral-notification .dismiss-btn:hover { 606 background: #f5f5f5; 607 } 608 .referral-modal__dialog { 609 transform: translate(-50%, 0); 610 transition: transform var(--duration-default) ease, visibility 0s; 611 z-index: 10000; 612 position: fixed; 613 top: 20vh; 614 left: 50%; 615 width: 100%; 616 max-width: 350px; 617 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 618 border-radius: 12px; 619 background-color: #fff; 620 color: #000; 621 padding: 20px; 622 text-align: center; 623 } 624 .modal-overlay.referral-modal-overlay { 625 position: fixed; 626 top: 0; 627 left: 0; 628 width: 100%; 629 height: 100%; 630 background-color: rgba(0, 0, 0, 0.7); 631 z-index: 2001; 632 display: block; 633 opacity: 1; 634 transition: opacity var(--duration-default) ease, visibility 0s; 635 } 636</style> 637 638<header id="es_header_bar" class="header-bar sticky-topbar"> 639 <div class="header-bg-wrapper"> 640 <div class="header-wrapper wrapper"> 641 642 643 <div class="logo-header" role="banner"> 644 645 646 <div class="h1 site-header__logo" itemscope itemtype="http://schema.org/Organization"> 647 648 649 650 651 <a href="/" class="logo-wrapper" itemprop="url"> 652 <img src="https://cdn.store-assets.com/s/360437/f/4829734.png?width=350&format=webp" alt="Madam Yong Delight | Nyonya Kuih | Est. 1985" itemprop="logo"> 653 </a> 654 655 656 657 658 </div> 659 660 661 </div> 662 663 <div class="header-nav-bar medium-down--hide"> 664 665<ul class="site-nav large--text-center" id="AccessibleNav"> 666 667 668 669 <li > 670 <a href="/" class="site-nav__link">Home</a> 671 </li> 672 673 674 675 676 677 <li class="site-nav--has-dropdown" aria-haspopup="true"> 678 <a href="/collections/all" class="site-nav__link"> 679 Products 680 <span class="arrow-icon"> 681 <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>arrow down</title><path d="M50,78.18A7.35,7.35,0,0,1,44.82,76L3.15,34.36A7.35,7.35,0,1,1,13.55,24L50,60.44,86.45,24a7.35,7.35,0,1,1,10.4,10.4L55.21,76A7.32,7.32,0,0,1,50,78.18Z"/></svg> 682 </span> 683 </a> 684 <ul class="site-nav__dropdown"> 685 686 687 688 <li > 689 <a href="/collections/top-picks" class="site-nav__link">Top Picks</a> 690 </li> 691 692 693 694 695 <li > 696 <a href="/collections/sweets" class="site-nav__link">Sweets</a> 697 </li> 698 699 700 701 702 <li > 703 <a href="/collections/savouries" class="site-nav__link">Savouries</a> 704 </li> 705 706 707 708 709 <li > 710 <a href="/collections/vegetarian-vegan" class="site-nav__link">Vegan</a> 711 </li> 712 713 714 715 716 <li > 717 <a href="/collections/gift-sets" class="site-nav__link">Gift Sets</a> 718 </li> 719 720 721 722 723 <li > 724 <a href="/collections/cny-specials" class="site-nav__link">CNY Specials</a> 725 </li> 726 727 728 729 730 <li > 731 <a href="/collections/packaging" class="site-nav__link">Packaging & Add-Ons</a> 732 </li> 733 734 735 </ul> 736 </li> 737 738 739 740 741 <li > 742 <a href="https://www.madamyongdelight.com/collections/gift-sets" class="site-nav__link">
742Gift Sets</a> 743 </li> 744 745 746 747 748 <li > 749 <a href="/collections/packaging" class="site-nav__link">Packaging & Add-Ons</a> 750 </li> 751 752 753 754 755 <li > 756 <a href="/apps/contact-form-plus" class="site-nav__link">Wholesale</a> 757 </li> 758 759 760 761 762 <li > 763 <a href="/pages/media-feature" class="site-nav__link">Media / Feature</a> 764 </li> 765 766 767 768 769 <li > 770 <a href="/pages/join-our-team" class="site-nav__link">Join Our Team!</a> 771 </li> 772 773 774 775 776 <li > 777 <a href="/pages/faq" class="site-nav__link">FAQ</a> 778 </li> 779 780 781 782 783 <li > 784 <a href="/pages/contact-us" class="site-nav__link">Contact Us</a> 785 </li> 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800</ul> 801 802 </div> 803 804 <div class="desktop-header-nav medium-down--hide"> 805 806 807 <div class="header-subnav"> 808 809 810 811 812 813 <div class="header-icon-nav"> 814 815 816 817 818 819 820 821 822 <div class="header-bar__module"> 823 824 <a class="popup-with-form" href="#search-form"> 825 826 827 828 829 <svg class="icon-search svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-search</title><path d="M68.5,65.87a35.27,35.27,0,1,0-5.4,4.5l23.11,23.1a3.5,3.5,0,1,0,5-4.94ZM14.82,41A28.47,28.47,0,1,1,43.28,69.43,28.5,28.5,0,0,1,14.82,41Z"/></svg> 830 831 832 833 </a> 834 835 836 837<!-- form itself --> 838<div id="search-form" class="white-popup-block mfp-hide popup-search"> 839 <div class="popup-search-content"> 840 <form action="/search" method="get" class="input-group search-bar" role="search"> 841 842 <span class="input-group-btn"> 843 <button type="submit" class="btn"> 844 845 846 847 848 <svg class="icon-search svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-search</title><path d="M68.5,65.87a35.27,35.27,0,1,0-5.4,4.5l23.11,23.1a3.5,3.5,0,1,0,5-4.94ZM14.82,41A28.47,28.47,0,1,1,43.28,69.43,28.5,28.5,0,0,1,14.82,41Z"/></svg> 849 850 851 852 </button> 853 </span> 854 <input type="search" name="q" value="" placeholder="Search" class="input-group-field" aria-label="Search" placeholder="Search" autocomplete="off"> 855 <div class="dropdown" id="searchDropdown"></div> 856 <input type="hidden" name="search_history" id="search_history"> 857 </form> 858 </div> 859</div> 860
861<script src="https://store-themes.easystore.co/360437/themes/3809/assets/magnific-popup.min.js?t=1787076042" type="text/javascript" ></script>
vendor: 1 bytes, line 861
861
862<script> 863$(document).ready(function() { 864 $('.popup-with-form').magnificPopup({ 865 type: 'inline', 866 preloader: false, 867 focus: '#name', 868 mainClass: 'popup-search-bg-wrapper', 869 870 // When elemened is focused, some mobile browsers in some cases zoom in 871 // It looks not nice, so we disable it: 872 callbacks: { 873 beforeOpen: function() { 874 if($(window).width() < 700) { 875 this.st.focus = false; 876 } else { 877 this.st.focus = '#name'; 878 } 879 } 880 } 881 }); 882}); 883</script>
883 884 885
886<script> 887 var _search_history_listings = "" 888 if(_search_history_listings != "") localStorage.setItem('searchHistory', JSON.stringify(_search_history_listings)); 889 890 function clearAll() { 891 localStorage.removeItem('searchHistory'); 892 893 var customer = ""; 894 if(customer) { 895 // Your logic to clear all data or call an endpoint 896 fetch('/account/search_histories', { 897 method: 'DELETE', 898 headers: { 899 "Content-Type": "application/json", 900 "X-Requested-With": "XMLHttpRequest" 901 }, 902 body: JSON.stringify({ 903 _token: "Nisycvf9Sp9VbIf314he5pA7ev8jpbe0OkohF4un" 904 }), 905 }) 906 .then(response => response.json()) 907 } 908 } 909 // End - store view history in local storage 910 911 // search history dropdown 912 var searchInputs = document.querySelectorAll('input[type=search]'); 913 914 if(searchInputs.length > 0) { 915 916 searchInputs.forEach((searchInput)=>{ 917 918 searchInput.addEventListener('focus', function() { 919 var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown'); 920 searchDropdown.innerHTML = ''; // Clear existing items 921 922 // retrieve data from local storage 923 var searchHistoryData = JSON.parse(localStorage.getItem('searchHistory')) || []; 924 925 // Convert JSON to string 926 var search_history_json = JSON.stringify(searchHistoryData); 927 928 // Set the value of the hidden input 929 searchInput.closest('form').querySelector("#search_history").value = search_history_json; 930 931 // create dropdown items 932 var clearAllItem = document.createElement('div'); 933 clearAllItem.className = 'dropdown-item clear-all'; 934 clearAllItem.textContent = 'Clear'; 935 clearAllItem.addEventListener('click', function() { 936 clearAll(); 937 searchDropdown.style.display = 'none'; 938 searchInput.classList.remove('is-focus'); 939 }); 940 searchDropdown.appendChild(clearAllItem); 941 942 // create dropdown items 943 searchHistoryData.forEach(function(item) { 944 var dropdownItem = document.createElement('div'); 945 dropdownItem.className = 'dropdown-item'; 946 dropdownItem.textContent = item.term; 947 dropdownItem.addEventListener('click', function() { 948 searchInput.value = item.term; 949 searchDropdown.style.display = 'none'; 950 }); 951 searchDropdown.appendChild(dropdownItem); 952 }); 953 954 if(searchHistoryData.length > 0){ 955 // display the dropdown 956 searchInput.classList.add('is-focus'); 957 document.body.classList.add('search-input-focus'); 958 searchDropdown.style.display = 'block'; 959 } 960 }); 961 962 searchInput.addEventListener("focusout", (event) => { 963 var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown'); 964 searchInput.classList.remove('is-focus'); 965 searchDropdown.classList.add('transparent'); 966 setTimeout(()=>{ 967 searchDropdown.style.display = 'none'; 968 searchDropdown.classList.remove('transparent'); 969 document.body.classList.remove('search-input-focus'); 970 }, 400); 971 }); 972 }) 973 } 974 // End - search history dropdown 975</script>
975 976 </div> 977 978 979 980 981 982 983 984 <div class="header-bar__module dropdown-wrapper" style="position: relative;"> 985 986 <a href="/account/login"> 987 988 989 990 <svg class="svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-profile</title><path d="M50,51.8A24.4,24.4,0,1,0,25.6,27.4,24.43,24.43,0,0,0,50,51.8ZM50,10A17.4,17.4,0,1,1,32.6,27.4,17.43,17.43,0,0,1,50,10Z"/><path d="M62.66,57.66H37.34a30.54,30.54,0,0,0-30.5,30.5V93.5a3.5,3.5,0,0,0,3.5,3.5H89.66a3.5,3.5,0,0,0,3.5-3.5V88.16A30.54,30.54,0,0,0,62.66,57.66ZM86.16,90H13.84V88.16a23.53,23.53,0,0,1,23.5-23.5H62.66a23.53,23.53,0,0,1,23.5,23.5Z"/></svg> 991 992 993</a> 994 995 <!-- Referral Notification Popup for Desktop --> 996 <div id="referralNotification" class="referral-notification" style="display: none;"> 997 <button class="close-btn" onclick="dismissReferralNotification()">×</button> 998 <div style="text-align: center; margin-bottom: 16px;"> 999 <div style="width: 100px; height: 100px; margin: 0 auto;"> 1000 <img src="https://resources.easystore.co/storefront/icons/channels/vector_referral_program.svg"> 1001 </div> 1002 </div> 1003 <p id="referralSignupMessage" style="text-align: center; font-size: 14px; color: #666; margin: 0 0 20px 0;"> 1004 Your friend gifted you credit! Sign up now to redeem. 1005 </p> 1006 <div style="text-align: center;"> 1007 <button class="btn" onclick="goToSignupPage()" style="width: 100%; color: #fff;"> 1008 Sign Up 1009 </button> 1010 </div> 1011 </div> 1012 1013 </div> 1014 1015 1016 <div class="header-bar__module cart-page-link-wrapper"> 1017 <span class="header-bar__sep" aria-hidden="true"></span> 1018 <a class="CartDrawerTrigger cart-page-link"> 1019 1020 1021 1022 1023 <svg class="svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-bag</title><path d="M91.78,93.11,84.17,24.44a3.5,3.5,0,0,0-3.48-3.11H69.06C67.53,10.94,59.57,3,50,3S32.47,10.94,30.94,21.33H19.31a3.5,3.5,0,0,0-3.48,3.11L8.22,93.11A3.49,3.49,0,0,0,11.69,97H88.31a3.49,3.49,0,0,0,3.47-3.89ZM50,10c5.76,0,10.6,4.83,12,11.33H38.05C39.4,14.83,44.24,10,50,10ZM15.6,90l6.84-61.67h8.23v9.84a3.5,3.5,0,0,0,7,0V28.33H62.33v9.84a3.5,3.5,0,0,0,7,0V28.33h8.23L84.4,90Z"/></svg> 1024 1025 1026 1027 <span class="cart-count header-bar__cart-count hidden-count">0</span> 1028 </a> 1029 </div> 1030 1031 1032 1033 1034 1035 1036 1037 </div> 1038 </div> 1039 1040 1041 1042 </div> 1043 1044 <div class="mobile-header-icons large--hide"> 1045 1046 <div class="large--hide"> 1047 1048 1049 1050 1051 <a href="/account/login"> 1052 1053 1054 1055 <svg class="svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-profile</title><path d="M50,51.8A24.4,24.4,0,1,0,25.6,27.4,24.43,24.43,0,0,0,50,51.8ZM50,10A17.4,17.4,0,1,1,32.6,27.4,17.43,17.43,0,0,1,50,10Z"/><path d="M62.66,57.66H37.34a30.54,30.54,0,0,0-30.5,30.5V93.5a3.5,3.5,0,0,0,3.5,3.5H89.66a3.5,3.5,0,0,0,3.5-3.5V88.16A30.54,30.54,0,0,0,62.66,57.66ZM86.16,90H13.84V88.16a23.53,23.53,0,0,1,23.5-23.5H62.66a23.53,23.53,0,0,1,23.5,23.5Z"/></svg> 1056 1057 1058</a> 1059 1060 1061 1062 1063 1064 1065 </div> 1066 1067 1068 <!-- Mobile cart --> 1069 <div class="large--hide"> 1070 <a class="CartDrawerTrigger cart-page-link mobile-cart-page-link"> 1071 1072 1073 1074 1075 <svg class="svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-bag</title><path d="M91.78,93.11,84.17,24.44a3.5,3.5,0,0,0-3.48-3.11H69.06C67.53,10.94,59.57,3,50,3S32.47,10.94,30.94,21.33H19.31a3.5,3.5,0,0,0-3.48,3.11L8.22,93.11A3.49,3.49,0,0,0,11.69,97H88.31a3.49,3.49,0,0,0,3.47-3.89ZM50,10c5.76,0,10.6,4.83,12,11.33H38.05C39.4,14.83,44.24,10,50,10ZM15.6,90l6.84-61.67h8.23v9.84a3.5,3.5,0,0,0,7,0V28.33H62.33v9.84a3.5,3.5,0,0,0,7,0V28.33h8.23L84.4,90Z"/></svg> 1076 1077 1078
1079 <span class="cart-count hidden-count">0</span> 1080 </a> 1081 </div> 1082 1083 <!-- Mobile hamburger --> 1084 <div class="large--hide"> 1085 <a class="mobile-nav-trigger MobileNavTrigger"> 1086 1087 1088 1089 1090 <svg class="svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-nav-menu</title><path d="M6.7,26.34H93a3.5,3.5,0,0,0,0-7H6.7a3.5,3.5,0,0,0,0,7Z"/><path d="M93.3,46.5H7a3.5,3.5,0,0,0,0,7H93.3a3.5,3.5,0,1,0,0-7Z"/><path d="M93.3,73.66H7a3.5,3.5,0,1,0,0,7H93.3a3.5,3.5,0,0,0,0-7Z"/></svg> 1091 1092 1093 1094 </a> 1095 </div> 1096 1097 1098 1099 <!-- Referral Notification Modal for Mobile --> 1100 <details-modal class="referral-modal" id="referralMobileModal"> 1101 <details> 1102 <summary class="referral-modal__toggle" aria-haspopup="dialog" aria-label="Open referral modal" style="display: none;"> 1103 </summary> 1104 <div class="modal-overlay referral-modal-overlay"></div> 1105 <div class="referral-modal__dialog" role="dialog" aria-modal="true" aria-label="Referral notification"> 1106 <div class="referral-modal__content"> 1107 <button type="button" class="modal__close-button" aria-label="Close" onclick="closeMobileReferralModal()" style="position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer;"> 1108 × 1109 </button> 1110 1111 <div style="margin-bottom: 24px;"> 1112 <div style="width: 120px; height: 120px; margin: 0 auto 20px;"> 1113 <img src="https://resources.easystore.co/storefront/icons/channels/vector_referral_program.svg" style="width: 100%; height: 100%;"> 1114 </div> 1115 </div> 1116 1117 <p id="referralSignupMessageMobile" style="font-size: 16px; color: #333; margin: 0 0 30px 0; line-height: 1.5;"> 1118 Your friend gifted you credit! Sign up now to redeem. 1119 </p> 1120 1121 <button type="button" class="btn" onclick="goToSignupPageFromMobile()" style="width: 100%; color: #fff;"> 1122 Sign Up 1123 </button> 1124 </div> 1125 </div> 1126 </details> 1127 </details-modal> 1128 1129 1130 1131 </div> 1132 1133 </div> 1134 </div> 1135</header> 1136 1137 1138 1139 1140 1141 1142 1143 <main class="wrapper main-content" role="main"> 1144 <div class="grid"> 1145 <div class="grid__item">
vendor: 100 bytes, lines 1145-1149
1145 1146 1147 1148 1149<script src="https://www.recaptcha.net/recaptcha/enterprise.js?render=
11496LdMNdIqAAAAALegJp7y4weVcCIlnwmIN8TWseEF
vendor: 12 bytes, line 1149
1149"></script>
1150<link rel="preload" href="https://store-themes.easystore.co/360437/themes/3809/assets/customer.css?t=1787076042" as="style" onload="this.onload=null;this.rel='stylesheet'"> 1151<style> 1152 main.main-content .field > label{ 1153 display: none; 1154 } 1155 .h3{ 1156 font-size: 18px; 1157 } 1158 .button--full-width{ 1159 width: 100%; 1160 } 1161 .tab-wrapper{ 1162 display: inline-flex; 1163 justify-content: center; 1164 align-items: center; 1165 margin: 10px auto 20px; 1166 background-color: #eaeaea; 1167 border-radius: 200px; 1168 padding: 5px; 1169 gap: 10px; 1170 } 1171 .tab-wrapper .tab-label { 1172 display: inline-block; 1173 min-width: 130px; 1174 padding: 8px 15px; 1175 border-radius: 100px; 1176 cursor: pointer; 1177 font-size: 17px; 1178 line-height: 1.1; 1179 user-select: none; 1180 margin: 0; 1181 color: #000; 1182 } 1183 #register-tos a { 1184 display: inline; 1185 } 1186 @media screen and (max-width: 400px){ 1187 .tab-wrapper .tab-label { 1188 min-width: 110px; 1189 } 1190 } 1191 .tab-wrapper input[type='radio']:checked + .tab-label { 1192 background-color: #fff; 1193 box-shadow: 2px 2px 25px -10px #333; 1194 } 1195 1196 @media screen and (min-width: 500px){ 1197 .large--five-twelfths{ 1198 min-width: 420px; 1199 } 1200 } 1201</style> 1202 1203 1204 1205 1206<div class="customer login section-width-control small-width large--five-twelfths text-center wrapper"> 1207 <div class="card"> 1208 <h1 id="login" tabindex="-1" class="mb-0"> 1209 Welcome 1210 </h1> 1211 <p class="h3 mt-0"> 1212 1213 Sign up or log in to continue 1214 1215 </p> 1216 <div> 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 <div class="tab-wrapper"> 1235 <div> 1236 <input type="radio" name="type" id="tab-register" class="hide hidden" checked> 1237 <label for="tab-register" class="tab-label"> 1238 Sign up 1239 </label> 1240 </div> 1241 <div> 1242 <input type="radio" name="type" id="tab-login" class="hide hidden"> 1243 <label for="tab-login" class="tab-label"> 1244 Login 1245 </label> 1246 </div> 1247 </div> 1248 1249 1250 <form id="form-login" action="/account/auth" method="post" class="mt-2"> 1251 <input type="hidden" name="_token" value="Nisycvf9Sp9VbIf314he5pA7ev8jpbe0OkohF4un"> 1252 <input type="hidden" name="location_id" value=""> 1253 <input type="hidden" name="staff_id" value=""> 1254 <input type="hidden" id="recaptchaResponse" name="g-recaptcha-response"> 1255 1256 1257 <div id="error-content"></div> 1258 1259 <div class="field"> 1260 <input 1261 type="text" 1262 name="customer[email_or_phone]" 1263 id="CustomerDetail" 1264 autocorrect="off" 1265 autocapitalize="off" 1266 placeholder="Email" 1267 required 1268 > 1269 <label for="CustomerDetail"> 1270 Email 1271 </label> 1272 </div> 1273 1274 <button 1275 type="submit" 1276 form="form-login" 1277 class="btn button--full-width g-recaptcha"> 1278 Continue 1279 </button> 1280 1281 <div class="button-snippet"> 1282 1283 </div> 1284 1285 1286 1287 <div id="register-tos"> 1288 By signing up, I agree to the Madam Yong Delight | Nyonya Kuih | Est. 1985's <a target="_blank" href="/legal/terms-of-service">Terms of Service</a>, <a target="_blank" href="/legal/privacy-policy">Privacy Policy</a> and <a target="_blank" href="/legal/refund-policy">Refund Policy</a>. 1289 </div> 1290 1291 </form> 1292 </div> 1293 </div> 1294 1295</div> 1296 1297 1298
1299<script> 1300 const register_tab = document.querySelector('#tab-register'); 1301 const login_tab = document.querySelector('#tab-login'); 1302 const register_tos = document.querySelector('#register-tos'); 1303 const isRegistrationEnabled = "1"; 1304 1305 if (register_tab) { 1306 register_tab.addEventListener('click', function() { 1307 if (register_tos) { 1308 register_tos.style.display = 'block'; 1309 } 1310 }); 1311 } 1312 if (login_tab) { 1313 login_tab.addEventListener('click', function() { 1314 if (register_tos) { 1315 register_tos.style.display = 'none'; 1316 } 1317 }); 1318 } 1319 1320 const methodSwitchBtn = document.getElementById('phone-login-btn'); 1321 if (methodSwitchBtn) { 1322 methodSwitchBtn.onclick = function () { 1323 var type = (register_tab && register_tab.checked) ? 'register' : 'login'; 1324 window.location.href = '/account/login?method=phone&type=' + type; 1325 }; 1326 } 1327 1328 let lastPathSegment = window.location.pathname.split('/').filter(segment => segment.length > 0).pop(); 1329 1330 // Redirect to login if trying to access register when self registration is disabled 1331 if (!isRegistrationEnabled) { 1332 if (lastPathSegment === 'register') { 1333 window.location.href = '/account/login'; 1334 } else if (lastPathSegment === 'login' || lastPathSegment === 'auth') { 1335 if (register_tos) { 1336 register_tos.style.display = 'none'; 1337 } 1338 } 1339 } else { 1340 // Only proceed with tab logic if not redirecting 1341 if(lastPathSegment === 'login') { 1342 if (login_tab) { 1343 login_tab.checked = true; 1344 } 1345 if (register_tos) { 1346 register_tos.style.display = 'none'; 1347 } 1348 } else { 1349 if (register_tos) { 1350 register_tos.style.display = 'block'; 1351 } 1352 } 1353 } 1354 1355 const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; 1356 const phonePattern = /^(?:\+?\d{1,3}[\s-]?)?(?:\d{1,14}[\s-]?){1,5}$/; 1357 1358 let form = document.querySelector('#form-login'), 1359 input = document.querySelector('#CustomerDetail'), 1360 error_content = document.querySelector('#error-content'); 1361 1362 1363 // One attempt at a time: the reCAPTCHA wait below is async, so without 1364 // this a double-click starts two continuations and posts the form twice. 1365 var submitting = false; 1366 1367 form.addEventListener('submit', async function (event) { 1368 // preventDefault FIRST: a re-entrant submit must still be cancelled, or the 1369 // browser performs a native post with no captcha token. 1370 event.preventDefault(); 1371 if (submitting) return; 1372 1373 let input_value = input.value 1374 error_content.innerHTML = ''; 1375 if (!input_value.match(emailPattern) && !input_value.match(phonePattern)) { 1376 error_content.innerHTML = `<div class="errors note">Invalid Email or Phone</div>`; 1377 return false; 1378 } 1379 1380 submitting = true; 1381 document.querySelector('#form-login .btn').classList.add('btn--loading','loading'); 1382 1383 // reCAPTCHA is unreachable from some regions (google.com is blocked in 1384 // mainland China). Fail open the same way checkout and forgot-password do: 1385 // submit without a token rather than leave the button spinning forever. 1386 try { 1387 if (window.grecaptcha && typeof window.grecaptcha.enterprise === 'object') { 1388 // The loader defines a stub {ready} synchronously and fetches the real 1389 // implementation asynchronously, so execute() may not exist yet. 1390 // ready() queues until it does; the timeout stops a bundle that never 1391 // arrives from hanging the button. 1392 await new Promise(function (resolve) { 1393 setTimeout(resolve, 3000); 1394 try { grecaptcha.enterprise.ready(resolve); } catch (e) { resolve(); } 1395 }); 1396 1397 const token = await grecaptcha.enterprise.execute('6LdMNdIqAAAAALegJp7y4weVcCIlnwmIN8TWseEF', { action: 'LOGIN' }); 1398 document.getElementById('recaptchaResponse').value = token; 1399 } 1400 } catch (e) { /* fail open */ } 1401 1402 document.getElementById('form-login').submit(); 1403 }); 1404 1405 1406</script>
1406 1407 1408 1409 1410 </div> 1411 </div> 1412 1413 </main> 1414 1415 <footer id="es_footer_section" class="site-footer small--text-center" role="contentinfo"> 1416 1417 1418 <div id="es_logo_list_section" class="logo-list-section"> 1419 <h2 class="section-header__title"></h2> 1420 <ul class="logo-list-wrapper"> 1421 1422 1423 1424 1425 <li class="logo-list-item"> 1426 1427 <a href="/collections/all"></a> 1428 1429 <img class="lozad" data-src="https://cdn.store-assets.com/s/360437/f/14326811.jpg?width=350&format=webp"/> 1430 </li> 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 </ul> 1462</div> 1463 1464 1465 1466 <div class="wrapper"> 1467 1468 <div class="grid-uniform"> 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 <div class="grid__item large--one-half "> 1492 <a href="/" class="logo-wrapper" itemprop="url" > 1493 1494 <img class="footer-logo" src="https://cdn.store-assets.com/s/360437/f/14326839.png?width=350&format=webp" alt="Madam Yong Delight | Nyonya Kuih | Est. 1985" itemprop="logo"> 1495 1496 </a> 1497 <p class="site-footer__links">© 2024 MADAM YONG DELIGHT SDN BHD (202001004265)</p> 1498 </div> 1499 1500 1501 <div class="grid__item large--one-quarter medium--one-half"> 1502 1503 <!-- <h4>Quick Links</h4> --> 1504 1505 <ul class="site-footer__links"> 1506 1507 <li><a href="/pages/home" >Home</a></li> 1508 1509 <li><a href="/pages/faq" >FAQ</a></li> 1510 1511 <li><a href="/store-locator" >Location</a></li> 1512 1513 1514 </ul> 1515 </div> 1516 1517 1518 1519 <div class="grid__item large--one-quarter medium--one-half"> 1520 <!-- <h4>Follow Us</h4> --> 1521 1522 <ul class="inline-list social-icons"> 1523 1524 1525 <li> 1526 <a class="icon-fallback-text" href="https://www.facebook.com/madamyongdelight" title="Madam Yong Delight | Nyonya Kuih | Est. 1985 on Facebook" target="_blank"> 1527 1528 1529 1530 1531 <svg xmlns="http://www.w3.org/2000/svg" class="facebook-icon-svg social-icon-svg" viewBox="0 0 1024 1024"> 1532 <title>icon-facebook</title> 1533 <path d="M837.66,223.9a33.73,33.73,0,0,0-3.11-15c-6.78-13.85-17.87-21.09-33.37-21.09q-288.46,0-576.91,0c-.62,0-1.24,0-1.85,0a34.51,34.51,0,0,0-25.88,12.11c-6.31,7.13-8.85,15.57-8.85,25.07q.08,287.7,0,575.4c0,1,0,1.9,0,2.86A32.93,32.93,0,0,0,190,814.71c4.45,11.79,16.3,23.11,35,23.1q153.61-.1,307.24,0c2.36,0,2.36,0,2.36-2.37q0-123.3,0-246.6c0-2.55,0-2.55-2.53-2.55H452.27c-2.26,0-2.26,0-2.26-2.17v-96.3h84.63v-2.46c0-22.12-.11-44.24.06-66.36.07-8.29.57-16.59,1.28-24.85a129.58,129.58,0,0,1,7.43-33c10.86-30,30.59-51.74,60-64.51A133.44,133.44,0,0,1,653,285.82c12.45-.37,24.93,0,37.38.34,9.64.27,19.27.95,28.9,1.6,5.36.36,10.7,1.07,16.06,1.5,1.46.12,1.65.75,1.65,2q0,42.2,0,84.39c0,.59-.06,1.18-.09,1.85h-2.39c-16.28,0-32.56,0-48.84.05-7.63,0-15.23.54-22.65,2.61-11.61,3.23-19.86,10.09-23.65,21.78a55.66,55.66,0,0,0-2.74,16.86c-.14,22.23-.1,44.47-.13,66.7,0,2.25,0,2.25,2.31,2.25h94.66a15.13,15.13,0,0,1,0,1.54c-.38,2.94-.81,5.88-1.18,8.82-1.17,9.16-2.3,18.33-3.48,27.5-1.29,10-2.63,20-3.94,30-1.23,9.44-2.43,18.88-3.67,28.32-.31,2.32-.35,2.32-2.78,2.32h-79a4.62,4.62,0,0,0-1.67,0,2.5,2.5,0,0,0-1.2,1.16,3.68,3.68,0,0,0,0,1.49V835.21c0,2.56,0,2.56,2.53,2.56H797.83c2.13,0,4.27-.07,6.39-.21,11.56-.78,20.61-6.07,27.23-15.48,4.66-6.6,6.24-14.09,6.24-22.11q-.06-287.19,0-574.38Z" fill="#999"/> 1534 </svg> 1535 1536 1537
1538 <span class="fallback-text">Facebook</span> 1539 </a> 1540 </li> 1541 1542 1543 1544 <li> 1545 <a class="icon-fallback-text" href="https://instagram.com/madamyongdelight" title="Madam Yong Delight | Nyonya Kuih | Est. 1985 on Instagram" target="_blank"> 1546 1547 1548 1549 1550 <svg xmlns="http://www.w3.org/2000/svg" class="instagram-icon-svg social-icon-svg" viewBox="0 0 1024 1024"> 1551 <title>icon-instagram</title> 1552 <path d="M834.35,341.22a231.23,231.23,0,0,0-9.59-46.45,166.71,166.71,0,0,0-52.17-78.33c-17-14.41-36.33-24.44-57.44-31.3-21.52-7-43.69-10.21-66.19-11.12-22.28-.9-44.58-1.73-66.87-1.85-47.68-.26-95.37-.16-143.06,0-27.47.11-54.95.69-82.32,3.39a220.7,220.7,0,0,0-37.43,6.95c-26.2,7.26-50,19-70.24,37.45-18.06,16.4-32.3,35.52-41.87,58.05-9.89,23.29-15.13,47.68-16.69,72.82-1.23,19.78-2.06,39.6-2.32,59.41-.38,28.91-.1,57.82-.1,86.73-.23,39.92-.67,79.85,1,119.76.72,17.66,1.57,35.3,4.6,52.76,3.22,18.52,8.32,36.51,16.71,53.34C232.83,768,268.81,797,317.12,811a246.28,246.28,0,0,0,59.24,9.11c25.3.95,50.63,1.78,75.95,1.94,43.83.28,87.66.1,131.5,0,26-.08,52.08-.72,78.06-2.74a234.52,234.52,0,0,0,45.76-8c24.54-6.92,46.82-18.12,66.22-34.79,24.65-21.17,41.5-47.44,51.3-78.36,6.7-21.14,9.83-42.88,10.73-64.94.9-21.84,1.73-43.69,1.82-65.55q.33-78.21-.15-156.44C837.42,387.82,836.72,364.47,834.35,341.22Zm-55.3,232.84c-.12,20.41-1,40.84-2,61.24-1,19.2-4.13,38.08-11.74,55.92q-18.43,43.24-62.47,60c-14.36,5.48-29.3,8.3-44.55,9.53-27.07,2.18-54.21,2.63-81.36,2.73-21.31.07-42.62,0-63.93,0v-.16c-28.47,0-56.94.22-85.4-.09-17.5-.18-35-1-52.49-1.89-19.94-1-39.51-4.31-57.95-12.38q-41.6-18.2-58-60.68a162.37,162.37,0,0,1-9.95-45.62c-2-24.66-2.62-49.38-2.66-74.1-.09-50.88-.16-101.77.12-152.65.11-19,1-38.09,2-57.11a180,180,0,0,1,8.78-48.23c8.32-24.84,23.63-44.14,45.66-58.12,11.78-7.48,24.85-11.91,38.36-15,15.57-3.61,31.43-4.65,47.34-5.32,54.32-2.28,108.68-1.46,163-1.5,18.67,0,37.34.12,56,.56,15.84.38,31.7,1,47.51,2,18.33,1.18,36.27,4.59,53.19,12q41.67,18.25,58.1,60.83c5.67,14.7,8.64,30,9.91,45.63,2,25,2.63,50,2.67,75.09C779.25,475.82,779.35,524.94,779.05,574.06Z" fill="#999"/><path d="M513,330.12c-92-.34-167,74.55-167.08,166.87s74.71,167,167,167A166.86,166.86,0,0,0,679.77,497.12C679.87,405,605.46,330.45,513,330.12Zm-.29,275.31A108.38,108.38,0,1,1,621.21,497.15,108.38,108.38,0,0,1,512.7,605.43Z" fill="#999"/><path d="M686.47,284.5a39,39,0,1,0,38.92,39.14A39,39,0,0,0,686.47,284.5Z" fill="#999"/> 1553 </svg> 1554 1555 1556 1557 <span class="fallback-text">Instagram</span> 1558 </a> 1559 </li> 1560 1561 1562 1563 1564 1565 1566 <li> 1567 <a class="icon-fallback-text" href="https://wa.me/60122381396" title="Madam Yong Delight | Nyonya Kuih | Est. 1985 on Whatsapp" target="_blank"> 1568 1569 1570 1571 1572 <svg xmlns="http://www.w3.org/2000/svg" class="whatsapp-icon-svg social-icon-svg" viewBox="0 0 1024 1024"> 1573 <title>icon-whatsapp</title> 1574 <path d="M816.7,348.82A345.81,345.81,0,0,0,694.1,218.71c-44.79-28-93.6-44.39-146.07-49.88a345.45,345.45,0,0,0-92,2.72,339.05,339.05,0,0,0-94.38,29.87A343.85,343.85,0,0,0,238,302.05Q177.25,381,167.56,480.22a345,345,0,0,0,43.29,203.46,6.68,6.68,0,0,1,.57,4.56q-16.36,60.35-32.93,120.63c-5.08,18.56-10.2,37.12-15.43,56.13,1.15-.24,1.8-.34,2.43-.51Q254.72,841.08,344,817.7a7.88,7.88,0,0,1,4.84.57c11.92,5.41,23.56,11.5,35.68,16.39a344.42,344.42,0,0,0,274.43-8.3,343.9,343.9,0,0,0,122.89-97q64.35-80.48,74.57-183.1a344.59,344.59,0,0,0-2.88-89.12A336.49,336.49,0,0,0,816.7,348.82ZM799.12,528.11c-3.35,60.82-23.74,115.33-61.56,163C695.72,743.88,641.71,778,576.15,793.47A277.11,277.11,0,0,1,491.09,800a284.89,284.89,0,0,1-129.36-41.68,16.37,16.37,0,0,0-14.17-2c-33.08,8.93-66.26,17.47-99.4,26.13-.46.12-.93.19-2,.42,1.61-5.94,3.07-11.39,4.56-16.83q11.91-43.44,23.73-86.9a6.64,6.64,0,0,0-.91-4.73c-11.53-18-21.73-36.58-29.45-56.51a287.49,287.49,0,0,1-17.41-68.71c-5.7-46-.87-90.81,15-134.35a287.26,287.26,0,0,1,479.82-98.72c32.53,34.66,55.29,74.85,67.86,120.72A284,284,0,0,1,799.12,528.11Z" fill="#999"/><path d="M679.23,590c-12.9-6.08-25.57-12.63-38.44-18.75-10.69-5.09-21.41-10.15-32.36-14.63-8.48-3.47-12.2-1.6-17.82,5.65-8.75,11.27-17.79,22.32-26.93,33.28-4.38,5.25-8.82,6.33-15,3.54-11.48-5.18-23.13-10.16-34.09-16.32C477.68,562,449.73,532.17,428.22,496c-4.54-7.64-4-11.33,2-17.83,8.45-9.23,17.15-18.29,22.45-29.93a16.29,16.29,0,0,0,.44-13.68c-8.9-21.42-17.75-42.87-26.8-64.23a70.6,70.6,0,0,0-6.52-11.83c-2.39-3.56-6.15-5.12-10.51-5-3.28,0-6.56,0-9.84,0,0-.17,0-.34,0-.52-5.1.27-10.26.1-15.27.89-8.07,1.27-14,6.29-19.53,12.06-23.72,24.67-32.22,53.95-26.71,87.44a135.88,135.88,0,0,0,19.34,50.09c9.28,14.85,19.38,29.25,29.94,43.23a405.65,405.65,0,0,0,65.73,68.21c29.34,24.26,62.45,41.51,98.38,53.66,15,5.07,29.89,10.33,46,10.64,10.73.21,21.46.08,31.83-3a103.21,103.21,0,0,0,39.24-22c5.11-4.48,9.77-9.49,12.29-15.89a103.2,103.2,0,0,0,7.06-34.67C687.88,597,685.22,592.79,679.23,590Z" fill="#999"/> 1575 </svg> 1576 1577 1578
1579 <span class="fallback-text">Whatsapp</span> 1580 </a> 1581 </li> 1582 1583 1584 1585 1586</ul> 1587 1588 </div> 1589 1590 </div> 1591 1592 <hr class="hr--small hr--clear"> 1593 1594 1595 1596 <div class="grid"> 1597 <div class="grid__item text-center"> 1598 1599 1600 <p class="site-footer__links"> 1601 1602 1603 1604 <a href="/legal/terms-of-service">Terms of Service</a> 1605 1606 1607 1608 1609 | <a href="/legal/privacy-policy">Privacy Policy</a> 1610 1611 1612 1613 1614 | <a href="/legal/refund-policy">Refund Policy</a> 1615 1616 1617 1618 </p> 1619 1620 </div> 1621 </div> 1622 1623 </div> 1624 </footer> 1625 1626 1627 1628 1629 1630 1631 1632 <div id="scrollTopButton" class="on-left" style="display: none"> 1633 <svg class="svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22,18.25a1.21,1.21,0,0,1-.88-.37L12,8.77,2.88,17.88a1.24,1.24,0,0,1-1.76-1.76l10-10a1.24,1.24,0,0,1,1.76,0l10,10a1.24,1.24,0,0,1,0,1.76A1.21,1.21,0,0,1,22,18.25Z"/></svg> 1634 </div> 1635
1635<script> 1636 $( document ).ready(function() { 1637 var winScroll = $(this).scrollTop(), 1638 this_el = $("#scrollTopButton"); 1639 1640 // Header bar 1641 if(winScroll > 400){ 1642 this_el.fadeIn(); 1643 }else{ 1644 this_el.fadeOut(); 1645 } 1646 1647 $("#scrollTopButton").click(function() { 1648 $('html,body').animate({ scrollTop: 0 }); 1649 }); 1650 1651 $(window).scroll(function(){ 1652 var winScroll = $(this).scrollTop(); 1653 1654 // Header bar 1655 if(winScroll > 400){ 1656 this_el.fadeIn(); 1657 }else{ 1658 this_el.fadeOut(); 1659 } 1660 1661 }); 1662 }); 1663 </script>
1663 1664 1665 1666 1667 1668 1669
1669<script src="https://store-themes.easystore.co/360437/themes/3809/assets/fastclick.min.js?t=1787076042" type="text/javascript" ></script>
1669 1670
1670<script src="https://store-themes.easystore.co/360437/themes/3809/assets/timber.js?v1.1?t=1787076042" type="text/javascript" ></script>
1670 1671
1671<script src="https://store-themes.easystore.co/360437/themes/3809/assets/theme.js?t=1787076042" type="text/javascript" ></script>
1671 1672 1673 1674 1675 1676
1676<script> 1677 if (typeof Object.assign !== 'function') { 1678 // Must be writable: true, enumerable: false, configurable: true 1679 Object.defineProperty(Object, "assign", { 1680 value: function assign(target, varArgs) { // .length of function is 2 1681 'use strict'; 1682 if (target === null || target === undefined) { 1683 throw new TypeError('Cannot convert undefined or null to object'); 1684 } 1685 1686 var to = Object(target); 1687 1688 for (var index = 1; index < arguments.length; index++) { 1689 var nextSource = arguments[index]; 1690 1691 if (nextSource !== null && nextSource !== undefined) { 1692 for (var nextKey in nextSource) { 1693 // Avoid bugs when hasOwnProperty is shadowed 1694 if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 1695 to[nextKey] = nextSource[nextKey]; 1696 } 1697 } 1698 } 1699 } 1700 return to; 1701 }, 1702 writable: true, 1703 configurable: true 1704 }); 1705 } 1706 </script>
1706 1707
1707<script src="https://store-themes.easystore.co/360437/themes/3809/assets/lozad.min.js?t=1787076042" type="text/javascript" ></script>
1707 1708
1708<script> 1709 const observer = lozad('.lozad', { 1710 loaded: function(el) { 1711 // Custom implementation on a loaded element 1712 el.onload = function() { 1713 el.classList.add('loaded'); 1714 }; 1715 } 1716 }); 1717 observer.observe(); 1718 </script>
1718 1719 1720 1721 1722 1723 1724 1725 1726
1727<script src="/assets/currencies.js" type="text/javascript" ></script>
vendor: 1 bytes, line 1727
1727
1728<script src="/assets/jquery.currencies.min.js" type="text/javascript" ></script>
vendor: 1 bytes, line 1728
1728
1729<script src="/assets/currencies_format.js" type="text/javascript" ></script>
1729 1730
1731<script> 1732Currency.format = "money_with_currency_format"; 1733var shopCurrency = 'MYR'; 1734var selectedCurrency = ''; 1735 1736 1737 Currency.convert = function(amount, from, to) { 1738 return amount; 1739 }; 1740 1741 1742if( $.cookie("currency") == null ){ 1743 1744 if( selectedCurrency != false ) { 1745 1746 Currency.convertAll(shopCurrency, selectedCurrency); 1747 jQuery('.selected-currency').text(Currency.currentCurrency); 1748 1749 } 1750 1751} 1752 1753/* Sometimes merchants change their shop currency, let's tell our JavaScript file */ 1754// Currency.moneyFormats[shopCurrency].money_with_currency_format = ""; 1755// Currency.moneyFormats[shopCurrency].money_format = "RM {{amount}} "; 1756 1757/* Default currency */ 1758var defaultCurrency = 'MYR'; 1759 1760/* Cookie currency */ 1761var cookieCurrency = Currency.cookie.read(); 1762 1763 cookieCurrency = shopCurrency; 1764 1765$("input[name=current_currency]").val(cookieCurrency); 1766if(cookieCurrency == null){ 1767 cookieCurrency = shopCurrency; 1768 Currency.cookie.write(shopCurrency); 1769} 1770/* Fix for customer account pages */ 1771jQuery('span.money span.money').each(function() { 1772 jQuery(this).parents('span.money').removeClass('money'); 1773}); 1774/* Saving the current price */ 1775jQuery('span.money').each(function() { 1776 jQuery(this).attr('data-currency-MYR', jQuery(this).html()); 1777}); 1778// If there's no cookie. 1779if (cookieCurrency == null) { 1780 if (shopCurrency !== defaultCurrency) { 1781 Currency.convertAll(shopCurrency, defaultCurrency); 1782 } 1783 else { 1784 Currency.currentCurrency = defaultCurrency; 1785 } 1786} 1787// If the cookie value does not correspond to any value in the currency dropdown. 1788else if (jQuery('[name=currencies]').size() && jQuery('[name=currencies] option[value=' + cookieCurrency + ']').size() === 0) { 1789 Currency.currentCurrency = shopCurrency; 1790 Currency.cookie.write(shopCurrency); 1791} 1792else if (cookieCurrency === shopCurrency) { 1793 Currency.currentCurrency = shopCurrency; 1794 Currency.convertAll(shopCurrency, cookieCurrency); 1795} 1796else { 1797 Currency.convertAll(shopCurrency, cookieCurrency); 1798} 1799jQuery('[name=currencies]').val(Currency.currentCurrency).change(function() { 1800 var newCurrency = jQuery(this).val(); 1801 1802 1803 Currency.cookie.write(newCurrency) 1804 if ('customers' == 'cart') { 1805 const params = new URLSearchParams(window.location.search); 1806 params.set('delete_cache', 1); 1807 window.location.search = params; 1808 } else { 1809 window.location.reload(); 1810 } 1811 1812}); 1813var original_selectCallback = window.selectCallback; 1814var selectCallback = function(variant, selector) { 1815 var currencies = null; 1816 original_selectCallback(variant, selector); 1817 if(typeof jQuery('[name=currencies]').val() == "undefined"){ 1818 currencies = shopCurrency; 1819 } 1820 else{ 1821 currencies = jQuery('[name=currencies]').val(); 1822 } 1823 Currency.convertAll(shopCurrency, currencies); 1824 jQuery('.selected-currency').text(Currency.currentCurrency); 1825}; 1826$('body').on('ajaxCart.afterCartLoad', function(cart) { 1827 Currency.convertAll(shopCurrency, jQuery('[name=currencies]').val()); 1828 jQuery('.selected-currency').text(Currency.currentCurrency); 1829}); 1830jQuery('.selected-currency').text(Currency.currentCurrency); 1831</script>
1831 1832 1833 1834
1834<script> 1835 1836 /* 1837 1838 ------ 1839 Events 1840 ------ 1841 1842 pages/viewed 1843 1844 customers/signup 1845 1846 customers/login 1847 1848 products/searched 1849 1850 collections/viewed 1851 1852 products/viewed 1853 1854 products/shared 1855 1856 wishlists/item_added 1857 1858 carts/items_added 1859 1860 carts/viewed 1861 1862 carts/item_removed 1863 1864 checkouts/initiated 1865 1866 checkouts/shipping_info_added 1867 1868 checkouts/payment_info_added 1869 1870 checkouts/completed 1871 1872 orders/placed 1873 1874 orders/purchased 1875 1876 payments/captured 1877 1878 payments/failed 1879 1880 */ 1881 1882 window.__latest_cart = window.__latest_cart || null; 1883 1884 const _selector = document.querySelector.bind(document), 1885 _selectorAll = document.querySelectorAll.bind(document) 1886 1887 document.addEventListener('DOMContentLoaded', (event) => { 1888 1889 const default_currency = getCookie("currency") 1890 const customer_id = window.__st.cid 1891 const template = window.__st.p 1892 1893 onPageView() 1894 1895 //-----------------------// 1896 // Configs // 1897 //-----------------------// 1898 1899 window.dataLayer = window.dataLayer || [] 1900 1901 Array.prototype.last = Array.prototype.last || function() { 1902 return this[this.length - 1] || null 1903 } 1904 1905 Array.prototype.first = Array.prototype.first || function() { 1906 return this[0] || null 1907 } 1908 1909 //----------------------// 1910 // Triggers // 1911 //----------------------// 1912 1913 const XHR = window.XMLHttpRequest 1914 1915 function xhr() { 1916 1917 const xhr = new XHR() 1918 1919 xhr.addEventListener("readystatechange", function() { 1920 1921 if(xhr.readyState != 4) return 1922 1923 try { 1924 1925 const response_url = xhr.responseURL 1926 1927 if (response_url.includes("cart/add")) { 1928 1929 window.__latest_cart = JSON.parse(xhr.response) 1930 1931 onCartItemsAdded() // ok 1932 1933 } 1934 1935 if (response_url.includes("cart/remove_item_quantity")) { 1936 1937 window.__latest_cart = JSON.parse(xhr.response) 1938 1939 onCartItemRemoved() // ok 1940 1941 } 1942 1943 if (response_url.includes("new_cart?retrieve=true")) { 1944 1945 result = JSON.parse(xhr.response) 1946 1947 if (result.cart) { 1948 window.__latest_cart = result.cart 1949 } 1950 1951 } 1952 1953 } catch(e) { 1954 1955 console.error(e) 1956 1957 } 1958 1959 }, false); 1960 1961 return xhr 1962 1963 } 1964 1965 window.XMLHttpRequest = xhr 1966 1967 switch(template) { 1968 1969 case 'cart': onCartView() // ok 1970 break 1971 case 'product': onProductView() // ok 1972 break 1973 case 'collection': onCollectionView() // ok 1974 break 1975 case 'blog': onBlogView() 1976 break 1977 case 'article': onArticleView() 1978 break 1979 case 'payment_completed': onOrderPlace() 1980 break 1981 case 'payment_fail': onPaymentFail() 1982 break 1983 1984 } 1985 1986 // _selector('form[action="/checkout/payments"]').addEventListener("submit", onPaymentInfoAdded(_selector('form[action="/checkout/payments"]'))) 1987 if (_selector('form[action="/checkout/detail"]')) _selector('form[action="/checkout/detail"]').addEventListener("submit", ()=>{onShippingInfoAdded(_selector('form[action="/checkout/detail"]'))}) // ok 1988 if (_selector('form[action="/checkout/shipping"]')) _selector('form[action="/checkout/shipping"]').addEventListener("submit", ()=>{onShippingInfoAdded(_selector('form[action="/checkout/shipping"]'))}) // ok 1989 if (_selector('form[action="/account/register"]')) _selector('form[action="/account/register"]').addEventListener("submit", onSignUp) // ok 1990 if (_selector('form[action="/account/login"]')) _selector('form[action="/account/login"]').addEventListener("submit", onLogin) // ok 1991 if (_selector('form[action="/search"]')) _selector('form[action="/search"]').addEventListener("submit", onProductSearch()) // ok 1992 if (_selector('#line-login-btn')) _selector('#line-login-btn').addEventListener('click', onLineLogin) // ok 1993 if (_selector('#PlaceOrder')) _selector('#PlaceOrder').addEventListener("click", ()=>{onCheckoutComplete(_selector('form[action="/checkout/payments"]'))}); // ok 1994 if (_selector('#add_wishlist')) _selector('#add_wishlist').addEventListener("click", onWishlistItemAdded) // ok 1995 if (_selectorAll('a[href="/account/logout"]')) _selectorAll('a[href="/account/logout"]').forEach(logoutButton => logoutButton.addEventListener("click", onLogout)) // ok 1996 if (_selector('.CartDrawerTrigger.cart-page-link')) _selector('.CartDrawerTrigger.cart-page-link').addEventListener("click", onCartView) // ok 1997 if (_selector('.CartDrawerTrigger.cart-page-link.mobile-cart-page-link')) _selector('.CartDrawerTrigger.cart-page-link.mobile-cart-page-link').addEventListener("click", onCartView) // ok 1998 if (_selectorAll('a[class^="share-"]')) _selectorAll('a[class^="share-"]').forEach(shareButton => shareButton.addEventListener("click", ()=>{onProductShare(shareButton)}) ) // ok 1999 if (_selectorAll('[name$="checkout"]')) _selectorAll('[name$="checkout"]').forEach(checkoutButton => checkoutButton.addEventListener("click", onCheckoutInitiate)) 2000 2001 // For append elements 2002 const bodyMutationObserver = new MutationObserver(() => { 2003 if (_selector('#form__spc #PlaceOrder')) _selector('#form__spc #PlaceOrder').addEventListener("click", onSinglePageCheckout) // ok 2004 if (_selectorAll('[name$="checkout"]')) _selectorAll('[name$="checkout"]').forEach(checkoutButton => checkoutButton.addEventListener("click", onCheckoutInitiate)) 2005 }); 2006 bodyMutationObserver.observe(_selector("body"), {subtree: true, childList: true}); 2007 2008 //------------------------------// 2009 // Event handlers // 2010 //------------------------------// 2011 2012 function onPageView() { 2013 2014 EasyStore.Event.dispatch('pages/viewed', { 2015 page: { 2016 type: template, 2017 title: document.title, 2018 description: _selector('meta[name=description]') ? _selector('meta[name=description]').getAttribute('content') : null, 2019 url: location.href, 2020 } 2021 }) 2022 2023 } 2024 2025 function onSignUp() { 2026 2027 const email_regex = new RegExp(/^[a-zA-Z0-9.!#$%&"*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/) 2028 const phone_regex = new RegExp(/^(\+?6?01)[0-46-9]-*[0-9]{7,8}$/) 2029 2030 const email_or_phone = _selector(`input[name="customer[email_or_phone]"]`).value.replace("+", "").replace(/\s+/, "") 2031 2032 let data = {} 2033 2034 if (email_regex.test(email_or_phone)) { 2035 data.method = 'email' 2036 data.email = email_or_phone 2037 } 2038 2039 if (phone_regex.test(email_or_phone)) { 2040 data.method = "phone" 2041 data.phone = email_or_phone 2042 } 2043 2044 if (!data.method) return 2045 2046 EasyStore.Event.dispatch('customers/signup', data) 2047 2048 } 2049 2050 function onLogin() { 2051 2052 const email_regex = new RegExp(/^[a-zA-Z0-9.!#$%&"*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/) 2053 const phone_regex = new RegExp(/^(\+?6?01)[0-46-9]-*[0-9]{7,8}$/) 2054 2055 const email_or_phone = _selector(`input[name="customer[email_or_phone]"]`).value.replace("+", "").replace(/\s+/, "") 2056 2057 let data = {} 2058 2059 if (email_regex.test(email_or_phone)) { 2060 data.method = 'email' 2061 data.email = email_or_phone 2062 } 2063 2064 if (phone_regex.test(email_or_phone)) { 2065 data.method = "phone" 2066 data.phone = email_or_phone 2067 } 2068 2069 if (!data.method) return 2070 2071 EasyStore.Event.dispatch('customers/login', data) 2072 2073 } 2074 2075 function onLineLogin() { 2076 2077 EasyStore.Event.dispatch('customers/login', { method: 'line' }) 2078 2079 } 2080 2081 function onLogout() { 2082 2083 EasyStore.Event.dispatch('customers/logout', { customer_id }) 2084 2085 } 2086 2087 function onBlogView() { 2088 2089 const blog = "" 2090 2091 EasyStore.Event.dispatch('blogs/viewed', { blog }) 2092 2093 } 2094 2095 function onArticleView() { 2096 2097 const article = "" 2098 2099 EasyStore.Event.dispatch('articles/viewed', { article }) 2100 2101 } 2102 2103 function onProductSearch() { 2104 2105 const query = _selector('input[name=q]').value 2106 2107 if (!query) return 2108 2109 EasyStore.Event.dispatch('products/searched', { query }) 2110 2111 } 2112 2113 function onCollectionView() { 2114 2115 const collection = "" 2116 2117 EasyStore.Event.dispatch('collections/viewed', { collection }) 2118 2119 } 2120 2121 function onProductView() { 2122 2123 const product = "" 2124 2125 EasyStore.Event.dispatch("products/viewed", { product }) 2126 2127 } 2128 2129 function onProductShare(el) { 2130 2131 const product = "" 2132 2133 const channel = el.getAttribute("class").split("-").last() 2134 2135 EasyStore.Event.dispatch('products/shared', { product, channel }) 2136 2137 } 2138 2139 function onWishlistItemAdded() { 2140 2141 let product = "" 2142 const quantity = _selector("#Quantity").value 2143 2144 EasyStore.Event.dispatch('wishlists/item_added', { product }) 2145 2146 } 2147 2148 async function onCartItemsAdded() { 2149 2150 const cart = await getCart() 2151 2152 if(cart && cart.items != undefined && cart.items.length > 0) { 2153 2154 EasyStore.Event.dispatch('carts/item_added', { cart }) 2155 2156 } 2157 2158 } 2159 2160 async function onCartView() { 2161 2162 const cart = await getCart() 2163 2164 EasyStore.Event.dispatch('carts/viewed', { cart }) 2165 2166 } 2167 2168 async function onCartItemRemoved() { 2169 2170 const cart = await getCart() 2171 2172 cart.items = [] 2173 2174 if(cart) { 2175 2176 EasyStore.Event.dispatch('carts/item_removed', { cart }) 2177 2178 } 2179 2180 } 2181 2182 async function onCheckoutInitiate() { 2183 2184 const cart = await getCart() 2185 2186 EasyStore.Event.dispatch('checkouts/initiated', { cart }) 2187 2188 } 2189 2190 async function onShippingInfoAdded(form) { 2191 let checkout = getCheckout() 2192 2193 let form_data = {} 2194 new FormData(form).forEach((value, key) => form_data[key] = value) 2195 2196 let shipping_tier = null 2197 2198 if (form_data.type && form_data.type.startsWith("r_pickup")) { 2199 shipping_tier = `Pickup - ${form_data.pick_location}` 2200 } 2201 2202 if (form_data.s_id) {
2203 shipping_tier = _selector(`input[id='`+form_data.s_id+`']`).getAttribute("data-shipping-name") 2204 } 2205 2206 if (!shipping_tier) return 2207 2208 EasyStore.Event.dispatch('checkouts/shipping_info_added', { checkout, shipping_tier }) 2209 2210 } 2211 2212 async function onPaymentInfoAdded(form) { 2213 2214 let checkout = getCheckout() 2215 2216 let payment_type = new FormData(form).get('payment_method') 2217 2218 EasyStore.Event.dispatch("checkouts/payment_info_added", { checkout, payment_type }) 2219 2220 } 2221 2222 async function onOrderPlace() { 2223 2224 let cart_token = getCookie("cart_js") 2225 let previous_cart_token = getCookie("previous_cart_ga4_js") 2226 2227 if (previous_cart_token && previous_cart_token == cart_token) { 2228 // Prevent duplicate purchase tracking 2229 return 2230 } 2231 2232 let order = getOrder() 2233 2234 EasyStore.Event.dispatch('orders/placed', { order }) 2235 2236 if(order.is_manual_payment) { 2237 2238 EasyStore.Event.dispatch('orders/purchased', { order }) 2239 2240 } 2241 2242 const last_transaction = order.transactions.last() 2243 2244 if (last_transaction.status) { 2245 2246 EasyStore.Event.dispatch('orders/purchased', { order }) 2247 EasyStore.Event.dispatch('payments/captured', { order }) 2248 2249 } 2250 2251 } 2252 2253 async function onPaymentFail() { 2254 2255 const order = getOrder() 2256 2257 EasyStore.Event.dispatch('payments/failed', { order }) 2258 2259 } 2260 2261 async function onCheckoutComplete(form) { 2262 2263 onPaymentInfoAdded(form) 2264 2265 const checkout = getCheckout() 2266 2267 EasyStore.Event.dispatch('checkouts/completed', { checkout }) 2268 2269 } 2270 2271 async function onSinglePageCheckout() { 2272 2273 // let checkout = $("[data-app-checkout]").data("app-checkout") 2274 2275 let checkout = getCheckout() 2276 2277 // const payment_type = _selector("#app_spc_payment_method").find(`[class*="label-content"]`).first().find("b").first().text() 2278 const payment_type = _selector("#app_spc_payment_method").getElementsByClassName('label-content')[0].getElementsByTagName('b')[0].innerHTML 2279 2280 const shipping_method = _selector("#delivery_method").value 2281 2282 let shipping_tier = null 2283 let app_spc_customer_info_label = _selector("#app_spc_customer_info").getElementsByClassName('label-content') 2284 if (shipping_method == "shipping") { 2285 shipping_tier = app_spc_customer_info_label[app_spc_customer_info_label.length - 1].getElementsByTagName('b')[0].innerHTML 2286 } 2287 2288 if (shipping_method == "pickup") { 2289 shipping_tier = app_spc_customer_info_label[0].innerHTML 2290 } 2291 2292 if (shipping_tier) { 2293 2294 EasyStore.Event.dispatch('checkouts/shipping_info_added', { 2295 checkout, 2296 shipping_tier, 2297 }) 2298 2299 } 2300 2301 if (payment_type) { 2302 2303 EasyStore.Event.dispatch('checkouts/payment_info_added', { 2304 checkout, 2305 payment_type, 2306 }) 2307 2308 } 2309 2310 EasyStore.Event.dispatch('checkouts/completed', { checkout }) 2311 2312 } 2313 2314 }) 2315 2316 2317 //-----------------------// 2318 // Functions // 2319 //-----------------------// 2320 2321 function getCookie(name) { 2322 2323 name += "=" 2324 2325 decodedCookie = decodeURIComponent(document.cookie) 2326 2327 ca = decodedCookie.split(";") 2328 2329 for(i = 0; i < ca.length; i++) { 2330 c = ca[i] 2331 while (c.charAt(0) == " ") { 2332 c = c.substring(1) 2333 } 2334 if (c.indexOf(name) == 0) { 2335 return c.substring(name.length, c.length) 2336 } 2337 } 2338 2339 return "" 2340 2341 } 2342 2343 const parsePrice = price => { 2344 if(typeof price === 'string') { 2345 return parseFloat(price.split(',').join('')) 2346 } 2347 2348 return price 2349 } 2350 2351 const requestCart = async (method, data) => { 2352 2353 let response = await fetch('/cart.json', {method: 'GET',headers: {'Content-Type': 'application/json'}}) 2354 result = await response.json() 2355 2356 return result.cart 2357 2358 } 2359 const getCart = async (latest = false) => { 2360 2361 let cart = window.__latest_cart 2362 2363 const cart_invalid = !cart || !cart.items || (cart.total_price > 0 && !cart.items.length) 2364 2365 if(latest || cart_invalid) { 2366 cart = await requestCart() 2367 } 2368 2369 cart.items = cart.items || [] 2370 2371 return mapCart(cart) 2372 2373 } 2374 2375 const getCheckout = async () => { 2376 mapCheckout(window.__latest_cart || await requestCart()) 2377 } 2378 2379 const getOrder = async () => { 2380 mapOrder(window.__latest_cart || await requestCart()) 2381 } 2382 2383 //-----------------------// 2384 // Mappers // 2385 //-----------------------// 2386 2387 const fallbackAttribute = (object, attribute) => { 2388 2389 if(!Array.isArray(attribute)) { 2390 attribute = [attribute] 2391 } 2392 2393 let final_value = null 2394 2395 do { 2396 2397 final_value = object[attribute.shift()] 2398 2399 } while(!final_value && attribute.length) 2400 2401 return final_value 2402 2403 } 2404 2405 const map = (object, mapper) => { 2406 2407 const newObject = {} 2408 2409 for(const key in mapper) { 2410 2411 // Handle different keys between new and old format
2412 newObject[key] = fallbackAttribute(object, mapper[key]) 2413 2414 // Cast price to float 2415 if(newObject[key] && ['price', 'amount', 'discount', 'discounts'].some(x => key.endsWith(x))) { 2416 newObject[key] = parsePrice(newObject[key]) 2417 } 2418 2419 if(newObject[key] === undefined) { 2420 delete newObject[key] 2421 } 2422 2423 } 2424 2425 return newObject 2426 2427 } 2428 2429 const mapCart = cart => { 2430 2431 const oldCart = cart 2432 2433 const mapper = { 2434 id: 'id', 2435 currency: 'currency', 2436 item_count: 'item_count', 2437 items: 'items', 2438 total_price: 'total_price', 2439 latest_items: 'latest_items' 2440 } 2441 2442 cart = map(cart, mapper) 2443 2444 const discounts = (oldCart.storewide_discounts || []).concat((oldCart.voucher_discounts || [])) 2445 2446 cart.discount_applications = discounts.map(discount => ({ 2447 title: discount.voucher_code || null, 2448 value: parsePrice(discount.amount), 2449 })) 2450 2451 cart.original_total_price = cart.items.length 2452 ? cart.items 2453 .map(item => item.original_price) 2454 .reduce((sum, price) => sum + price) 2455 : 0 2456 2457 cart.total_discount = cart.discount_applications.length 2458 ? cart.discount_applications 2459 .map(discount => parsePrice(discount.value)) 2460 .reduce((sum, value) => sum + value) 2461 : 0 2462 2463 cart.items = cart.items.map(item => mapLineItem(item)) 2464 2465 return cart 2466 2467 } 2468 2469 const mapCheckout = checkout => { 2470 2471 const mapper = { 2472 note: 'note', 2473 attributes: 'note_attributes', 2474 billing_address: 'billing_address', 2475 currency: 'currency', 2476 customer_id: 'customer_id', 2477 discounts_amount: 'total_discount', 2478 id: 'id', 2479 line_items: 'order_item', 2480 order_number: 'order_number', 2481 shipping_address: 'shipping_address', 2482 shipping_price: 'shipping_tax', 2483 shipping_method: 'shipping_method_name', 2484 tax_price: 'total_tax', 2485 } 2486 2487 checkout = map(checkout, mapper) 2488 2489 checkout.requires_shipping = checkout.line_items.some(item => item.shipping_required) 2490 2491 checkout.line_items = checkout.line_items.map(item => mapLineItem(item)) 2492 2493 return checkout 2494 2495 } 2496 2497 const mapOrder = order => { 2498 2499 const mapper = { 2500 attributes: 'note_attributes', 2501 billing_address: 'billing_address', 2502 cancelled: 'is_cancelled', 2503 cancelled_at: 'cancelled_at', 2504 created_at: 'created_at', 2505 customer_id: 'customer_id', 2506 // discount_applications: 'discount_applications', 2507 email: 'email', 2508 financial_status: 'financial_status', 2509 fulfillment_status: 'fulfillment_status', 2510 line_items: 'order_item', 2511 note: 'note', 2512 order_number: 'order_number', 2513 phone: 'phone', 2514 shipping_address: 'shipping_address', 2515 shipping_methods: 'shipping_methods', 2516 shipping_price: 'total_shipping', 2517 subtotal_price: 'subtotal_price', 2518 // tax_lines: 'tax_lines', 2519 tax_price: 'total_tax', 2520 total_discounts: 'total_discount', 2521 total_net_amount: 'total_amount_include_transaction', 2522 total_price: 'total_price', 2523 transactions: 'transaction_records', 2524 is_manual_payment: 'is_manual_payment', 2525 } 2526 2527 order.email = order.billing_address.email 2528 order.phone = order.billing_address.phone 2529 order.shipping_method = order.shipping_method_name 2530 2531 order = map(order, mapper) 2532 2533 order.line_items = order.line_items.map(item => mapLineItem(item)) 2534 order.transactions = order.transactions.map(transaction => mapTransaction(transaction)) 2535 2536 return order 2537 2538 } 2539 2540 const mapLineItem = line_item => { 2541 2542 const old_line_item = line_item 2543 2544 const mapper = { 2545 final_price: 'price', 2546 image: 'img_url', 2547 message: 'message', 2548 original_line_price: 'original_line_price', 2549 original_price: 'original_price', 2550 properties: 'properties', 2551 quantity: 'quantity', 2552 requires_shipping: 'shipping_required', 2553 sku: 'sku', 2554 taxable: 'taxable', 2555 title: 'product_name', 2556 product_name: 'product_name', 2557 url: 'url', 2558 product_id: 'product_id', 2559 variant_id: 'variant_id', 2560 id: ['id', 'i_id'], 2561 } 2562 2563 line_item = map(line_item, mapper) 2564 2565 line_item.product_id = line_item.product_id || (old_line_item.product && old_line_item.product.id) || null 2566 line_item.variant_id = line_item.variant_id || (old_line_item.variant && old_line_item.variant.id) || null 2567 line_item.image = line_item.image || (old_line_item.image && old_line_item.image.url) || null 2568 2569 return line_item 2570 2571 } 2572 2573 const mapTransaction = transaction => { 2574 2575 const mapper = { 2576 amount: 'amount', 2577 created_at: 'created_at', 2578 gateway: 'gateway_type', 2579 id: 'id', 2580 status: 'status', 2581 } 2582 2583 transaction = map(transaction, mapper) 2584 2585 return transaction 2586 2587 } 2588 2589 2590</script>
2590 2591 2592</div> 2593 2594 2595 <div id="CartDrawer" class="cart-drawer" data-fetch="0"> 2596 2597 2598 <div class="cart-drawer-wrapper"> 2599 <div id="cart-promotion-top"></div> 2600 2601 2602 <div id="CartTemplate"> 2603 2604 2605 2606 2607 <div id="noCartItem" class="cart-drawer-content"> 2608 <div class="cart-drawer-content-wrapper text-center"> 2609 <div class="section-header"> 2610 <span></span> 2611 <span class="CartDrawerTrigger icon icon-x"></span> 2612 </div> 2613 <div class="section-header__title h2">Your cart is currently empty.</div> 2614 <a class="btn btn--secondary" href="/collections/all">Continue shopping</a> 2615 </div> 2616 </div> 2617 2618 2619 2620 2621 </div> 2622 2623 <link href="/assets/css/promotion.css?v2.94" rel="stylesheet" type="text/css" media="screen" /> 2624<div id="cart-promotion-section"></div> 2625
2626<script>var shop_money_format = "<span class=money data-ori-price='{{amount}}'>RM {{amount}} </span>";</script>
vendor: 1 bytes, line 2626
2626
2627<script src="/assets/js/promotion/promotion.js?v1.11" type="text/javascript"></script>
2627 2628
2629<script> 2630 2631 window.EasyStore = window.EasyStore || {}; 2632 window.EasyStore.Promotion = window.EasyStore.Promotion || {}; 2633 2634 var get_cart_promo_initial = false, 2635 current_template = 'customers'; 2636 2637 window.EasyStore.Promotion.updateCartPromotion = function (){ 2638 get_cart_promo_initial = true 2639 $.ajax({ 2640 type: "GET", 2641 dataType: 'json', 2642 url: "/new_cart/promotion", 2643 success: function(response){ 2644 $("#cart-promotion-section").html(response["cart/content_bottom"].trim()); 2645 $("#cart-promotion-top").html(response["cart/content_top"].trim()); 2646 2647 promoVariantDetailInitial() 2648 }, 2649 error: function(xhr){ 2650 } 2651 }); 2652 } 2653 2654 2655 if(current_template == 'cart') { 2656 document.addEventListener("DOMContentLoaded", function() { 2657 window.EasyStore.Promotion.updateCartPromotion() 2658 }); 2659 } 2660 2661</script>
vendor: 1 bytes, line 2661
2661
2662<script> 2663 document.addEventListener('DOMContentLoaded', function () { 2664 window._getVoucherErrorTranslation = Object.assign(window._getVoucherErrorTranslation || {}, { 2665 "condition_not_matched": "Voucher condition not matched", 2666 "promotion_unavailable": "This promotion is currently unavailable", 2667 "available_on": "Available on channels", 2668 "available_on_only": "Available on channels only", 2669 "available_with_locations": "Available on channels (locations only)", 2670 "pos_at_locations": "Retail Store at locations only", 2671 "channel_website": "Website", 2672 "channel_mobile": "Mobile Apps", 2673 "channel_pos": "Retail Store" 2674 }); 2675 }); 2676</script>
2676 2677 2678 </div> 2679 2680 2681 2682</div> 2683 2684<div id="toast"><div id="toastContent"></div></div> 2685<style> 2686 .cart-drawer .cart-drawer-content .cart-sticky-button-wrapper a.btn.CartDrawerTrigger{margin-bottom: 10px !important;} 2687 #toastContent a{color: #fff;text-decoration: underline;margin-top: 10px;display: block;} 2688 #toastContent .svg-icon{margin-right: 8px;margin-top: -1px;} 2689</style> 2690
2691<script type="text/javascript"> 2692 $('body').on("submit", "#CartForm", function() { 2693 $(this).find('[type=submit]').addClass('btn--loading'); 2694 }); 2695 2696 $("input[name=current_currency]").val($( "select.currency-picker" ).val()); 2697 $( "select.currency-picker" ).change(function(){ 2698 $("select.currency-picker").val($(this).val()); 2699 url=window.location.href; 2700 newParam="currency=" + $( "select.currency-picker" ).val(); 2701 if(url.indexOf("currency=")===-1){ 2702 separator = (url.indexOf("?")===-1)?"?":"&"; 2703 newUrl= url + separator + newParam; 2704 }else{ 2705 oldParam= new URL(url); 2706 oldParam = oldParam.searchParams.get("currency"); 2707 newParam= $(this).val(); 2708 newUrl=url.replace(oldParam,newParam); 2709 } 2710 $("input[name=current_currency]").val($( "select.currency-picker" ).val()); 2711 // window.location.href =newUrl; 2712 $('#CartDrawer').attr('data-fetch', 0); 2713 }); 2714 2715 $("body").on("click", ".cart__remove", function() { 2716 $('#CartTemplate').addClass('is-loading'); 2717 $.ajax({ 2718 type: 'POST', 2719 url: '/cart/remove_item_quantity', 2720 data: { 2721 variant_id: $(this).data( "variant-id"), 2722 item_id: $(this).data( "item-id"), 2723 quantity: $(this).data( "quantity"), 2724 i_id: $(this).data("i_id"), 2725 }, 2726 dataType: 'json', 2727 success: function(response){ 2728 2729 theme.cartDrawer(response); 2730 $('#CartTemplate').removeClass('is-loading'); 2731 2732 if (window.checkProductProperties !== undefined){ 2733 window.checkProductProperties(); 2734 } 2735 }, 2736 error: function(xhr){ 2737 console.log('error',xhr); 2738 $('#CartTemplate').removeClass('is-loading'); 2739 } 2740 }); 2741 2742 }); 2743 2744 2745 $('body').on("click", "#applycode",function() { 2746 2747 if($("input[name='voucher_code']").val() != '') { 2748 2749 $('#CartTemplate').addClass('is-loading'); 2750 2751 $.ajax({ 2752 type: 'POST', 2753 url: '/new_cart/voucher', 2754 data: { 2755 voucher_code: $("input[name='voucher_code']").val(), 2756 category: 'create' 2757 }, 2758 dataType: 'json', 2759 success: function(response){ 2760 2761 // console.log(response); 2762 2763 if(response.error != undefined){ 2764 2765 if(response.error.message != undefined) popToast(response.error.message); 2766 2767 $("input[name='voucher_code']").val('') 2768 2769 } 2770 2771 if(response.cart_content != undefined) theme.cartDrawer(response); 2772 2773 $('#CartTemplate').removeClass('is-loading'); 2774 2775 }, 2776 error: function(xhr){ 2777 console.log('error',xhr); 2778 $('#CartTemplate').removeClass('is-loading'); 2779 } 2780 }); 2781 2782 } 2783 2784 }); 2785 2786 2787 $("body").on("click", ".remove_voucher_btn", function() { 2788 $('#CartTemplate').addClass('is-loading'); 2789 $.ajax({ 2790 type: 'DELETE', 2791 url: '/new_cart/voucher', 2792 data: { 2793 category: 'remove', 2794 order_discount_id: $(this).data( "discount-id") 2795 }, 2796 dataType: 'json', 2797 success: function(data){ 2798 // console.log(data); 2799 theme.cartDrawer(data); 2800 $('#CartTemplate').removeClass('is-loading'); 2801 }, 2802 error: function(xhr){ 2803 console.log('error',xhr); 2804 $('#CartTemplate').removeClass('is-loading'); 2805 } 2806 }); 2807 2808 }); 2809 2810 2811 theme.cartDrawer = function(data){ 2812 2813 $('#CartDrawer').attr('data-fetch', 1); 2814 $('#CartTemplate').addClass('is-loading'); 2815 2816 2817 if(typeof data.cart_content == 'string'){ 2818 $('#CartTemplate').html(data.cart_content); 2819 } 2820 2821 let cart_item_count = data.item_count || data.cart.item_count; 2822 2823 if(cart_item_count > 0){ 2824 $('.cart-count').removeClass('hidden-count'); 2825 }else{ 2826 $('.cart-count').addClass('hidden-count'); 2827 } 2828 2829 $('.cart-count').text(cart_item_count); 2830 $('#CartTemplate').removeClass('is-loading'); 2831 $(".cart-drawer-content").animate({ scrollTop: 0 }); 2832 2833 if(window.EasyStore != undefined && window.EasyStore.Promotion != undefined && window.EasyStore.Promotion.updateCartPromotion != undefined) window.EasyStore.Promotion.updateCartPromotion() 2834 2835 } 2836 2837 2838 theme.fetchCartDrawer = function(data){ 2839 $('#CartTemplate').addClass('is-loading'); 2840 $.ajax({ 2841 url: '/new_cart?retrieve=true', 2842 type: 'GET', 2843 success: function(data, status) { 2844 // console.log(data); 2845 theme.cartDrawer(data); 2846 2847 $('#CartTemplate').removeClass('is-loading'); 2848 2849 if (window.checkProductProperties !== undefined){ 2850 window.checkProductProperties(); 2851 } 2852 }, 2853 error: function(XMLHttpRequest, textStatus) { 2854 console.log('error',XMLHttpRequest,textStatus); 2855 $('#CartTemplate').removeClass('is-loading'); 2856 } 2857 }); 2858 } 2859 2860 theme.updateCartDrawer = function(data){ 2861 $('#CartTemplate').addClass('is-loading'); 2862 2863 $.ajax({ 2864 url: '/new_cart/update', 2865 type: 'PUT', 2866 dataType: 'json', 2867 data: $('#CartDrawer form').serialize(), 2868 success: function(data, status) { 2869 theme.cartDrawer(data); 2870 2871 if (window.checkProductProperties !== undefined){ 2872 window.checkProductProperties(); 2873 } 2874 }, 2875 error: function(XMLHttpRequest, textStatus) { 2876 console.log('error',XMLHttpRequest,textStatus); 2877 } 2878 }); 2879 } 2880 2881 function debounce(func, wait, immediate) { 2882 var timeout; 2883 return function() { 2884 var context = this, args = arguments; 2885 var later = function() { 2886 timeout = null;
2887 if (!immediate) func.apply(context, args); 2888 }; 2889 var callNow = immediate && !timeout; 2890 clearTimeout(timeout); 2891 timeout = setTimeout(later, wait); 2892 if (callNow) func.apply(context, args); 2893 }; 2894 }; 2895 2896 $('body').on("change", 'input.cart__quantity-selector', function (){ 2897 theme.updateCartDrawer(); 2898 }); 2899 2900 2901 $('#updateCartDrawer').click(function() { 2902 theme.updateCartDrawer(); 2903 }); 2904 2905 $('body').on("click", ".btn-qty-adjust", function() { 2906 2907 var $button = $(this); 2908 var oldValue = $button.parent().find("input.cart__quantity-selector").val(); 2909 2910 if ($button.attr('data-adjust') == 1) { 2911 var newVal = parseFloat(oldValue) + 1; 2912 } else { 2913 // Don't allow decrementing below zero 2914 if (oldValue > 0) { 2915 var newVal = parseFloat(oldValue) - 1; 2916 } else { 2917 newVal = 0; 2918 } 2919 } 2920 2921 $button.parent().find("input").val(newVal); 2922 }); 2923 2924 $('body').on("click", ".btn-qty-adjust", debounce(function() { 2925 theme.updateCartDrawer(); 2926 },350)); 2927 2928 $('button.checkout').click(function() { 2929 $(this).addClass('btn--loading'); 2930 }); 2931 2932 var add_cart_success_html = '<svg class="svg-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> <g> <g> <path d="M383.841,171.838c-7.881-8.31-21.02-8.676-29.343-0.775L221.987,296.732l-63.204-64.893 c-8.005-8.213-21.13-8.393-29.35-0.387c-8.213,7.998-8.386,21.137-0.388,29.35l77.492,79.561 c4.061,4.172,9.458,6.275,14.869,6.275c5.134,0,10.268-1.896,14.288-5.694l147.373-139.762 C391.383,193.294,391.735,180.155,383.841,171.838z"/> </g> </g> <g> <g> <path d="M256,0C114.84,0,0,114.84,0,256s114.84,256,256,256s256-114.84,256-256S397.16,0,256,0z M256,470.487 c-118.265,0-214.487-96.214-214.487-214.487c0-118.265,96.221-214.487,214.487-214.487c118.272,0,214.487,96.221,214.487,214.487 C470.487,374.272,374.272,470.487,256,470.487z"/> </g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> </svg>'; 2933 add_cart_success_html += 'Added to cart <br><a class="CartDrawerTrigger">View cart</a>'; 2934 2935 function popToast(content) { 2936 var x = document.getElementById("toast"), 2937 y = document.getElementById("toastContent"); 2938 2939 y.innerHTML = content; 2940 x.className += " show"; 2941 2942 var hideToast = setTimeout(function(){ x.className = x.className.replace(" show", ""); }, 3000); 2943 } 2944 2945 2946</script>
2946 2947 2948<style> 2949 vouchers-modal .vouchers-modal.active , 2950 vouchers-modal #vouchers-modal-backdrop.active{ 2951 z-index: 2147483647; 2952 } 2953</style> 2954 2955<link href="/assets/css/vouchers.css?v1.2" rel="stylesheet" type="text/css" media="screen" /> 2956<link href="/assets/account/vouchers/vouchers.css" rel="stylesheet" type="text/css" media="screen" /> 2957<link href="/assets/account/vouchers/voucher-widget.css" rel="stylesheet" type="text/css" media="screen" />
2958<script src="/assets/js/promotion/vouchers.js?v1.3" type="text/javascript" ></script>
vendor: 1 bytes, line 2958
2958
2959<script src="/assets/account/vouchers/voucher-widget.js" type="text/javascript" ></script>
2959 2960 2961<vouchers-modal> 2962 <div id="vouchers-modal-backdrop" class="vouchers-modal__close"></div> 2963 <div class="vouchers-modal-wrapper page-width"> 2964 <div id="vouchers-modal" class="vouchers-modal focus-inset" aria-modal="true" role="dialog" tabindex="-1"> 2965 <div class="vouchers-modal__header"> 2966 <div class="vouchers-modal__heading">Vouchers</div> 2967 <button type="button" class="vouchers-modal__close modal__close-button link link--text focus-inset" aria-label="accessibility.close"> 2968 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" role="presentation" class="icon icon-close " fill="none" viewBox="0 0 18 17"> 2969 <path d="M.865 15.978a.5.5 0 00.707.707l7.433-7.431 7.579 7.282a.501.501 0 00.846-.37.5.5 0 00-.153-.351L9.712 8.546l7.417-7.416a.5.5 0 10-.707-.708L8.991 7.853 1.413.573a.5.5 0 10-.693.72l7.563 7.268-7.418 7.417z" fill="currentColor"> 2970 </path> 2971 </svg> 2972 </button> 2973 </div> 2974 2975 <discount-input> 2976 <div class="field"> 2977 <input type="text" id="input-discount_code" class="search__input field__input" name="voucher_code" placeholder="Discount code"> 2978 <button type="button" name="apply" class="btn btn--secondary button button--secondary">Apply</button> 2979 </div> 2980 <div class="form__message hidden" tabindex="-1" autofocus> 2981 <svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-error " viewBox="0 0 13 13"> 2982 <circle cx="6.5" cy="6.50049" r="5.5" stroke="white" stroke-width="2"></circle> 2983 <circle cx="6.5" cy="6.5" r="5.5" fill="#EB001B" stroke="#EB001B" stroke-width="0.7"></circle> 2984 <path d="M5.87413 3.52832L5.97439 7.57216H7.02713L7.12739 3.52832H5.87413ZM6.50076 9.66091C6.88091 9.66091 7.18169 9.37267 7.18169 9.00504C7.18169 8.63742 6.88091 8.34917 6.50076 8.34917C6.12061 8.34917 5.81982 8.63742 5.81982 9.00504C5.81982 9.37267 6.12061 9.66091 6.50076 9.66091Z" fill="white"></path> 2985 <path d="M5.87413 3.17832H5.51535L5.52424 3.537L5.6245 7.58083L5.63296 7.92216H5.97439H7.02713H7.36856L7.37702 7.58083L7.47728 3.537L7.48617 3.17832H7.12739H5.87413ZM6.50076 10.0109C7.06121 10.0109 7.5317 9.57872 7.5317 9.00504C7.5317 8.43137 7.06121 7.99918 6.50076 7.99918C5.94031 7.99918 5.46982 8.43137 5.46982 9.00504C5.46982 9.57872 5.94031 10.0109 6.50076 10.0109Z" fill="white" stroke="#EB001B" stroke-width="0.7"></path> 2986 </svg> 2987 <div class="js-error-content"></div> 2988 </div> 2989 </discount-input> 2990 <br> 2991 2992 2993 2994 <div class="empty-vouchers_placeholder">No available vouchers</div> 2995 2996 2997 <!-- For voucher widget --> 2998
2998<script type="text/javascript"> 2999 let settings = {"logo_use_image":"1","logo_img":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/4829734.png?width=350&format=webp","footer_logo_img":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/14326839.png?width=350&format=webp","nav_below_logo":"","logo_alignment":"center","left_aligned_logo":"0","favicon_enable":"1","favicon_img":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/4829761.png","header_message":"","header_search_enable":true,"topbar_sticky":"1","footer_quicklinks_enable":true,"footer_quicklinks_linklist":"footer","footer_social_enable":"1","footer_show_credit_card_logo":0,"footer_show_methods_of_payment":0,"footer_visa":0,"footer_master":0,"footer_american_express":0,"footer_jcb":0,"footer_diners_club":0,"footer_discover":0,"footer_ssl":0,"show_footer_lines":"1","home_section_1":"img-text-section","home_section_2":"highlight-section","home_section_3":"","home_section_4":"","home_section_5":"","home_section_6":"","home_section_7":"","featured_title":"","featured_1_img":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/4871780.jpeg?width=650&format=webp","featured_1_text":"","featured_1_link_text":"View More","featured_1_link":"\/collections\/top-picks","featured_2_img":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/4871915.jpeg?width=650&format=webp","featured_2_text":"","featured_2_link_text":"View more","featured_2_link":"\/collections\/sweets","featured_3_img":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/4871918.jpeg?width=650&format=webp","featured_3_text":"","featured_3_link_text":"View more","featured_3_link":"\/collections\/savouries","featured_4_img":"","featured_4_text":"STYLE","featured_4_link_text":"STYLE","featured_4_link":"\/collections\/style","featured_5_img":"","featured_5_text":"","featured_5_link_text":"","featured_5_link":"","featured_6_img":"","featured_6_text":"","featured_6_link_text":"","featured_6_link":"","featured_7_img":"","featured_7_text":"","featured_7_link_text":"","featured_7_link":"","featured_8_img":"","featured_8_text":"","featured_8_link_text":"","featured_8_link":"","parallax_img":"https:\/\/cdn.store-assets.com\/s\/326197\/f\/4479426.jpeg?width=1500&format=webp","parallax_mobile_img":"","parallax_title":"Sign Up for 50% OFF","parallax_subtitle":"For new member only","parallax_button_text":"Sign Up Now","parallax_button_link":"\/account\/register","parallax_full_width":"1","slider_home_auto":"1","slider_home_show_dots":"1","slider_home_rate":"4000","slider_home_transition":"slide","slider_full_screen":"0","slide_1":"1","slide_1_jpg":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/4867346.jpeg?width=1500&format=webp","slide_1_mobile_jpg":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/4867347.jpeg?width=900&format=webp","slide_1_link":"\/collections\/all","slide_1_alt":"","slide_1_title":"NYONYA KUIH","slide_1_subtitle":"","slide_1_button_text":"SHOP NOW","slide_2":"1","slide_2_jpg":"","slide_2_mobile_jpg":"","slide_2_link":"","slide_2_alt":"","slide_2_title":"","slide_2_subtitle":"","slide_2_button_text":"","slide_3":"","slide_3_jpg":"","slide_3_mobile_jpg":"","slide_3_link":"","slide_3_alt":"","slide_3_title":"","slide_3_subtitle":"","slide_3_button_text":"","slide_4":"","slide_4_jpg":"","slide_4_mobile_jpg":"","slide_4_link":"","slide_4_alt":"","slide_4_title":"","slide_4_subtitle":"","slide_4_button_text":"","slide_5":"","slide_5_jpg":"","slide_5_mobile_jpg":"","slide_5_link":"","slide_5_alt":"","slide_5_title":"","slide_5_subtitle":"","slide_5_button_text":"","slide_6":"","slide_6_jpg":"","slide_6_mobile_jpg":"","slide_6_link":"","slide_6_alt":"","slide_6_title":"","slide_6_subtitle":"","slide_6_button_text":"","testimonial_slide_img_crop":0,"testimonial_slide_1_img":"https:\/\/cdn.store-assets.com\/s\/278885\/f\/3915980.jpeg?width=1500&format=webp","testimonial_slide_1_title":"Aleksejs Bergmanis","testimonial_slide_1_content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non mattis dui, sit amet hendrerit nibh. Duis congue volutpat urna ut accumsan.","testimonial_slide_1_text_link":"Read more","testimonial_slide_
29991_link":"#","testimonial_slide_2_img":"https:\/\/cdn.store-assets.com\/s\/278885\/f\/3915981.jpeg?width=1500&format=webp","testimonial_slide_2_title":"Thiago Japyassu","testimonial_slide_2_content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non mattis dui, sit amet hendrerit nibh. Duis congue volutpat urna ut accumsan. Vivam mauris augue, ultrices at faucibus vitae, mattis eu lacus.","testimonial_slide_2_text_link":"Read more","testimonial_slide_2_link":"#","testimonial_slide_3_img":"","testimonial_slide_3_title":"","testimonial_slide_3_content":"","testimonial_slide_3_text_link":"","testimonial_slide_3_link":"","testimonial_slide_4_img":"","testimonial_slide_4_title":"","testimonial_slide_4_content":"","testimonial_slide_4_text_link":"","testimonial_slide_4_link":"","testimonial_slide_5_img":"","testimonial_slide_5_title":"","testimonial_slide_5_content":"","testimonial_slide_5_text_link":"","testimonial_slide_5_link":"","testimonial_slide_6_img":"","testimonial_slide_6_title":"","testimonial_slide_6_content":"","testimonial_slide_6_text_link":"","testimonial_slide_6_link":"","logo_list_on_footer":"1","logo_list_title":"","logo_list_1_img":"https:\/\/cdn.store-assets.com\/s\/360437\/f\/14326811.jpg?width=350&format=webp","logo_list_1_link":"\/collections\/all","logo_list_2_img":"","logo_list_2_link":"\/collections\/all","logo_list_3_img":"","logo_list_3_link":"\/collections\/all","logo_list_4_img":"","logo_list_4_link":"\/collections\/all","logo_list_5_img":"","logo_list_5_link":"\/collections\/all","logo_list_6_img":"","logo_list_6_link":"\/collections\/all","logo_list_7_img":"","logo_list_7_link":"\/collections\/all","logo_list_8_img":"","logo_list_8_link":"\/collections\/all","home_featured_products":"feature-on-homepage","home_featured_products_num":"20","home_featured_products_row_num":"7","home_featured_products_show_heading":"","home_page_content":"home","home_page_show_heading":"0","home_page_add_to_cart":"1","scroll_to_top_button":"on-left","product_quantity_enable":"1","product_image_zoom_type":"lightbox","product_thumbnails_position":"below","product_related_enable":true,"products_per_row":4,"products_list_per_row":"3","collection_products_list_per_row":"3","product_page_float_btn":"1","product_page_variants_tag":"1","featured_product_title":"Top picks","product_img_res":"grande","product_img_crop":"product_img-crop ratio_1-1","collections_show_sale_circle":"1","collections_show_sold_out_circle":"1","collections_sort_enable":true,"collections_tags_enable":"0","collections_products_per_row":"3","collections_rows":"6","footer_bar":0,"footer_bar_icon_product_page":"1","footer_bar_icon_1":"https:\/\/cdn.easystore.blue\/s\/201\/f\/5590.png?width=150&format=webp","footer_bar_icon_1_text":"Home","footer_bar_icon_1_link":"\/","footer_bar_icon_2":"https:\/\/cdn.easystore.blue\/s\/201\/f\/5591.png?width=150&format=webp","footer_bar_icon_2_text":"All products","footer_bar_icon_2_link":"\/collections\/all","footer_bar_icon_3":"https:\/\/cdn.easystore.blue\/s\/201\/f\/5592.png?width=150&format=webp","footer_bar_icon_3_text":"Promotions","footer_bar_icon_3_link":"\/collections\/all","footer_bar_icon_4":"https:\/\/cdn.easystore.blue\/s\/201\/f\/5593.png?width=150&format=webp","footer_bar_icon_4_text":"Account","footer_bar_icon_4_link":"\/account\/login","cart_enable_ajax":"1","social_sharing_products":"1","social_sharing_blog":"1","social_sharing_count":"1","share_facebook":"1","share_twitter":"1","share_line":"1","share_pinterest":"1","facebook_url":"https:\/\/www.facebook.com\/madamyongdelight","twitter_url":"","pinterest_url":"","instagram_url":"https:\/\/instagram.com\/madamyongdelight","tumblr_url":"","youtube_url":"","vimeo_url":"","wechat_url":"","whatsapp_url":"https:\/\/wa.me\/60122381396","line_url":"","featured_blog":"","featured_blog_title":"Blog Post","articles_handle_1":"","articles_handle_2":"","articles_handle_3":"","video_section_id":"","video_section_img":"https:\/\/cdn.store-assets.com\/s\/326197\/f\/4480409.jpeg?width=1500&format=webp","img_text_section_img":"","img_text_section_heading":"About Us","img_text_section_text":"We are a family run business that has been producing Nyonya Kuih since 1985 (for over 35 years!). We take pride in being regarded as one of the leading suppliers of Nyonya Kuih in the Klang Valley. Here, we aim to bring our delicacies closer to you with the option of delivery right to your door step in just a few clicks. Order from us today to savor our Nyonya Kuih!","img_text_section_link_text":"","img_text_section_url":"\/collections\/all","img_text_section_class":"image-right","lazy_loader":"1","featured_single_product_handle":"","placeholder":{"featured-single-product":"https:\/\/s3-ap-southeast-1.amazonaws.com\/eesb.themes\/onboarding\/candy\/en_placeholder_featured-single-product.jpg","featured-blog":"https:\/\/s3-ap-southeast-1.amazonaws.com\/eesb.themes\/onboarding\/candy\/en_placeholder_featured-blog.jpg"},"use_original_image":0,"promotion_uis":{"primary_color":"#4089e4","header_bg_color":"#4089e4","header_text_color":"#fff","recommendation":{"is_show_product_page":true,"is_show_cart_page_top":true,"is_show_cart_page_bottom":true},"voucher_widget":{"primary_color":"#4089e4"}},"show_multiple_currencies":true,"supported_currencies":"MYR ","theme_id":3809,"theme_is_edited":1,"theme_updated_at":"2026-08-18T18:00:42.000Z","phone_account_enabled":false,"line_login_enabled":false,"apple_login_enabled":false,"timezone":"Asia\/Kuala_Lumpur","is_server_side_currency_conversion":true,"is_self_registration_enabled":true,"is_highlight_enabled":false,"is_auto_gen_highlight_enabled":false,"is_common_question_enabled":false,"is_auto_gen_common_question_enabled":false,"highlight_section_title":"Highlights","common_question_section_title":"Frequently asked questions","is_new_promotion_enabled":true} 3000 if (settings.promotion_uis.voucher_widget != null) { 3001 setVoucherTheme(settings.promotion_uis.voucher_widget) 3002 } 3003 var shop = { 3004 money_prefix: "", 3005 format_decimals: "" 3006 }; 3007 var _getEntitlementTranslation = { 3008 "free_shipping": "FREE SHIPPING", 3009 "free_of_charge": "FREE GIFT", 3010 } 3011 var _getTargetTypeTranslation = { 3012 "amount_credit": " CREDIT", 3013 "amount_off": " OFF", 3014 } 3015 var _getPrerequisiteTranslation = { 3016 "min_quantity": "Min formatValue item(s) purchase", 3017 "every_quantity": "Every formatValue item(s) purchase", 3018 "min_amount": "Min formatCurrency spend", 3019 "every_amount": "Every formatCurrency spend" 3020 } 3021 var _getPrerequisiteConditionTranslation = { 3022 "selected_items": "Selected Items", 3023 "selected_collections": "Selected Collections", 3024 "storewide": "Storewide", 3025 "order_subtotal": "Order Subtotal" 3026 } 3027 var _getVoucherButtonTextTranslation = { 3028 "apply": "Apply", 3029 } 3030 var _getVoucherErrorTranslation = { 3031 "condition_not_matched": "Voucher condition not matched" 3032 } 3033 </script>
3033 3034 3035 </div> 3036 </div> 3037</vouchers-modal> 3038 3039 3040<!-- GetButton.io widget -->
3041<script type="text/javascript"> 3042 (function () { 3043 var options = { 3044 whatsapp: "+60122381396", // WhatsApp number 3045 call_to_action: "Message us", // Call to action 3046 position: "right", // Position may be 'right' or 'left' 3047 }; 3048 var proto = document.location.protocol, host = "getbutton.io", url = proto + "//static." + host; 3049 var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url + '/widget-send-button/js/init.js'; 3050 s.onload = function () { WhWidgetSendButton.init(host, proto, options); }; 3051 var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); 3052 })(); 3053</script>
3053 3054<!-- /GetButton.io widget --> 3055 3056 3057</body> 3058</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.