Changeset 3772659
- Timestamp:
- 10/29/2026 10:41:42 AM (2 days ago)
- Location:
- searchjet-instant-search
- Files:
-
- 6 added
- 12 edited
- 2 copied
-
tags/2.0.6 (copied) (copied from searchjet-instant-search/trunk )
-
tags/2.0.6/includes/Admin/DashboardChatbot.php (added)
-
tags/2.0.6/includes/Admin/DashboardPage.php (modified) (3 diffs)
-
tags/2.0.6/includes/Admin/DashboardScripts.php (added)
-
tags/2.0.6/includes/Admin/DocumentationPage.php (modified) (1 diff)
-
tags/2.0.6/readme.txt (modified) (2 diffs)
-
tags/2.0.6/searchjet.php (modified) (2 diffs)
-
tags/2.0.6/trunk (copied) (copied from searchjet-instant-search/trunk )
-
tags/2.0.6/trunk/includes/Admin/DashboardChatbot.php (added)
-
tags/2.0.6/trunk/includes/Admin/DashboardPage.php (modified) (3 diffs)
-
tags/2.0.6/trunk/includes/Admin/DashboardScripts.php (added)
-
tags/2.0.6/trunk/includes/Admin/DocumentationPage.php (modified) (1 diff)
-
tags/2.0.6/trunk/readme.txt (modified) (2 diffs)
-
tags/2.0.6/trunk/searchjet.php (modified) (2 diffs)
-
trunk/includes/Admin/DashboardChatbot.php (added)
-
trunk/includes/Admin/DashboardPage.php (modified) (3 diffs)
-
trunk/includes/Admin/DashboardScripts.php (added)
-
trunk/includes/Admin/DocumentationPage.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/searchjet.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
searchjet-instant-search/tags/2.0.6/includes/Admin/DashboardPage.php
r3673342 r3772659 13 13 add_action('admin_enqueue_scripts', [self::class, 'enqueueAssets']); 14 14 add_action('admin_head', [self::class, 'hideSecondaryMenuItems']); 15 add_action('admin_footer', [self::class, 'maybeRenderChatbot']);16 15 add_action('wp_ajax_searchjet_save_api_key', [self::class, 'ajaxSaveApiKey']); 16 17 DashboardChatbot::init(); 17 18 } 18 19 … … 585 586 </div> 586 587 587 <!-- Live Search Journey --> 588 <script> 589 var searchjetImgUrl = '<?php echo esc_js(SEARCHJET_PLUGIN_URL . 'assets/img/'); ?>'; 590 var sampleQueries = [ 591 { typed: 'wirelss headphnes', corrected: 'wireless headphones', results: [ 592 { icon: 'dash-product-headphones', title: 'Wireless Headphones Pro', rating: '★★★★☆', reviews: '128', price: '$79.99', stock: 'In Stock', category: 'Electronics > Audio > Headphones' }, 593 { icon: 'dash-product-music', title: 'Wireless Earbuds Mini', rating: '★★★★★', reviews: '89', price: '$49.99', stock: 'In Stock', category: 'Electronics > Audio > Earbuds' } 594 ]}, 595 { typed: 'runing shoess', corrected: 'running shoes', results: [ 596 { icon: 'dash-product-shoe', title: 'Running Shoes Ultra', rating: '★★★★★', reviews: '256', price: '$129.99', stock: 'In Stock', category: 'Sports > Footwear > Running' }, 597 { icon: 'dash-product-runner', title: 'Marathon Pro Trainer', rating: '★★★★☆', reviews: '184', price: '$99.99', stock: 'Low Stock', category: 'Sports > Footwear > Running' } 598 ]}, 599 { typed: 'offee mugs', corrected: 'coffee mugs', results: [ 600 { icon: 'dash-product-coffee', title: 'Ceramic Coffee Mug Set', rating: '★★★★★', reviews: '312', price: '$24.99', stock: 'In Stock', category: 'Kitchen > Drinkware > Mugs' }, 601 { icon: 'dash-product-teapot', title: 'Travel Coffee Tumbler', rating: '★★★★☆', reviews: '167', price: '$34.99', stock: 'In Stock', category: 'Kitchen > Drinkware > Travel' } 602 ]} 603 ]; 604 var currentQueryIndex = 0; 605 var journeyRunning = false; 606 var journeyAnimInterval = null; 607 608 function startJourneyAnim() { 609 if (journeyRunning) return; 610 journeyRunning = true; 611 step1(); 612 } 613 614 function stopJourneyAnim() { 615 journeyRunning = false; 616 if (journeyAnimInterval) { clearInterval(journeyAnimInterval); journeyAnimInterval = null; } 617 } 618 619 function step1() { 620 var q = sampleQueries[currentQueryIndex]; 621 var el = document.getElementById('searchjet-typed-text'); 622 var list = document.getElementById('searchjet-results-list'); 623 if (!el || !list) { journeyRunning = false; return; } 624 625 list.innerHTML = ''; 626 document.querySelectorAll('.searchjet-journey-processing-item .check').forEach(function(c) { 627 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;">'; 628 }); 629 630 var i = 0; 631 el.textContent = ''; 632 journeyAnimInterval = setInterval(function() { 633 if (i < q.typed.length) { el.textContent += q.typed[i]; i++; } 634 else { clearInterval(journeyAnimInterval); setTimeout(step2, 400); } 635 }, 60); 636 } 637 638 function step2() { 639 var items = ['searchjet-proc-typo', 'searchjet-proc-intent', 'searchjet-proc-rank']; 640 var idx = 0; 641 var pi = setInterval(function() { 642 if (idx < items.length) { 643 var el = document.getElementById(items[idx]); 644 if (el) { 645 var c = el.querySelector('.check'); 646 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-check-green.svg" alt="" width="16" height="16" style="display:block;">'; 647 } 648 idx++; 649 } else { clearInterval(pi); setTimeout(step3, 300); } 650 }, 350); 651 } 652 653 function step3() { 654 var q = sampleQueries[currentQueryIndex]; 655 var list = document.getElementById('searchjet-results-list'); 656 if (!list) { journeyRunning = false; return; } 657 658 list.innerHTML = ''; 659 q.results.forEach(function(r, i) { 660 setTimeout(function() { 661 var card = document.createElement('div'); 662 card.className = 'searchjet-journey-result-card'; 663 card.innerHTML = '<div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 664 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 665 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 666 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 667 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div>' + 668 '<div style="font-size:12px;color:#64748b;margin-top:4px;">' + r.category + '</div></div>'; 669 list.appendChild(card); 670 }, i * 200); 671 }); 672 673 setTimeout(function() { 674 currentQueryIndex = (currentQueryIndex + 1) % sampleQueries.length; 675 journeyRunning = false; 676 setTimeout(startJourneyAnim, 3500); 677 }, q.results.length * 200 + 500); 678 } 679 680 function showHowItWorksModal() { 681 var overlay = document.createElement('div'); 682 overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(21,42,83,0.6);z-index:100000;display:flex;align-items:center;justify-content:center;animation:fadeIn 0.2s ease;'; 683 684 var modal = document.createElement('div'); 685 modal.style.cssText = 'background:#fff;border-radius:16px;max-width:800px;width:92%;max-height:88vh;box-shadow:0 25px 60px rgba(0,0,0,0.3);overflow:hidden;transform:translateY(0);animation:slideUp 0.3s ease;display:flex;flex-direction:column;'; 686 687 var header = document.createElement('div'); 688 header.style.cssText = 'background:linear-gradient(135deg,#152A53,#2563eb);padding:24px 28px;position:relative;flex-shrink:0;'; 689 header.innerHTML = '<div style="display:flex;align-items:center;gap:12px;">' + 690 '<div style="width:40px;height:40px;background:rgba(255,255,255,0.15);border-radius:10px;display:flex;align-items:center;justify-content:center;">' + 691 '<img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="22" height="22" style="display:block;"></div>' + 692 '<div><h2 style="margin:0;font-size:20px;font-weight:700;color:white;"><?php echo esc_js(__('Welcome to SearchJet!', 'searchjet-instant-search')); ?></h2>' + 693 '<p style="margin:4px 0 0;font-size:13px;color:rgba(255,255,255,0.75);"><?php echo esc_js(__('Watch what happens when a visitor searches on your site', 'searchjet-instant-search')); ?></p></div></div>' + 694 '<button id="how-it-works-close" style="position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(255,255,255,0.15);color:white;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s;" onmouseover="this.style.background=\'rgba(255,255,255,0.25)\'" onmouseout="this.style.background=\'rgba(255,255,255,0.15)\'">×</button>'; 695 696 var body = document.createElement('div'); 697 body.style.cssText = 'padding:28px;overflow-y:auto;flex:1;'; 698 body.innerHTML = 699 '<div class="searchjet-journey">' + 700 '<div class="searchjet-journey-story">' + 701 '<div class="searchjet-journey-step" id="modal-step-typing">' + 702 '<div class="searchjet-journey-step-label"><span class="step-icon typing"><img src="' + searchjetImgUrl + 'dash-message-blue.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 1: Visitor Types', 'searchjet-instant-search')); ?></div>' + 703 '<div class="searchjet-journey-typing"><div class="searchjet-journey-searchbox"><span class="searchjet-journey-typed-text" id="modal-typed-text"></span><span class="cursor"></span></div></div>' + 704 '</div>' + 705 '<div class="searchjet-journey-arrow"><img src="' + searchjetImgUrl + 'dash-arrowdown-light.svg" alt="" width="24" height="24" style="display:block;"></div>' + 706 '<div class="searchjet-journey-step" id="modal-step-processing">' + 707 '<div class="searchjet-journey-step-label"><span class="step-icon processing"><img src="' + searchjetImgUrl + 'dash-clock-amber.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 2: AI Processing (~30ms)', 'searchjet-instant-search')); ?></div>' + 708 '<div class="searchjet-journey-processing-content">' + 709 '<div class="searchjet-journey-processing-item" id="modal-proc-typo"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('Typo detected: wirelss → wireless', 'searchjet-instant-search')); ?></span></div>' + 710 '<div class="searchjet-journey-processing-item" id="modal-proc-intent"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('Intent understood: headphones', 'searchjet-instant-search')); ?></span></div>' + 711 '<div class="searchjet-journey-processing-item" id="modal-proc-rank"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('AI ranking by relevance + popularity', 'searchjet-instant-search')); ?></span></div>' + 712 '</div></div>' + 713 '<div class="searchjet-journey-arrow"><img src="' + searchjetImgUrl + 'dash-arrowdown-light.svg" alt="" width="24" height="24" style="display:block;"></div>' + 714 '<div class="searchjet-journey-step" id="modal-step-results">' + 715 '<div class="searchjet-journey-step-label"><span class="step-icon results"><img src="' + searchjetImgUrl + 'dash-trending-green.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 3: Results Appear (instantly)', 'searchjet-instant-search')); ?></div>' + 716 '<div class="searchjet-journey-results-list" id="modal-results-list"></div>' + 717 '</div></div>' + 718 '<div class="searchjet-journey-demo">' + 719 '<div class="searchjet-journey-demo-header"><h4><img src="' + searchjetImgUrl + 'dash-search-dark.svg" alt="" width="18" height="18" style="display:block;"><?php echo esc_js(__('Try It Yourself', 'searchjet-instant-search')); ?></h4><span class="try-badge"><?php echo esc_js(__('Interactive', 'searchjet-instant-search')); ?></span></div>' + 720 '<div class="searchjet-journey-demo-input-wrapper"><img class="searchjet-journey-demo-search-icon" src="' + searchjetImgUrl + 'dash-search-light.svg" alt="" width="20" height="20" style="display:block;"><input type="text" class="searchjet-journey-demo-input" id="modal-demo-search" placeholder="<?php echo esc_attr__('Try searching: wireless headphones, running shoes, coffee...', 'searchjet-instant-search'); ?>" /></div>' + 721 '<div class="searchjet-journey-demo-results" id="modal-demo-results"></div>' + 722 '</div>' + 723 '<div class="searchjet-journey-stats">' + 724 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-zap2-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><50ms</div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Search Speed', 'searchjet-instant-search')); ?></div></div>' + 725 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-activity-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value">99.9%</div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Uptime', 'searchjet-instant-search')); ?></div></div>' + 726 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-clock-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><?php echo esc_js(__('AI', 'searchjet-instant-search')); ?></div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Powered', 'searchjet-instant-search')); ?></div></div>' + 727 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-monitor-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><?php echo esc_js(__('Mobile', 'searchjet-instant-search')); ?></div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Optimized', 'searchjet-instant-search')); ?></div></div>' + 728 '</div></div>'; 729 730 modal.appendChild(header); 731 modal.appendChild(body); 732 overlay.appendChild(modal); 733 document.body.appendChild(overlay); 734 735 document.getElementById('how-it-works-close').onclick = function() { 736 document.body.removeChild(overlay); 737 stopJourneyAnim(); 738 }; 739 overlay.addEventListener('click', function(e) { 740 if (e.target === overlay) { 741 document.body.removeChild(overlay); 742 stopJourneyAnim(); 743 } 744 }); 745 746 setTimeout(startModalJourneyAnim, 300); 747 748 var demoInput = document.getElementById('modal-demo-search'); 749 if (demoInput) { 750 demoInput.addEventListener('input', function() { 751 var val = this.value.toLowerCase().trim(); 752 var rd = document.getElementById('modal-demo-results'); 753 if (!rd) return; 754 if (val.length < 2) { rd.innerHTML = ''; return; } 755 var all = []; 756 sampleQueries.forEach(function(q) { q.results.forEach(function(r) { all.push(r); }); }); 757 var m = all.filter(function(r) { return r.title.toLowerCase().indexOf(val) > -1 || r.category.toLowerCase().indexOf(val) > -1; }); 758 if (m.length === 0) { rd.innerHTML = '<div style="text-align:center;padding:16px;color:#64748b;font-size:14px;">No results found</div>'; return; } 759 rd.innerHTML = m.slice(0, 3).map(function(r) { 760 return '<div class="searchjet-journey-result-card"><div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 761 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 762 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 763 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 764 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div></div></div>'; 765 }).join(''); 766 }); 767 } 768 } 769 770 var modalQueryIndex = 0; 771 var modalJourneyRunning = false; 772 773 function startModalJourneyAnim() { 774 if (modalJourneyRunning) return; 775 modalJourneyRunning = true; 776 modalStep1(); 777 } 778 779 function modalStep1() { 780 var q = sampleQueries[modalQueryIndex]; 781 var el = document.getElementById('modal-typed-text'); 782 var list = document.getElementById('modal-results-list'); 783 if (!el || !list) { modalJourneyRunning = false; return; } 784 785 list.innerHTML = ''; 786 document.querySelectorAll('#modal-step-processing .check').forEach(function(c) { 787 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;">'; 788 }); 789 790 var i = 0; 791 el.textContent = ''; 792 var t = setInterval(function() { 793 if (i < q.typed.length) { el.textContent += q.typed[i]; i++; } 794 else { clearInterval(t); setTimeout(modalStep2, 400); } 795 }, 60); 796 } 797 798 function modalStep2() { 799 var items = ['modal-proc-typo', 'modal-proc-intent', 'modal-proc-rank']; 800 var idx = 0; 801 var pi = setInterval(function() { 802 if (idx < items.length) { 803 var el = document.getElementById(items[idx]); 804 if (el) { 805 var c = el.querySelector('.check'); 806 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-check-green.svg" alt="" width="16" height="16" style="display:block;">'; 807 } 808 idx++; 809 } else { clearInterval(pi); setTimeout(modalStep3, 300); } 810 }, 350); 811 } 812 813 function modalStep3() { 814 var q = sampleQueries[modalQueryIndex]; 815 var list = document.getElementById('modal-results-list'); 816 if (!list) { modalJourneyRunning = false; return; } 817 818 list.innerHTML = ''; 819 q.results.forEach(function(r, i) { 820 setTimeout(function() { 821 var card = document.createElement('div'); 822 card.className = 'searchjet-journey-result-card'; 823 card.innerHTML = '<div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 824 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 825 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 826 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 827 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div>' + 828 '<div style="font-size:12px;color:#64748b;margin-top:4px;">' + r.category + '</div></div>'; 829 list.appendChild(card); 830 }, i * 200); 831 }); 832 833 setTimeout(function() { 834 modalQueryIndex = (modalQueryIndex + 1) % sampleQueries.length; 835 modalJourneyRunning = false; 836 setTimeout(startModalJourneyAnim, 3500); 837 }, q.results.length * 200 + 500); 838 } 839 840 document.addEventListener('DOMContentLoaded', function() { 841 var showBtn = document.getElementById('searchjet-show-how-it-works'); 842 if (showBtn) { 843 showBtn.addEventListener('click', function() { 844 showHowItWorksModal(); 845 }); 846 } 847 848 var hasSeenWelcome = localStorage.getItem('searchjet_welcome_seen'); 849 if (!hasSeenWelcome) { 850 localStorage.setItem('searchjet_welcome_seen', '1'); 851 setTimeout(function() { 852 showSetupWizard(); 853 }, 800); 854 } 855 }); 856 </script> 857 858 <script> 859 document.addEventListener('DOMContentLoaded', function() { 860 var setupBtn = document.getElementById('searchjet-start-setup'); 861 if (setupBtn) { 862 setupBtn.addEventListener('click', function() { showSetupWizard(); }); 863 } 864 865 function showSetupWizard() { 866 var overlay = document.createElement('div'); 867 overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(21,42,83,0.6);z-index:100000;display:flex;align-items:center;justify-content:center;animation:fadeIn 0.2s ease;'; 868 869 var modal = document.createElement('div'); 870 modal.style.cssText = 'background:#fff;border-radius:16px;max-width:520px;width:90%;box-shadow:0 25px 60px rgba(0,0,0,0.3);overflow:hidden;transform:translateY(0);animation:slideUp 0.3s ease;'; 871 872 var header = document.createElement('div'); 873 header.style.cssText = 'background:linear-gradient(135deg,#152A53,#2563eb);padding:28px 28px 24px;position:relative;'; 874 header.innerHTML = '<div style="display:flex;align-items:center;gap:12px;margin-bottom:6px;">' + 875 '<div style="width:40px;height:40px;background:rgba(255,255,255,0.15);border-radius:10px;display:flex;align-items:center;justify-content:center;">' + 876 '<img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="22" height="22" style="display:block;"></div>' + 877 '<h2 style="margin:0;font-size:20px;font-weight:700;color:white;">' + '<?php echo esc_js(__('Welcome to SearchJet!', 'searchjet-instant-search')); ?>' + '</h2></div>' + 878 '<p style="margin:0;font-size:14px;color:rgba(255,255,255,0.75);">' + '<?php echo esc_js(__('Get AI-powered instant search running in 2 minutes', 'searchjet-instant-search')); ?>' + '</p>' + 879 '<button id="wizard-close" style="position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(255,255,255,0.15);color:white;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s;" onmouseover="this.style.background=\'rgba(255,255,255,0.25)\'" onmouseout="this.style.background=\'rgba(255,255,255,0.15)\'">×</button>'; 880 881 var body = document.createElement('div'); 882 body.style.cssText = 'padding:28px;'; 883 884 var steps = document.createElement('div'); 885 steps.style.cssText = 'display:flex;gap:8px;margin-bottom:24px;'; 886 steps.innerHTML = '<div class="wiz-step active" data-step="1" style="flex:1;height:4px;border-radius:2px;background:#2563eb;transition:background 0.3s;"></div>' + 887 '<div class="wiz-step" data-step="2" style="flex:1;height:4px;border-radius:2px;background:#e9ecef;transition:background 0.3s;"></div>'; 888 body.appendChild(steps); 889 890 var content = document.createElement('div'); 891 content.id = 'wiz-content'; 892 body.appendChild(content); 893 894 var footer = document.createElement('div'); 895 footer.id = 'wiz-footer'; 896 footer.style.cssText = 'padding:0 28px 28px;'; 897 body.appendChild(footer); 898 899 showStep1(content, footer, steps); 900 901 modal.appendChild(header); 902 modal.appendChild(body); 903 overlay.appendChild(modal); 904 document.body.appendChild(overlay); 905 906 document.getElementById('wizard-close').onclick = function() { document.body.removeChild(overlay); }; 907 overlay.addEventListener('click', function(e) { 908 if (e.target === overlay) document.body.removeChild(overlay); 909 }); 910 911 var style = document.createElement('style'); 912 style.textContent = '@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}'; 913 document.head.appendChild(style); 914 } 915 916 function showStep1(content, footer, steps, overlay) { 917 content.innerHTML = 918 '<h3 style="margin:0 0 8px;font-size:18px;font-weight:600;color:#152A53;">' + '<?php echo esc_js(__('Transform Your Site Search', 'searchjet-instant-search')); ?>' + '</h3>' + 919 '<p style="margin:0 0 20px;font-size:14px;color:#6c757d;">' + '<?php echo esc_js(__('Here\'s what SearchJet brings to your site:', 'searchjet-instant-search')); ?>' + '</p>' + 920 '<div style="display:flex;flex-direction:column;gap:10px;margin-bottom:20px;">' + 921 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #2563eb;">' + 922 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#2563eb,#667eea);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-zap2-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 923 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('Lightning Fast', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Instant search results as users type', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 924 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #667eea;">' + 925 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-clock-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 926 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('AI-Powered', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Smart typo tolerance and relevance ranking', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 927 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #28a745;">' + 928 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#28a745,#20c997);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-barchart2-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 929 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('Analytics', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Track search performance and insights', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 930 '</div>'; 931 932 footer.innerHTML = '<button class="searchjet-btn searchjet-btn-primary" id="wiz-next" style="width:100%;padding:14px;font-size:15px;">' + '<?php echo esc_js(__('Continue to Setup', 'searchjet-instant-search')); ?>' + '</button>'; 933 934 var next = footer.querySelector('#wiz-next'); 935 if (next) { 936 next.onclick = function() { 937 steps.querySelector('[data-step="1"]').style.background = '#28a745'; 938 steps.querySelector('[data-step="2"]').style.background = '#2563eb'; 939 showStep2(content, footer, steps, overlay); 940 }; 941 } 942 } 943 944 function showStep2(content, footer, steps, overlay) { 945 content.innerHTML = 946 '<h3 style="margin:0 0 8px;font-size:18px;font-weight:600;color:#152A53;">' + '<?php echo esc_js(__('Connect to SearchJet', 'searchjet-instant-search')); ?>' + '</h3>' + 947 '<p style="margin:0 0 16px;font-size:14px;color:#6c757d;">' + '<?php echo esc_js(__('Enter your API key to link your site with SearchJet\'s search engine.', 'searchjet-instant-search')); ?>' + '</p>' + 948 '<div style="background:#f0f7ff;border:1px solid #bfdbfe;border-radius:10px;padding:16px;margin-bottom:20px;display:flex;gap:12px;align-items:flex-start;">' + 949 '<img src="' + searchjetImgUrl + 'dash-help-blue.svg" alt="" width="20" height="20" style="display:block;flex-shrink:0;margin-top:1px;">' + 950 '<div><strong style="font-size:13px;color:#1e40af;display:block;margin-bottom:2px;">' + '<?php echo esc_js(__('Don\'t have an account?', 'searchjet-instant-search')); ?>' + '</strong>' + 951 '<span style="font-size:13px;color:#2563eb;"><a href="https://app.searchjetengine.com/register" target="_blank" style="color:#2563eb;font-weight:500;">' + '<?php echo esc_js(__('Sign up free', 'searchjet-instant-search')); ?>' + '</a> ' + '<?php echo esc_js(__('— no credit card required', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 952 '<div style="margin-bottom:4px;">' + 953 '<label style="font-size:14px;font-weight:600;color:#212529;display:block;margin-bottom:6px;">' + '<?php echo esc_js(__('API Key', 'searchjet-instant-search')); ?>' + '</label>' + 954 '<input type="text" id="wizard-api-key" placeholder="' + '<?php echo esc_js(__('Paste your API key here', 'searchjet-instant-search')); ?>' + '" style="width:100%;padding:14px 16px;border:2px solid #e9ecef;border-radius:10px;font-size:14px;box-sizing:border-box;transition:border-color 0.2s;" onfocus="this.style.borderColor=\'#2563eb\'" onblur="this.style.borderColor=\'#e9ecef\'">' + 955 '<p style="margin:6px 0 0;font-size:12px;color:#6c757d;">' + '<?php echo esc_js(__('Found at', 'searchjet-instant-search')); ?>' + ' <a href="https://app.searchjetengine.com/dashboard" target="_blank" style="color:#2563eb;">app.searchjetengine.com/dashboard</a></p>' + 956 '</div>'; 957 958 footer.innerHTML = '<div style="display:flex;gap:10px;">' + 959 '<button id="wiz-back" class="searchjet-btn searchjet-btn-secondary" style="flex:1;padding:14px;font-size:14px;">' + '<?php echo esc_js(__('Back', 'searchjet-instant-search')); ?>' + '</button>' + 960 '<button id="wiz-save" class="searchjet-btn searchjet-btn-primary" style="flex:3;padding:14px;font-size:14px;position:relative;">' + '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>' + '</button>' + 961 '</div>'; 962 963 document.getElementById('wiz-back').onclick = function() { 964 steps.querySelector('[data-step="2"]').style.background = '#e9ecef'; 965 steps.querySelector('[data-step="1"]').style.background = '#2563eb'; 966 showStep1(content, footer, steps, overlay); 967 }; 968 969 document.getElementById('wiz-save').onclick = function() { 970 var key = document.getElementById('wizard-api-key').value.trim(); 971 if (!key) { 972 document.getElementById('wizard-api-key').style.borderColor = '#dc3545'; 973 document.getElementById('wizard-api-key').placeholder = '<?php echo esc_js(__('Please enter your API key', 'searchjet-instant-search')); ?>'; 974 return; 975 } 976 var btn = document.getElementById('wiz-save'); 977 btn.disabled = true; 978 btn.textContent = '<?php echo esc_js(__('Saving...', 'searchjet-instant-search')); ?>'; 979 jQuery.post(ajaxurl, { 980 action: 'searchjet_save_api_key', 981 nonce: '<?php echo esc_js(wp_create_nonce('searchjet_wizard_nonce')); ?>', 982 api_key: key 983 }, function(response) { 984 if (response.success) { 985 window.location.href = '<?php echo esc_js(admin_url('admin.php?page=searchjet-settings')); ?>'; 986 } else { 987 btn.disabled = false; 988 btn.textContent = '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>'; 989 alert(response.data.message || '<?php echo esc_js(__('Failed to save API key', 'searchjet-instant-search')); ?>'); 990 } 991 }).fail(function() { 992 btn.disabled = false; 993 btn.textContent = '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>'; 994 alert('<?php echo esc_js(__('Connection error. Please try again.', 'searchjet-instant-search')); ?>'); 995 }); 996 }; 997 } 998 }); 999 </script> 588 <?php DashboardScripts::renderInlineScripts(); ?> 1000 589 <?php 1001 590 } … … 1127 716 } 1128 717 1129 public static function maybeRenderChatbot(): void {1130 $screen = get_current_screen();1131 if (!$screen || strpos($screen->id, 'searchjet') === false) return;1132 if (!current_user_can('manage_options')) return;1133 1134 $faqs = [1135 ['q' => __('How do I get an API key?', 'searchjet-instant-search'),1136 'a' => __('Sign up free at app.searchjetengine.com/register (no credit card required). Copy your API key from the dashboard and paste it in SearchJet → Settings.', 'searchjet-instant-search'),1137 'l' => 'https://app.searchjetengine.com/register'],1138 ['q' => __('How do I connect SearchJet to my site?', 'searchjet-instant-search'),1139 'a' => __('Go to SearchJet → Settings, paste your API key, and click Save Settings. The connection status will update automatically.', 'searchjet-instant-search'),1140 'l' => admin_url('admin.php?page=searchjet-settings')],1141 ['q' => __('How do I index my content?', 'searchjet-instant-search'),1142 'a' => __('Go to SearchJet → Indexing and click "Start Indexing". SearchJet will automatically index your posts, pages, and products. You can also use Bulk Re-Index for targeted reindexing.', 'searchjet-instant-search'),1143 'l' => admin_url('admin.php?page=searchjet-indexing')],1144 ['q' => __('How long does indexing take?', 'searchjet-instant-search'),1145 'a' => __('For most sites, initial indexing completes within a few minutes. Large sites (10,000+ documents) may take longer. You can monitor progress in Task History.', 'searchjet-instant-search'),1146 'l' => admin_url('admin.php?page=searchjet-task-history')],1147 ['q' => __('How do I customize the search UI?', 'searchjet-instant-search'),1148 'a' => __('Go to SearchJet → Search UI to customize theme style, colors, display options (thumbnail, price, category, excerpt, rating, stock), and see a live preview of your changes.', 'searchjet-instant-search'),1149 'l' => admin_url('admin.php?page=searchjet-search-ui')],1150 ['q' => __('Does SearchJet work with WooCommerce?', 'searchjet-instant-search'),1151 'a' => __('Yes! SearchJet fully supports WooCommerce product search, including thumbnails, prices, ratings, stock status, and category filtering.', 'searchjet-instant-search'),1152 'l' => 'https://searchjetengine.com/docs/woocommerce'],1153 ['q' => __('What is Bulk Re-Index?', 'searchjet-instant-search'),1154 'a' => __('Bulk Re-Index lets you refresh your search index in three modes: Global Sync (everything), Targeted Sync (specific post types), and Differential Sync (specific date range).', 'searchjet-instant-search'),1155 'l' => admin_url('admin.php?page=searchjet-bulk-reindex')],1156 ['q' => __('What are AI Agents?', 'searchjet-instant-search'),1157 'a' => __('AI Agents are intelligent assistants for managing search. They include Configuration agents (setup), Content Analysis agents (quality scoring), and Merchandising agents (boost rules, synonyms).', 'searchjet-instant-search'),1158 'l' => admin_url('admin.php?page=searchjet-agents')],1159 ['q' => __('How do I view search analytics?', 'searchjet-instant-search'),1160 'a' => __('Go to SearchJet → Analytics to see search volume, top queries, zero-result queries, indexed documents, and reindex activity.', 'searchjet-instant-search'),1161 'l' => admin_url('admin.php?page=searchjet-analytics')],1162 ['q' => __('What plans are available?', 'searchjet-instant-search'),1163 'a' => __('Free: 10,000 searches/mo, 1,000 pages, 50 AI answers. Pro ($19/mo): 50,000 searches, 25,000 pages, semantic search. Growth ($79/mo): 250,000 searches, 100,000 pages. Enterprise ($299/mo): unlimited everything.', 'searchjet-instant-search'),1164 'l' => 'https://searchjetengine.com/pricing'],1165 ['q' => __('What is the free tier?', 'searchjet-instant-search'),1166 'a' => __('The free tier includes 10,000 searches/month, 1,000 indexed pages, 1 site, 7 days analytics, and 50 AI answers/month. No credit card required.', 'searchjet-instant-search'),1167 'l' => 'https://searchjetengine.com/pricing'],1168 ['q' => __('What does the Pro plan include?', 'searchjet-instant-search'),1169 'a' => __('Pro ($19/mo) includes 50,000 searches/month, 25,000 indexed pages, 5 sites, 30 days analytics, 500 AI answers/month, 8 reindexes/day, AI Semantic Search, and 24h priority support.', 'searchjet-instant-search'),1170 'l' => 'https://searchjetengine.com/pricing'],1171 ['q' => __('What does the Growth plan include?', 'searchjet-instant-search'),1172 'a' => __('Growth ($79/mo) includes 250,000 searches/month, 100,000 indexed pages, 3 sites, 90 days analytics, 5,000 AI answers/month, 20 reindexes/day, AI Semantic Search, and 4h priority support.', 'searchjet-instant-search'),1173 'l' => 'https://searchjetengine.com/pricing'],1174 ['q' => __('What does the Enterprise plan include?', 'searchjet-instant-search'),1175 'a' => __('Enterprise ($299/mo) includes unlimited searches, pages, sites, and analytics. 100,000 AI answers/month, unlimited reindexes, AI Semantic Search, 1h priority support, and a dedicated instance.', 'searchjet-instant-search'),1176 'l' => 'https://searchjetengine.com/pricing'],1177 ['q' => __('How do I upgrade my plan?', 'searchjet-instant-search'),1178 'a' => __('Visit searchjetengine.com/pricing to compare plans and upgrade. Your new limits activate instantly after payment.', 'searchjet-instant-search'),1179 'l' => 'https://searchjetengine.com/pricing'],1180 ['q' => __('What post types are indexed?', 'searchjet-instant-search'),1181 'a' => __('By default, SearchJet indexes posts, pages, and products (if WooCommerce is active). You can configure additional post types in Index Settings.', 'searchjet-instant-search'),1182 'l' => admin_url('admin.php?page=searchjet-index-settings')],1183 ['q' => __('How do I check index health?', 'searchjet-instant-search'),1184 'a' => __('Go to SearchJet → Index Health to monitor index status, error rates, document counts, and last sync times for each content type.', 'searchjet-instant-search'),1185 'l' => admin_url('admin.php?page=searchjet-index-health')],1186 ['q' => __('Can I use SearchJet with other search plugins?', 'searchjet-instant-search'),1187 'a' => __('SearchJet replaces WordPress default search. Disable other search plugins first if needed. Toggle "Disable Search Override" in Settings to fall back.', 'searchjet-instant-search'),1188 'l' => admin_url('admin.php?page=searchjet-settings')],1189 ['q' => __('How do I contact support?', 'searchjet-instant-search'),1190 'a' => __('Visit searchjetengine.com/contact for support. For documentation and guides, check searchjetengine.com/docs/.', 'searchjet-instant-search'),1191 'l' => 'https://searchjetengine.com/contact'],1192 ];1193 1194 ?>1195 <div class="searchjet-chatbot-float">1196 <div class="searchjet-chatbot-panel" id="searchjet-chatbot-panel">1197 <div class="searchjet-chatbot-panel-header">1198 <div class="sj-chatbot-header-avatar">1199 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-search-white.svg'); ?>" alt="" width="22" height="22" style="display:block;">1200 </div>1201 <div>1202 <h3><?php esc_html_e('SearchJet AI Bot', 'searchjet-instant-search'); ?></h3>1203 <span class="sj-chatbot-status"><?php esc_html_e('Ask me anything about SearchJet', 'searchjet-instant-search'); ?></span>1204 </div>1205 <button class="searchjet-chatbot-close" id="searchjet-chatbot-close">×</button>1206 </div>1207 <div class="searchjet-chatbot-panel-body" id="searchjet-chatbot-body">1208 <div class="searchjet-chatbot-message bot">1209 <div class="avatar sj-avatar-bot">1210 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-search-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1211 </div>1212 <div class="bubble"><?php esc_html_e('Hi! I\'m SearchJet Assistant. How can I help you today?', 'searchjet-instant-search'); ?></div>1213 </div>1214 <div class="sj-quick-questions" id="sj-quick-questions">1215 <button class="sj-quick-btn" data-query="How do I get started?">1216 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-rocket.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Getting Started', 'searchjet-instant-search'); ?>1217 </button>1218 <button class="sj-quick-btn" data-query="How do I index content?">1219 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-package.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Indexing', 'searchjet-instant-search'); ?>1220 </button>1221 <button class="sj-quick-btn" data-query="What plans are available?">1222 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-gem.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Plans & Pricing', 'searchjet-instant-search'); ?>1223 </button>1224 <button class="sj-quick-btn" data-query="How do I customize search UI?">1225 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-palette.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Customize UI', 'searchjet-instant-search'); ?>1226 </button>1227 <button class="sj-quick-btn" data-query="WooCommerce integration">1228 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-cart.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('WooCommerce', 'searchjet-instant-search'); ?>1229 </button>1230 <button class="sj-quick-btn" data-query="How do I contact support?">1231 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-chat.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Support', 'searchjet-instant-search'); ?>1232 </button>1233 </div>1234 <div id="searchjet-chatbot-matches"></div>1235 <div id="searchjet-chatbot-noresult" style="display:none;">1236 <div class="searchjet-chatbot-message bot">1237 <div class="avatar sj-avatar-bot">1238 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-help-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1239 </div>1240 <div class="bubble"><?php esc_html_e('I couldn\'t find a specific answer. Try these resources:', 'searchjet-instant-search'); ?></div>1241 </div>1242 <div class="searchjet-chatbot-links">1243 <a href="https://searchjetengine.com/docs/" target="_blank" class="searchjet-chatbot-link">1244 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-book-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1245 <?php esc_html_e('Full Documentation', 'searchjet-instant-search'); ?>1246 </a>1247 <a href="https://searchjetengine.com/contact" target="_blank" class="searchjet-chatbot-link">1248 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-phone-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1249 <?php esc_html_e('Contact Support', 'searchjet-instant-search'); ?>1250 </a>1251 <a href="<?php echo esc_url(admin_url('admin.php?page=searchjet-docs')); ?>" class="searchjet-chatbot-link">1252 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-help-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1253 <?php esc_html_e('Plugin Docs Hub', 'searchjet-instant-search'); ?>1254 </a>1255 </div>1256 </div>1257 </div>1258 <div class="searchjet-chatbot-panel-footer">1259 <input type="text" id="searchjet-chatbot-input" placeholder="<?php esc_attr_e('Type your question...', 'searchjet-instant-search'); ?>" autocomplete="off">1260 <button id="searchjet-chatbot-send">1261 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-send-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1262 </button>1263 </div>1264 </div>1265 <div class="searchjet-chatbot-tooltip" id="searchjet-chatbot-tooltip"><?php esc_html_e('Need help? I\'m here for you!', 'searchjet-instant-search'); ?></div>1266 <button class="searchjet-chatbot-btn" id="searchjet-chatbot-btn" aria-label="<?php esc_attr_e('Open help chat', 'searchjet-instant-search'); ?>">1267 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-message-white.svg'); ?>" alt="" width="24" height="24" style="display:block;">1268 <span class="sj-chatbot-badge" id="sj-chatbot-badge">1</span>1269 </button>1270 </div>1271 1272 <script>1273 var searchjetFAQ = <?php echo wp_json_encode($faqs, JSON_UNESCAPED_UNICODE); ?>;1274 var searchjetAdminUrl = <?php echo wp_json_encode(admin_url('/')); ?>;1275 </script>1276 <script>1277 document.addEventListener('DOMContentLoaded', function() {1278 var chatBtn = document.getElementById('searchjet-chatbot-btn');1279 var chatPanel = document.getElementById('searchjet-chatbot-panel');1280 var chatClose = document.getElementById('searchjet-chatbot-close');1281 var chatInput = document.getElementById('searchjet-chatbot-input');1282 var chatSend = document.getElementById('searchjet-chatbot-send');1283 var matchesDiv = document.getElementById('searchjet-chatbot-matches');1284 var noresultDiv = document.getElementById('searchjet-chatbot-noresult');1285 var quickBtns = document.querySelectorAll('.sj-quick-btn');1286 var badge = document.getElementById('sj-chatbot-badge');1287 1288 function playNotifSound() {1289 try {1290 var ctx = new (window.AudioContext || window.webkitAudioContext)();1291 var osc = ctx.createOscillator();1292 var gain = ctx.createGain();1293 osc.connect(gain);1294 gain.connect(ctx.destination);1295 osc.frequency.value = 880;1296 osc.type = 'sine';1297 gain.gain.setValueAtTime(0.15, ctx.currentTime);1298 gain.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.3);1299 osc.start(ctx.currentTime);1300 osc.stop(ctx.currentTime + 0.3);1301 setTimeout(function() {1302 var osc2 = ctx.createOscillator();1303 var gain2 = ctx.createGain();1304 osc2.connect(gain2);1305 gain2.connect(ctx.destination);1306 osc2.frequency.value = 1320;1307 osc2.type = 'sine';1308 gain2.gain.setValueAtTime(0.12, ctx.currentTime);1309 gain2.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.25);1310 osc2.start(ctx.currentTime);1311 osc2.stop(ctx.currentTime + 0.25);1312 }, 150);1313 } catch(e) {}1314 }1315 1316 function togglePanel(open) {1317 if (!chatPanel) return;1318 chatPanel.classList.toggle('open', open);1319 if (open) {1320 if (badge) badge.style.display = 'none';1321 if (chatInput) chatInput.focus();1322 }1323 }1324 1325 if (chatBtn && chatPanel) {1326 chatBtn.addEventListener('click', function() {1327 togglePanel(!chatPanel.classList.contains('open'));1328 });1329 }1330 if (chatClose && chatPanel) {1331 chatClose.addEventListener('click', function() { togglePanel(false); });1332 }1333 document.addEventListener('click', function(e) {1334 if (chatPanel && chatPanel.classList.contains('open')) {1335 var f = document.querySelector('.searchjet-chatbot-float');1336 if (f && !f.contains(e.target)) togglePanel(false);1337 }1338 });1339 1340 quickBtns.forEach(function(btn) {1341 btn.addEventListener('click', function() {1342 var query = this.getAttribute('data-query');1343 if (chatInput) chatInput.value = query;1344 searchFAQ(query);1345 quickBtns.forEach(function(b) { b.classList.remove('sj-quick-active'); });1346 btn.classList.add('sj-quick-active');1347 });1348 });1349 1350 function searchFAQ(query) {1351 if (!matchesDiv || !noresultDiv) return;1352 var q = query.toLowerCase().trim();1353 if (!q) {1354 matchesDiv.innerHTML = '';1355 noresultDiv.style.display = 'none';1356 quickBtns.forEach(function(b) { b.classList.remove('sj-quick-active'); });1357 return;1358 }1359 var words = q.split(/\s+/).filter(Boolean);1360 var scored = searchjetFAQ.map(function(f) {1361 var haystack = (f.q + ' ' + f.a).toLowerCase();1362 var score = 0;1363 words.forEach(function(w) {1364 if (haystack.indexOf(w) > -1) score += 1;1365 });1366 return { faq: f, score: score };1367 }).filter(function(s) { return s.score > 0; });1368 scored.sort(function(a, b) { return b.score - a.score; });1369 var top = scored.slice(0, 3);1370 if (top.length === 0) {1371 matchesDiv.innerHTML = '';1372 noresultDiv.style.display = 'block';1373 return;1374 }1375 noresultDiv.style.display = 'none';1376 matchesDiv.innerHTML = top.map(function(s) {1377 var faq = s.faq;1378 var link = faq.l && faq.l.indexOf('http') === 0 ? faq.l : (searchjetAdminUrl.replace(/\/+$/, '') + '/' + (faq.l || '').replace(/^\//, ''));1379 var isExternal = faq.l && faq.l.indexOf('http') === 0;1380 return '<div class="searchjet-chatbot-message bot sj-msg-animate">' +1381 '<div class="avatar sj-avatar-bot"><img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="16" height="16" style="display:block;"></div>' +1382 '<div class="bubble"><strong>' + faq.q + '</strong><br>' + faq.a +1383 (link ? ' <a href="' + link + '" ' + (isExternal ? 'target="_blank"' : '') + ' class="sj-learn-more">' + '<?php echo esc_js(__('Learn more', 'searchjet-instant-search')); ?>' + ' →</a>' : '') +1384 '</div></div>';1385 }).join('');1386 }1387 1388 var debounceTimer;1389 if (chatInput) {1390 chatInput.addEventListener('input', function() {1391 clearTimeout(debounceTimer);1392 debounceTimer = setTimeout(function() { searchFAQ(chatInput.value); }, 200);1393 });1394 chatInput.addEventListener('keydown', function(e) {1395 if (e.key === 'Enter') searchFAQ(chatInput.value);1396 });1397 }1398 if (chatSend) {1399 chatSend.addEventListener('click', function() {1400 if (chatInput) searchFAQ(chatInput.value);1401 });1402 }1403 1404 var hasSeenHelp = localStorage.getItem('searchjet_help_seen');1405 if (!hasSeenHelp) {1406 localStorage.setItem('searchjet_help_seen', '1');1407 setTimeout(function() {1408 playNotifSound();1409 togglePanel(true);1410 if (badge) badge.style.display = 'flex';1411 }, 1200);1412 }1413 });1414 </script>1415 <?php1416 }1417 718 } -
searchjet-instant-search/tags/2.0.6/includes/Admin/DocumentationPage.php
r3673342 r3772659 97 97 <p><?php esc_html_e('Get up and running in minutes. Install, connect, and start searching.', 'searchjet-instant-search'); ?></p> 98 98 </a> 99 <a href="https://searchjetengine.com/docs/guides/get-started/admin-panel-guide/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">100 <div class="searchjet-docs-card-icon">101 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-gear.svg'); ?>" alt="" width="24" height="24" style="display:block;">102 </div>103 <h3><?php esc_html_e('Admin Panel Guide', 'searchjet-instant-search'); ?></h3>104 <p><?php esc_html_e('Learn how to configure settings, manage exclusions, and customize your search.', 'searchjet-instant-search'); ?></p>105 </a>106 <a href="https://searchjetengine.com/docs/guides/features/searchjet-connect/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">107 <div class="searchjet-docs-card-icon">108 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-link.svg'); ?>" alt="" width="24" height="24" style="display:block;">109 </div>110 <h3><?php esc_html_e('SearchJet Connect', 'searchjet-instant-search'); ?></h3>111 <p><?php esc_html_e('Connect multiple sites to a single SearchJet account for unified management.', 'searchjet-instant-search'); ?></p>112 </a>113 <a href="https://searchjetengine.com/docs/guides/features/ai-agents/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">114 <div class="searchjet-docs-card-icon">115 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-robot.svg'); ?>" alt="" width="24" height="24" style="display:block;">116 </div>117 <h3><?php esc_html_e('AI Agents', 'searchjet-instant-search'); ?></h3>118 <p><?php esc_html_e('Create intelligent automation agents to optimize your search experience.', 'searchjet-instant-search'); ?></p>119 </a>120 <a href="https://searchjetengine.com/docs/guides/features/roadmap/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">121 <div class="searchjet-docs-card-icon">122 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-map.svg'); ?>" alt="" width="24" height="24" style="display:block;">123 </div>124 <h3><?php esc_html_e('Roadmap', 'searchjet-instant-search'); ?></h3>125 <p><?php esc_html_e('See what features are coming and vote on what matters most to you.', 'searchjet-instant-search'); ?></p>126 </a>127 <a href="https://searchjetengine.com/docs/guides/troubleshooting/common-issues/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">128 <div class="searchjet-docs-card-icon">129 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-wrench.svg'); ?>" alt="" width="24" height="24" style="display:block;">130 </div>131 <h3><?php esc_html_e('Troubleshooting', 'searchjet-instant-search'); ?></h3>132 <p><?php esc_html_e('Solutions to common issues and answers to frequently asked questions.', 'searchjet-instant-search'); ?></p>133 </a>134 99 </div> 135 100 -
searchjet-instant-search/tags/2.0.6/readme.txt
r3694855 r3772659 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.0. 57 Stable tag: 2.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 134 134 135 135 == Changelog == 136 137 = 2.0.6 = 138 * **IMPROVEMENT** - Streamlined the in-plugin Documentation page by removing the Admin Panel Guide, SearchJet Connect, AI Agents, Roadmap, and Troubleshooting cards 136 139 137 140 = 2.0.5 = -
searchjet-instant-search/tags/2.0.6/searchjet.php
r3694855 r3772659 4 4 * Plugin URI: https://searchjetengine.com/ 5 5 * Description: AI-powered instant search for WooCommerce & WordPress. Supports SKUs, smart filters, typo-tolerance & GA4 tracking. 6 * Version: 2.0. 56 * Version: 2.0.6 7 7 * Author: Maidul 8 8 * Author URI: https://searchjetengine.com/ … … 24 24 } 25 25 // Define plugin constants 26 define('SEARCHJET_VERSION', '2.0. 5');27 define('SEARCHJET_PLUGIN_VERSION', '2.0. 5');26 define('SEARCHJET_VERSION', '2.0.6'); 27 define('SEARCHJET_PLUGIN_VERSION', '2.0.6'); 28 28 define('SEARCHJET_PLUGIN_FILE', __FILE__); 29 29 define('SEARCHJET_PLUGIN_DIR', plugin_dir_path(__FILE__)); -
searchjet-instant-search/tags/2.0.6/trunk/includes/Admin/DashboardPage.php
r3673342 r3772659 13 13 add_action('admin_enqueue_scripts', [self::class, 'enqueueAssets']); 14 14 add_action('admin_head', [self::class, 'hideSecondaryMenuItems']); 15 add_action('admin_footer', [self::class, 'maybeRenderChatbot']);16 15 add_action('wp_ajax_searchjet_save_api_key', [self::class, 'ajaxSaveApiKey']); 16 17 DashboardChatbot::init(); 17 18 } 18 19 … … 585 586 </div> 586 587 587 <!-- Live Search Journey --> 588 <script> 589 var searchjetImgUrl = '<?php echo esc_js(SEARCHJET_PLUGIN_URL . 'assets/img/'); ?>'; 590 var sampleQueries = [ 591 { typed: 'wirelss headphnes', corrected: 'wireless headphones', results: [ 592 { icon: 'dash-product-headphones', title: 'Wireless Headphones Pro', rating: '★★★★☆', reviews: '128', price: '$79.99', stock: 'In Stock', category: 'Electronics > Audio > Headphones' }, 593 { icon: 'dash-product-music', title: 'Wireless Earbuds Mini', rating: '★★★★★', reviews: '89', price: '$49.99', stock: 'In Stock', category: 'Electronics > Audio > Earbuds' } 594 ]}, 595 { typed: 'runing shoess', corrected: 'running shoes', results: [ 596 { icon: 'dash-product-shoe', title: 'Running Shoes Ultra', rating: '★★★★★', reviews: '256', price: '$129.99', stock: 'In Stock', category: 'Sports > Footwear > Running' }, 597 { icon: 'dash-product-runner', title: 'Marathon Pro Trainer', rating: '★★★★☆', reviews: '184', price: '$99.99', stock: 'Low Stock', category: 'Sports > Footwear > Running' } 598 ]}, 599 { typed: 'offee mugs', corrected: 'coffee mugs', results: [ 600 { icon: 'dash-product-coffee', title: 'Ceramic Coffee Mug Set', rating: '★★★★★', reviews: '312', price: '$24.99', stock: 'In Stock', category: 'Kitchen > Drinkware > Mugs' }, 601 { icon: 'dash-product-teapot', title: 'Travel Coffee Tumbler', rating: '★★★★☆', reviews: '167', price: '$34.99', stock: 'In Stock', category: 'Kitchen > Drinkware > Travel' } 602 ]} 603 ]; 604 var currentQueryIndex = 0; 605 var journeyRunning = false; 606 var journeyAnimInterval = null; 607 608 function startJourneyAnim() { 609 if (journeyRunning) return; 610 journeyRunning = true; 611 step1(); 612 } 613 614 function stopJourneyAnim() { 615 journeyRunning = false; 616 if (journeyAnimInterval) { clearInterval(journeyAnimInterval); journeyAnimInterval = null; } 617 } 618 619 function step1() { 620 var q = sampleQueries[currentQueryIndex]; 621 var el = document.getElementById('searchjet-typed-text'); 622 var list = document.getElementById('searchjet-results-list'); 623 if (!el || !list) { journeyRunning = false; return; } 624 625 list.innerHTML = ''; 626 document.querySelectorAll('.searchjet-journey-processing-item .check').forEach(function(c) { 627 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;">'; 628 }); 629 630 var i = 0; 631 el.textContent = ''; 632 journeyAnimInterval = setInterval(function() { 633 if (i < q.typed.length) { el.textContent += q.typed[i]; i++; } 634 else { clearInterval(journeyAnimInterval); setTimeout(step2, 400); } 635 }, 60); 636 } 637 638 function step2() { 639 var items = ['searchjet-proc-typo', 'searchjet-proc-intent', 'searchjet-proc-rank']; 640 var idx = 0; 641 var pi = setInterval(function() { 642 if (idx < items.length) { 643 var el = document.getElementById(items[idx]); 644 if (el) { 645 var c = el.querySelector('.check'); 646 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-check-green.svg" alt="" width="16" height="16" style="display:block;">'; 647 } 648 idx++; 649 } else { clearInterval(pi); setTimeout(step3, 300); } 650 }, 350); 651 } 652 653 function step3() { 654 var q = sampleQueries[currentQueryIndex]; 655 var list = document.getElementById('searchjet-results-list'); 656 if (!list) { journeyRunning = false; return; } 657 658 list.innerHTML = ''; 659 q.results.forEach(function(r, i) { 660 setTimeout(function() { 661 var card = document.createElement('div'); 662 card.className = 'searchjet-journey-result-card'; 663 card.innerHTML = '<div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 664 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 665 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 666 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 667 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div>' + 668 '<div style="font-size:12px;color:#64748b;margin-top:4px;">' + r.category + '</div></div>'; 669 list.appendChild(card); 670 }, i * 200); 671 }); 672 673 setTimeout(function() { 674 currentQueryIndex = (currentQueryIndex + 1) % sampleQueries.length; 675 journeyRunning = false; 676 setTimeout(startJourneyAnim, 3500); 677 }, q.results.length * 200 + 500); 678 } 679 680 function showHowItWorksModal() { 681 var overlay = document.createElement('div'); 682 overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(21,42,83,0.6);z-index:100000;display:flex;align-items:center;justify-content:center;animation:fadeIn 0.2s ease;'; 683 684 var modal = document.createElement('div'); 685 modal.style.cssText = 'background:#fff;border-radius:16px;max-width:800px;width:92%;max-height:88vh;box-shadow:0 25px 60px rgba(0,0,0,0.3);overflow:hidden;transform:translateY(0);animation:slideUp 0.3s ease;display:flex;flex-direction:column;'; 686 687 var header = document.createElement('div'); 688 header.style.cssText = 'background:linear-gradient(135deg,#152A53,#2563eb);padding:24px 28px;position:relative;flex-shrink:0;'; 689 header.innerHTML = '<div style="display:flex;align-items:center;gap:12px;">' + 690 '<div style="width:40px;height:40px;background:rgba(255,255,255,0.15);border-radius:10px;display:flex;align-items:center;justify-content:center;">' + 691 '<img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="22" height="22" style="display:block;"></div>' + 692 '<div><h2 style="margin:0;font-size:20px;font-weight:700;color:white;"><?php echo esc_js(__('Welcome to SearchJet!', 'searchjet-instant-search')); ?></h2>' + 693 '<p style="margin:4px 0 0;font-size:13px;color:rgba(255,255,255,0.75);"><?php echo esc_js(__('Watch what happens when a visitor searches on your site', 'searchjet-instant-search')); ?></p></div></div>' + 694 '<button id="how-it-works-close" style="position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(255,255,255,0.15);color:white;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s;" onmouseover="this.style.background=\'rgba(255,255,255,0.25)\'" onmouseout="this.style.background=\'rgba(255,255,255,0.15)\'">×</button>'; 695 696 var body = document.createElement('div'); 697 body.style.cssText = 'padding:28px;overflow-y:auto;flex:1;'; 698 body.innerHTML = 699 '<div class="searchjet-journey">' + 700 '<div class="searchjet-journey-story">' + 701 '<div class="searchjet-journey-step" id="modal-step-typing">' + 702 '<div class="searchjet-journey-step-label"><span class="step-icon typing"><img src="' + searchjetImgUrl + 'dash-message-blue.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 1: Visitor Types', 'searchjet-instant-search')); ?></div>' + 703 '<div class="searchjet-journey-typing"><div class="searchjet-journey-searchbox"><span class="searchjet-journey-typed-text" id="modal-typed-text"></span><span class="cursor"></span></div></div>' + 704 '</div>' + 705 '<div class="searchjet-journey-arrow"><img src="' + searchjetImgUrl + 'dash-arrowdown-light.svg" alt="" width="24" height="24" style="display:block;"></div>' + 706 '<div class="searchjet-journey-step" id="modal-step-processing">' + 707 '<div class="searchjet-journey-step-label"><span class="step-icon processing"><img src="' + searchjetImgUrl + 'dash-clock-amber.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 2: AI Processing (~30ms)', 'searchjet-instant-search')); ?></div>' + 708 '<div class="searchjet-journey-processing-content">' + 709 '<div class="searchjet-journey-processing-item" id="modal-proc-typo"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('Typo detected: wirelss → wireless', 'searchjet-instant-search')); ?></span></div>' + 710 '<div class="searchjet-journey-processing-item" id="modal-proc-intent"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('Intent understood: headphones', 'searchjet-instant-search')); ?></span></div>' + 711 '<div class="searchjet-journey-processing-item" id="modal-proc-rank"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('AI ranking by relevance + popularity', 'searchjet-instant-search')); ?></span></div>' + 712 '</div></div>' + 713 '<div class="searchjet-journey-arrow"><img src="' + searchjetImgUrl + 'dash-arrowdown-light.svg" alt="" width="24" height="24" style="display:block;"></div>' + 714 '<div class="searchjet-journey-step" id="modal-step-results">' + 715 '<div class="searchjet-journey-step-label"><span class="step-icon results"><img src="' + searchjetImgUrl + 'dash-trending-green.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 3: Results Appear (instantly)', 'searchjet-instant-search')); ?></div>' + 716 '<div class="searchjet-journey-results-list" id="modal-results-list"></div>' + 717 '</div></div>' + 718 '<div class="searchjet-journey-demo">' + 719 '<div class="searchjet-journey-demo-header"><h4><img src="' + searchjetImgUrl + 'dash-search-dark.svg" alt="" width="18" height="18" style="display:block;"><?php echo esc_js(__('Try It Yourself', 'searchjet-instant-search')); ?></h4><span class="try-badge"><?php echo esc_js(__('Interactive', 'searchjet-instant-search')); ?></span></div>' + 720 '<div class="searchjet-journey-demo-input-wrapper"><img class="searchjet-journey-demo-search-icon" src="' + searchjetImgUrl + 'dash-search-light.svg" alt="" width="20" height="20" style="display:block;"><input type="text" class="searchjet-journey-demo-input" id="modal-demo-search" placeholder="<?php echo esc_attr__('Try searching: wireless headphones, running shoes, coffee...', 'searchjet-instant-search'); ?>" /></div>' + 721 '<div class="searchjet-journey-demo-results" id="modal-demo-results"></div>' + 722 '</div>' + 723 '<div class="searchjet-journey-stats">' + 724 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-zap2-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><50ms</div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Search Speed', 'searchjet-instant-search')); ?></div></div>' + 725 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-activity-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value">99.9%</div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Uptime', 'searchjet-instant-search')); ?></div></div>' + 726 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-clock-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><?php echo esc_js(__('AI', 'searchjet-instant-search')); ?></div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Powered', 'searchjet-instant-search')); ?></div></div>' + 727 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-monitor-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><?php echo esc_js(__('Mobile', 'searchjet-instant-search')); ?></div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Optimized', 'searchjet-instant-search')); ?></div></div>' + 728 '</div></div>'; 729 730 modal.appendChild(header); 731 modal.appendChild(body); 732 overlay.appendChild(modal); 733 document.body.appendChild(overlay); 734 735 document.getElementById('how-it-works-close').onclick = function() { 736 document.body.removeChild(overlay); 737 stopJourneyAnim(); 738 }; 739 overlay.addEventListener('click', function(e) { 740 if (e.target === overlay) { 741 document.body.removeChild(overlay); 742 stopJourneyAnim(); 743 } 744 }); 745 746 setTimeout(startModalJourneyAnim, 300); 747 748 var demoInput = document.getElementById('modal-demo-search'); 749 if (demoInput) { 750 demoInput.addEventListener('input', function() { 751 var val = this.value.toLowerCase().trim(); 752 var rd = document.getElementById('modal-demo-results'); 753 if (!rd) return; 754 if (val.length < 2) { rd.innerHTML = ''; return; } 755 var all = []; 756 sampleQueries.forEach(function(q) { q.results.forEach(function(r) { all.push(r); }); }); 757 var m = all.filter(function(r) { return r.title.toLowerCase().indexOf(val) > -1 || r.category.toLowerCase().indexOf(val) > -1; }); 758 if (m.length === 0) { rd.innerHTML = '<div style="text-align:center;padding:16px;color:#64748b;font-size:14px;">No results found</div>'; return; } 759 rd.innerHTML = m.slice(0, 3).map(function(r) { 760 return '<div class="searchjet-journey-result-card"><div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 761 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 762 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 763 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 764 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div></div></div>'; 765 }).join(''); 766 }); 767 } 768 } 769 770 var modalQueryIndex = 0; 771 var modalJourneyRunning = false; 772 773 function startModalJourneyAnim() { 774 if (modalJourneyRunning) return; 775 modalJourneyRunning = true; 776 modalStep1(); 777 } 778 779 function modalStep1() { 780 var q = sampleQueries[modalQueryIndex]; 781 var el = document.getElementById('modal-typed-text'); 782 var list = document.getElementById('modal-results-list'); 783 if (!el || !list) { modalJourneyRunning = false; return; } 784 785 list.innerHTML = ''; 786 document.querySelectorAll('#modal-step-processing .check').forEach(function(c) { 787 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;">'; 788 }); 789 790 var i = 0; 791 el.textContent = ''; 792 var t = setInterval(function() { 793 if (i < q.typed.length) { el.textContent += q.typed[i]; i++; } 794 else { clearInterval(t); setTimeout(modalStep2, 400); } 795 }, 60); 796 } 797 798 function modalStep2() { 799 var items = ['modal-proc-typo', 'modal-proc-intent', 'modal-proc-rank']; 800 var idx = 0; 801 var pi = setInterval(function() { 802 if (idx < items.length) { 803 var el = document.getElementById(items[idx]); 804 if (el) { 805 var c = el.querySelector('.check'); 806 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-check-green.svg" alt="" width="16" height="16" style="display:block;">'; 807 } 808 idx++; 809 } else { clearInterval(pi); setTimeout(modalStep3, 300); } 810 }, 350); 811 } 812 813 function modalStep3() { 814 var q = sampleQueries[modalQueryIndex]; 815 var list = document.getElementById('modal-results-list'); 816 if (!list) { modalJourneyRunning = false; return; } 817 818 list.innerHTML = ''; 819 q.results.forEach(function(r, i) { 820 setTimeout(function() { 821 var card = document.createElement('div'); 822 card.className = 'searchjet-journey-result-card'; 823 card.innerHTML = '<div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 824 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 825 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 826 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 827 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div>' + 828 '<div style="font-size:12px;color:#64748b;margin-top:4px;">' + r.category + '</div></div>'; 829 list.appendChild(card); 830 }, i * 200); 831 }); 832 833 setTimeout(function() { 834 modalQueryIndex = (modalQueryIndex + 1) % sampleQueries.length; 835 modalJourneyRunning = false; 836 setTimeout(startModalJourneyAnim, 3500); 837 }, q.results.length * 200 + 500); 838 } 839 840 document.addEventListener('DOMContentLoaded', function() { 841 var showBtn = document.getElementById('searchjet-show-how-it-works'); 842 if (showBtn) { 843 showBtn.addEventListener('click', function() { 844 showHowItWorksModal(); 845 }); 846 } 847 848 var hasSeenWelcome = localStorage.getItem('searchjet_welcome_seen'); 849 if (!hasSeenWelcome) { 850 localStorage.setItem('searchjet_welcome_seen', '1'); 851 setTimeout(function() { 852 showSetupWizard(); 853 }, 800); 854 } 855 }); 856 </script> 857 858 <script> 859 document.addEventListener('DOMContentLoaded', function() { 860 var setupBtn = document.getElementById('searchjet-start-setup'); 861 if (setupBtn) { 862 setupBtn.addEventListener('click', function() { showSetupWizard(); }); 863 } 864 865 function showSetupWizard() { 866 var overlay = document.createElement('div'); 867 overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(21,42,83,0.6);z-index:100000;display:flex;align-items:center;justify-content:center;animation:fadeIn 0.2s ease;'; 868 869 var modal = document.createElement('div'); 870 modal.style.cssText = 'background:#fff;border-radius:16px;max-width:520px;width:90%;box-shadow:0 25px 60px rgba(0,0,0,0.3);overflow:hidden;transform:translateY(0);animation:slideUp 0.3s ease;'; 871 872 var header = document.createElement('div'); 873 header.style.cssText = 'background:linear-gradient(135deg,#152A53,#2563eb);padding:28px 28px 24px;position:relative;'; 874 header.innerHTML = '<div style="display:flex;align-items:center;gap:12px;margin-bottom:6px;">' + 875 '<div style="width:40px;height:40px;background:rgba(255,255,255,0.15);border-radius:10px;display:flex;align-items:center;justify-content:center;">' + 876 '<img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="22" height="22" style="display:block;"></div>' + 877 '<h2 style="margin:0;font-size:20px;font-weight:700;color:white;">' + '<?php echo esc_js(__('Welcome to SearchJet!', 'searchjet-instant-search')); ?>' + '</h2></div>' + 878 '<p style="margin:0;font-size:14px;color:rgba(255,255,255,0.75);">' + '<?php echo esc_js(__('Get AI-powered instant search running in 2 minutes', 'searchjet-instant-search')); ?>' + '</p>' + 879 '<button id="wizard-close" style="position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(255,255,255,0.15);color:white;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s;" onmouseover="this.style.background=\'rgba(255,255,255,0.25)\'" onmouseout="this.style.background=\'rgba(255,255,255,0.15)\'">×</button>'; 880 881 var body = document.createElement('div'); 882 body.style.cssText = 'padding:28px;'; 883 884 var steps = document.createElement('div'); 885 steps.style.cssText = 'display:flex;gap:8px;margin-bottom:24px;'; 886 steps.innerHTML = '<div class="wiz-step active" data-step="1" style="flex:1;height:4px;border-radius:2px;background:#2563eb;transition:background 0.3s;"></div>' + 887 '<div class="wiz-step" data-step="2" style="flex:1;height:4px;border-radius:2px;background:#e9ecef;transition:background 0.3s;"></div>'; 888 body.appendChild(steps); 889 890 var content = document.createElement('div'); 891 content.id = 'wiz-content'; 892 body.appendChild(content); 893 894 var footer = document.createElement('div'); 895 footer.id = 'wiz-footer'; 896 footer.style.cssText = 'padding:0 28px 28px;'; 897 body.appendChild(footer); 898 899 showStep1(content, footer, steps); 900 901 modal.appendChild(header); 902 modal.appendChild(body); 903 overlay.appendChild(modal); 904 document.body.appendChild(overlay); 905 906 document.getElementById('wizard-close').onclick = function() { document.body.removeChild(overlay); }; 907 overlay.addEventListener('click', function(e) { 908 if (e.target === overlay) document.body.removeChild(overlay); 909 }); 910 911 var style = document.createElement('style'); 912 style.textContent = '@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}'; 913 document.head.appendChild(style); 914 } 915 916 function showStep1(content, footer, steps, overlay) { 917 content.innerHTML = 918 '<h3 style="margin:0 0 8px;font-size:18px;font-weight:600;color:#152A53;">' + '<?php echo esc_js(__('Transform Your Site Search', 'searchjet-instant-search')); ?>' + '</h3>' + 919 '<p style="margin:0 0 20px;font-size:14px;color:#6c757d;">' + '<?php echo esc_js(__('Here\'s what SearchJet brings to your site:', 'searchjet-instant-search')); ?>' + '</p>' + 920 '<div style="display:flex;flex-direction:column;gap:10px;margin-bottom:20px;">' + 921 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #2563eb;">' + 922 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#2563eb,#667eea);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-zap2-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 923 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('Lightning Fast', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Instant search results as users type', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 924 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #667eea;">' + 925 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-clock-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 926 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('AI-Powered', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Smart typo tolerance and relevance ranking', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 927 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #28a745;">' + 928 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#28a745,#20c997);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-barchart2-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 929 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('Analytics', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Track search performance and insights', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 930 '</div>'; 931 932 footer.innerHTML = '<button class="searchjet-btn searchjet-btn-primary" id="wiz-next" style="width:100%;padding:14px;font-size:15px;">' + '<?php echo esc_js(__('Continue to Setup', 'searchjet-instant-search')); ?>' + '</button>'; 933 934 var next = footer.querySelector('#wiz-next'); 935 if (next) { 936 next.onclick = function() { 937 steps.querySelector('[data-step="1"]').style.background = '#28a745'; 938 steps.querySelector('[data-step="2"]').style.background = '#2563eb'; 939 showStep2(content, footer, steps, overlay); 940 }; 941 } 942 } 943 944 function showStep2(content, footer, steps, overlay) { 945 content.innerHTML = 946 '<h3 style="margin:0 0 8px;font-size:18px;font-weight:600;color:#152A53;">' + '<?php echo esc_js(__('Connect to SearchJet', 'searchjet-instant-search')); ?>' + '</h3>' + 947 '<p style="margin:0 0 16px;font-size:14px;color:#6c757d;">' + '<?php echo esc_js(__('Enter your API key to link your site with SearchJet\'s search engine.', 'searchjet-instant-search')); ?>' + '</p>' + 948 '<div style="background:#f0f7ff;border:1px solid #bfdbfe;border-radius:10px;padding:16px;margin-bottom:20px;display:flex;gap:12px;align-items:flex-start;">' + 949 '<img src="' + searchjetImgUrl + 'dash-help-blue.svg" alt="" width="20" height="20" style="display:block;flex-shrink:0;margin-top:1px;">' + 950 '<div><strong style="font-size:13px;color:#1e40af;display:block;margin-bottom:2px;">' + '<?php echo esc_js(__('Don\'t have an account?', 'searchjet-instant-search')); ?>' + '</strong>' + 951 '<span style="font-size:13px;color:#2563eb;"><a href="https://app.searchjetengine.com/register" target="_blank" style="color:#2563eb;font-weight:500;">' + '<?php echo esc_js(__('Sign up free', 'searchjet-instant-search')); ?>' + '</a> ' + '<?php echo esc_js(__('— no credit card required', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 952 '<div style="margin-bottom:4px;">' + 953 '<label style="font-size:14px;font-weight:600;color:#212529;display:block;margin-bottom:6px;">' + '<?php echo esc_js(__('API Key', 'searchjet-instant-search')); ?>' + '</label>' + 954 '<input type="text" id="wizard-api-key" placeholder="' + '<?php echo esc_js(__('Paste your API key here', 'searchjet-instant-search')); ?>' + '" style="width:100%;padding:14px 16px;border:2px solid #e9ecef;border-radius:10px;font-size:14px;box-sizing:border-box;transition:border-color 0.2s;" onfocus="this.style.borderColor=\'#2563eb\'" onblur="this.style.borderColor=\'#e9ecef\'">' + 955 '<p style="margin:6px 0 0;font-size:12px;color:#6c757d;">' + '<?php echo esc_js(__('Found at', 'searchjet-instant-search')); ?>' + ' <a href="https://app.searchjetengine.com/dashboard" target="_blank" style="color:#2563eb;">app.searchjetengine.com/dashboard</a></p>' + 956 '</div>'; 957 958 footer.innerHTML = '<div style="display:flex;gap:10px;">' + 959 '<button id="wiz-back" class="searchjet-btn searchjet-btn-secondary" style="flex:1;padding:14px;font-size:14px;">' + '<?php echo esc_js(__('Back', 'searchjet-instant-search')); ?>' + '</button>' + 960 '<button id="wiz-save" class="searchjet-btn searchjet-btn-primary" style="flex:3;padding:14px;font-size:14px;position:relative;">' + '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>' + '</button>' + 961 '</div>'; 962 963 document.getElementById('wiz-back').onclick = function() { 964 steps.querySelector('[data-step="2"]').style.background = '#e9ecef'; 965 steps.querySelector('[data-step="1"]').style.background = '#2563eb'; 966 showStep1(content, footer, steps, overlay); 967 }; 968 969 document.getElementById('wiz-save').onclick = function() { 970 var key = document.getElementById('wizard-api-key').value.trim(); 971 if (!key) { 972 document.getElementById('wizard-api-key').style.borderColor = '#dc3545'; 973 document.getElementById('wizard-api-key').placeholder = '<?php echo esc_js(__('Please enter your API key', 'searchjet-instant-search')); ?>'; 974 return; 975 } 976 var btn = document.getElementById('wiz-save'); 977 btn.disabled = true; 978 btn.textContent = '<?php echo esc_js(__('Saving...', 'searchjet-instant-search')); ?>'; 979 jQuery.post(ajaxurl, { 980 action: 'searchjet_save_api_key', 981 nonce: '<?php echo esc_js(wp_create_nonce('searchjet_wizard_nonce')); ?>', 982 api_key: key 983 }, function(response) { 984 if (response.success) { 985 window.location.href = '<?php echo esc_js(admin_url('admin.php?page=searchjet-settings')); ?>'; 986 } else { 987 btn.disabled = false; 988 btn.textContent = '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>'; 989 alert(response.data.message || '<?php echo esc_js(__('Failed to save API key', 'searchjet-instant-search')); ?>'); 990 } 991 }).fail(function() { 992 btn.disabled = false; 993 btn.textContent = '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>'; 994 alert('<?php echo esc_js(__('Connection error. Please try again.', 'searchjet-instant-search')); ?>'); 995 }); 996 }; 997 } 998 }); 999 </script> 588 <?php DashboardScripts::renderInlineScripts(); ?> 1000 589 <?php 1001 590 } … … 1127 716 } 1128 717 1129 public static function maybeRenderChatbot(): void {1130 $screen = get_current_screen();1131 if (!$screen || strpos($screen->id, 'searchjet') === false) return;1132 if (!current_user_can('manage_options')) return;1133 1134 $faqs = [1135 ['q' => __('How do I get an API key?', 'searchjet-instant-search'),1136 'a' => __('Sign up free at app.searchjetengine.com/register (no credit card required). Copy your API key from the dashboard and paste it in SearchJet → Settings.', 'searchjet-instant-search'),1137 'l' => 'https://app.searchjetengine.com/register'],1138 ['q' => __('How do I connect SearchJet to my site?', 'searchjet-instant-search'),1139 'a' => __('Go to SearchJet → Settings, paste your API key, and click Save Settings. The connection status will update automatically.', 'searchjet-instant-search'),1140 'l' => admin_url('admin.php?page=searchjet-settings')],1141 ['q' => __('How do I index my content?', 'searchjet-instant-search'),1142 'a' => __('Go to SearchJet → Indexing and click "Start Indexing". SearchJet will automatically index your posts, pages, and products. You can also use Bulk Re-Index for targeted reindexing.', 'searchjet-instant-search'),1143 'l' => admin_url('admin.php?page=searchjet-indexing')],1144 ['q' => __('How long does indexing take?', 'searchjet-instant-search'),1145 'a' => __('For most sites, initial indexing completes within a few minutes. Large sites (10,000+ documents) may take longer. You can monitor progress in Task History.', 'searchjet-instant-search'),1146 'l' => admin_url('admin.php?page=searchjet-task-history')],1147 ['q' => __('How do I customize the search UI?', 'searchjet-instant-search'),1148 'a' => __('Go to SearchJet → Search UI to customize theme style, colors, display options (thumbnail, price, category, excerpt, rating, stock), and see a live preview of your changes.', 'searchjet-instant-search'),1149 'l' => admin_url('admin.php?page=searchjet-search-ui')],1150 ['q' => __('Does SearchJet work with WooCommerce?', 'searchjet-instant-search'),1151 'a' => __('Yes! SearchJet fully supports WooCommerce product search, including thumbnails, prices, ratings, stock status, and category filtering.', 'searchjet-instant-search'),1152 'l' => 'https://searchjetengine.com/docs/woocommerce'],1153 ['q' => __('What is Bulk Re-Index?', 'searchjet-instant-search'),1154 'a' => __('Bulk Re-Index lets you refresh your search index in three modes: Global Sync (everything), Targeted Sync (specific post types), and Differential Sync (specific date range).', 'searchjet-instant-search'),1155 'l' => admin_url('admin.php?page=searchjet-bulk-reindex')],1156 ['q' => __('What are AI Agents?', 'searchjet-instant-search'),1157 'a' => __('AI Agents are intelligent assistants for managing search. They include Configuration agents (setup), Content Analysis agents (quality scoring), and Merchandising agents (boost rules, synonyms).', 'searchjet-instant-search'),1158 'l' => admin_url('admin.php?page=searchjet-agents')],1159 ['q' => __('How do I view search analytics?', 'searchjet-instant-search'),1160 'a' => __('Go to SearchJet → Analytics to see search volume, top queries, zero-result queries, indexed documents, and reindex activity.', 'searchjet-instant-search'),1161 'l' => admin_url('admin.php?page=searchjet-analytics')],1162 ['q' => __('What plans are available?', 'searchjet-instant-search'),1163 'a' => __('Free: 10,000 searches/mo, 1,000 pages, 50 AI answers. Pro ($19/mo): 50,000 searches, 25,000 pages, semantic search. Growth ($79/mo): 250,000 searches, 100,000 pages. Enterprise ($299/mo): unlimited everything.', 'searchjet-instant-search'),1164 'l' => 'https://searchjetengine.com/pricing'],1165 ['q' => __('What is the free tier?', 'searchjet-instant-search'),1166 'a' => __('The free tier includes 10,000 searches/month, 1,000 indexed pages, 1 site, 7 days analytics, and 50 AI answers/month. No credit card required.', 'searchjet-instant-search'),1167 'l' => 'https://searchjetengine.com/pricing'],1168 ['q' => __('What does the Pro plan include?', 'searchjet-instant-search'),1169 'a' => __('Pro ($19/mo) includes 50,000 searches/month, 25,000 indexed pages, 5 sites, 30 days analytics, 500 AI answers/month, 8 reindexes/day, AI Semantic Search, and 24h priority support.', 'searchjet-instant-search'),1170 'l' => 'https://searchjetengine.com/pricing'],1171 ['q' => __('What does the Growth plan include?', 'searchjet-instant-search'),1172 'a' => __('Growth ($79/mo) includes 250,000 searches/month, 100,000 indexed pages, 3 sites, 90 days analytics, 5,000 AI answers/month, 20 reindexes/day, AI Semantic Search, and 4h priority support.', 'searchjet-instant-search'),1173 'l' => 'https://searchjetengine.com/pricing'],1174 ['q' => __('What does the Enterprise plan include?', 'searchjet-instant-search'),1175 'a' => __('Enterprise ($299/mo) includes unlimited searches, pages, sites, and analytics. 100,000 AI answers/month, unlimited reindexes, AI Semantic Search, 1h priority support, and a dedicated instance.', 'searchjet-instant-search'),1176 'l' => 'https://searchjetengine.com/pricing'],1177 ['q' => __('How do I upgrade my plan?', 'searchjet-instant-search'),1178 'a' => __('Visit searchjetengine.com/pricing to compare plans and upgrade. Your new limits activate instantly after payment.', 'searchjet-instant-search'),1179 'l' => 'https://searchjetengine.com/pricing'],1180 ['q' => __('What post types are indexed?', 'searchjet-instant-search'),1181 'a' => __('By default, SearchJet indexes posts, pages, and products (if WooCommerce is active). You can configure additional post types in Index Settings.', 'searchjet-instant-search'),1182 'l' => admin_url('admin.php?page=searchjet-index-settings')],1183 ['q' => __('How do I check index health?', 'searchjet-instant-search'),1184 'a' => __('Go to SearchJet → Index Health to monitor index status, error rates, document counts, and last sync times for each content type.', 'searchjet-instant-search'),1185 'l' => admin_url('admin.php?page=searchjet-index-health')],1186 ['q' => __('Can I use SearchJet with other search plugins?', 'searchjet-instant-search'),1187 'a' => __('SearchJet replaces WordPress default search. Disable other search plugins first if needed. Toggle "Disable Search Override" in Settings to fall back.', 'searchjet-instant-search'),1188 'l' => admin_url('admin.php?page=searchjet-settings')],1189 ['q' => __('How do I contact support?', 'searchjet-instant-search'),1190 'a' => __('Visit searchjetengine.com/contact for support. For documentation and guides, check searchjetengine.com/docs/.', 'searchjet-instant-search'),1191 'l' => 'https://searchjetengine.com/contact'],1192 ];1193 1194 ?>1195 <div class="searchjet-chatbot-float">1196 <div class="searchjet-chatbot-panel" id="searchjet-chatbot-panel">1197 <div class="searchjet-chatbot-panel-header">1198 <div class="sj-chatbot-header-avatar">1199 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-search-white.svg'); ?>" alt="" width="22" height="22" style="display:block;">1200 </div>1201 <div>1202 <h3><?php esc_html_e('SearchJet AI Bot', 'searchjet-instant-search'); ?></h3>1203 <span class="sj-chatbot-status"><?php esc_html_e('Ask me anything about SearchJet', 'searchjet-instant-search'); ?></span>1204 </div>1205 <button class="searchjet-chatbot-close" id="searchjet-chatbot-close">×</button>1206 </div>1207 <div class="searchjet-chatbot-panel-body" id="searchjet-chatbot-body">1208 <div class="searchjet-chatbot-message bot">1209 <div class="avatar sj-avatar-bot">1210 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-search-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1211 </div>1212 <div class="bubble"><?php esc_html_e('Hi! I\'m SearchJet Assistant. How can I help you today?', 'searchjet-instant-search'); ?></div>1213 </div>1214 <div class="sj-quick-questions" id="sj-quick-questions">1215 <button class="sj-quick-btn" data-query="How do I get started?">1216 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-rocket.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Getting Started', 'searchjet-instant-search'); ?>1217 </button>1218 <button class="sj-quick-btn" data-query="How do I index content?">1219 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-package.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Indexing', 'searchjet-instant-search'); ?>1220 </button>1221 <button class="sj-quick-btn" data-query="What plans are available?">1222 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-gem.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Plans & Pricing', 'searchjet-instant-search'); ?>1223 </button>1224 <button class="sj-quick-btn" data-query="How do I customize search UI?">1225 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-palette.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Customize UI', 'searchjet-instant-search'); ?>1226 </button>1227 <button class="sj-quick-btn" data-query="WooCommerce integration">1228 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-cart.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('WooCommerce', 'searchjet-instant-search'); ?>1229 </button>1230 <button class="sj-quick-btn" data-query="How do I contact support?">1231 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-chat.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Support', 'searchjet-instant-search'); ?>1232 </button>1233 </div>1234 <div id="searchjet-chatbot-matches"></div>1235 <div id="searchjet-chatbot-noresult" style="display:none;">1236 <div class="searchjet-chatbot-message bot">1237 <div class="avatar sj-avatar-bot">1238 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-help-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1239 </div>1240 <div class="bubble"><?php esc_html_e('I couldn\'t find a specific answer. Try these resources:', 'searchjet-instant-search'); ?></div>1241 </div>1242 <div class="searchjet-chatbot-links">1243 <a href="https://searchjetengine.com/docs/" target="_blank" class="searchjet-chatbot-link">1244 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-book-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1245 <?php esc_html_e('Full Documentation', 'searchjet-instant-search'); ?>1246 </a>1247 <a href="https://searchjetengine.com/contact" target="_blank" class="searchjet-chatbot-link">1248 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-phone-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1249 <?php esc_html_e('Contact Support', 'searchjet-instant-search'); ?>1250 </a>1251 <a href="<?php echo esc_url(admin_url('admin.php?page=searchjet-docs')); ?>" class="searchjet-chatbot-link">1252 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-help-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1253 <?php esc_html_e('Plugin Docs Hub', 'searchjet-instant-search'); ?>1254 </a>1255 </div>1256 </div>1257 </div>1258 <div class="searchjet-chatbot-panel-footer">1259 <input type="text" id="searchjet-chatbot-input" placeholder="<?php esc_attr_e('Type your question...', 'searchjet-instant-search'); ?>" autocomplete="off">1260 <button id="searchjet-chatbot-send">1261 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-send-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1262 </button>1263 </div>1264 </div>1265 <div class="searchjet-chatbot-tooltip" id="searchjet-chatbot-tooltip"><?php esc_html_e('Need help? I\'m here for you!', 'searchjet-instant-search'); ?></div>1266 <button class="searchjet-chatbot-btn" id="searchjet-chatbot-btn" aria-label="<?php esc_attr_e('Open help chat', 'searchjet-instant-search'); ?>">1267 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-message-white.svg'); ?>" alt="" width="24" height="24" style="display:block;">1268 <span class="sj-chatbot-badge" id="sj-chatbot-badge">1</span>1269 </button>1270 </div>1271 1272 <script>1273 var searchjetFAQ = <?php echo wp_json_encode($faqs, JSON_UNESCAPED_UNICODE); ?>;1274 var searchjetAdminUrl = <?php echo wp_json_encode(admin_url('/')); ?>;1275 </script>1276 <script>1277 document.addEventListener('DOMContentLoaded', function() {1278 var chatBtn = document.getElementById('searchjet-chatbot-btn');1279 var chatPanel = document.getElementById('searchjet-chatbot-panel');1280 var chatClose = document.getElementById('searchjet-chatbot-close');1281 var chatInput = document.getElementById('searchjet-chatbot-input');1282 var chatSend = document.getElementById('searchjet-chatbot-send');1283 var matchesDiv = document.getElementById('searchjet-chatbot-matches');1284 var noresultDiv = document.getElementById('searchjet-chatbot-noresult');1285 var quickBtns = document.querySelectorAll('.sj-quick-btn');1286 var badge = document.getElementById('sj-chatbot-badge');1287 1288 function playNotifSound() {1289 try {1290 var ctx = new (window.AudioContext || window.webkitAudioContext)();1291 var osc = ctx.createOscillator();1292 var gain = ctx.createGain();1293 osc.connect(gain);1294 gain.connect(ctx.destination);1295 osc.frequency.value = 880;1296 osc.type = 'sine';1297 gain.gain.setValueAtTime(0.15, ctx.currentTime);1298 gain.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.3);1299 osc.start(ctx.currentTime);1300 osc.stop(ctx.currentTime + 0.3);1301 setTimeout(function() {1302 var osc2 = ctx.createOscillator();1303 var gain2 = ctx.createGain();1304 osc2.connect(gain2);1305 gain2.connect(ctx.destination);1306 osc2.frequency.value = 1320;1307 osc2.type = 'sine';1308 gain2.gain.setValueAtTime(0.12, ctx.currentTime);1309 gain2.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.25);1310 osc2.start(ctx.currentTime);1311 osc2.stop(ctx.currentTime + 0.25);1312 }, 150);1313 } catch(e) {}1314 }1315 1316 function togglePanel(open) {1317 if (!chatPanel) return;1318 chatPanel.classList.toggle('open', open);1319 if (open) {1320 if (badge) badge.style.display = 'none';1321 if (chatInput) chatInput.focus();1322 }1323 }1324 1325 if (chatBtn && chatPanel) {1326 chatBtn.addEventListener('click', function() {1327 togglePanel(!chatPanel.classList.contains('open'));1328 });1329 }1330 if (chatClose && chatPanel) {1331 chatClose.addEventListener('click', function() { togglePanel(false); });1332 }1333 document.addEventListener('click', function(e) {1334 if (chatPanel && chatPanel.classList.contains('open')) {1335 var f = document.querySelector('.searchjet-chatbot-float');1336 if (f && !f.contains(e.target)) togglePanel(false);1337 }1338 });1339 1340 quickBtns.forEach(function(btn) {1341 btn.addEventListener('click', function() {1342 var query = this.getAttribute('data-query');1343 if (chatInput) chatInput.value = query;1344 searchFAQ(query);1345 quickBtns.forEach(function(b) { b.classList.remove('sj-quick-active'); });1346 btn.classList.add('sj-quick-active');1347 });1348 });1349 1350 function searchFAQ(query) {1351 if (!matchesDiv || !noresultDiv) return;1352 var q = query.toLowerCase().trim();1353 if (!q) {1354 matchesDiv.innerHTML = '';1355 noresultDiv.style.display = 'none';1356 quickBtns.forEach(function(b) { b.classList.remove('sj-quick-active'); });1357 return;1358 }1359 var words = q.split(/\s+/).filter(Boolean);1360 var scored = searchjetFAQ.map(function(f) {1361 var haystack = (f.q + ' ' + f.a).toLowerCase();1362 var score = 0;1363 words.forEach(function(w) {1364 if (haystack.indexOf(w) > -1) score += 1;1365 });1366 return { faq: f, score: score };1367 }).filter(function(s) { return s.score > 0; });1368 scored.sort(function(a, b) { return b.score - a.score; });1369 var top = scored.slice(0, 3);1370 if (top.length === 0) {1371 matchesDiv.innerHTML = '';1372 noresultDiv.style.display = 'block';1373 return;1374 }1375 noresultDiv.style.display = 'none';1376 matchesDiv.innerHTML = top.map(function(s) {1377 var faq = s.faq;1378 var link = faq.l && faq.l.indexOf('http') === 0 ? faq.l : (searchjetAdminUrl.replace(/\/+$/, '') + '/' + (faq.l || '').replace(/^\//, ''));1379 var isExternal = faq.l && faq.l.indexOf('http') === 0;1380 return '<div class="searchjet-chatbot-message bot sj-msg-animate">' +1381 '<div class="avatar sj-avatar-bot"><img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="16" height="16" style="display:block;"></div>' +1382 '<div class="bubble"><strong>' + faq.q + '</strong><br>' + faq.a +1383 (link ? ' <a href="' + link + '" ' + (isExternal ? 'target="_blank"' : '') + ' class="sj-learn-more">' + '<?php echo esc_js(__('Learn more', 'searchjet-instant-search')); ?>' + ' →</a>' : '') +1384 '</div></div>';1385 }).join('');1386 }1387 1388 var debounceTimer;1389 if (chatInput) {1390 chatInput.addEventListener('input', function() {1391 clearTimeout(debounceTimer);1392 debounceTimer = setTimeout(function() { searchFAQ(chatInput.value); }, 200);1393 });1394 chatInput.addEventListener('keydown', function(e) {1395 if (e.key === 'Enter') searchFAQ(chatInput.value);1396 });1397 }1398 if (chatSend) {1399 chatSend.addEventListener('click', function() {1400 if (chatInput) searchFAQ(chatInput.value);1401 });1402 }1403 1404 var hasSeenHelp = localStorage.getItem('searchjet_help_seen');1405 if (!hasSeenHelp) {1406 localStorage.setItem('searchjet_help_seen', '1');1407 setTimeout(function() {1408 playNotifSound();1409 togglePanel(true);1410 if (badge) badge.style.display = 'flex';1411 }, 1200);1412 }1413 });1414 </script>1415 <?php1416 }1417 718 } -
searchjet-instant-search/tags/2.0.6/trunk/includes/Admin/DocumentationPage.php
r3673342 r3772659 97 97 <p><?php esc_html_e('Get up and running in minutes. Install, connect, and start searching.', 'searchjet-instant-search'); ?></p> 98 98 </a> 99 <a href="https://searchjetengine.com/docs/guides/get-started/admin-panel-guide/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">100 <div class="searchjet-docs-card-icon">101 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-gear.svg'); ?>" alt="" width="24" height="24" style="display:block;">102 </div>103 <h3><?php esc_html_e('Admin Panel Guide', 'searchjet-instant-search'); ?></h3>104 <p><?php esc_html_e('Learn how to configure settings, manage exclusions, and customize your search.', 'searchjet-instant-search'); ?></p>105 </a>106 <a href="https://searchjetengine.com/docs/guides/features/searchjet-connect/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">107 <div class="searchjet-docs-card-icon">108 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-link.svg'); ?>" alt="" width="24" height="24" style="display:block;">109 </div>110 <h3><?php esc_html_e('SearchJet Connect', 'searchjet-instant-search'); ?></h3>111 <p><?php esc_html_e('Connect multiple sites to a single SearchJet account for unified management.', 'searchjet-instant-search'); ?></p>112 </a>113 <a href="https://searchjetengine.com/docs/guides/features/ai-agents/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">114 <div class="searchjet-docs-card-icon">115 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-robot.svg'); ?>" alt="" width="24" height="24" style="display:block;">116 </div>117 <h3><?php esc_html_e('AI Agents', 'searchjet-instant-search'); ?></h3>118 <p><?php esc_html_e('Create intelligent automation agents to optimize your search experience.', 'searchjet-instant-search'); ?></p>119 </a>120 <a href="https://searchjetengine.com/docs/guides/features/roadmap/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">121 <div class="searchjet-docs-card-icon">122 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-map.svg'); ?>" alt="" width="24" height="24" style="display:block;">123 </div>124 <h3><?php esc_html_e('Roadmap', 'searchjet-instant-search'); ?></h3>125 <p><?php esc_html_e('See what features are coming and vote on what matters most to you.', 'searchjet-instant-search'); ?></p>126 </a>127 <a href="https://searchjetengine.com/docs/guides/troubleshooting/common-issues/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">128 <div class="searchjet-docs-card-icon">129 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-wrench.svg'); ?>" alt="" width="24" height="24" style="display:block;">130 </div>131 <h3><?php esc_html_e('Troubleshooting', 'searchjet-instant-search'); ?></h3>132 <p><?php esc_html_e('Solutions to common issues and answers to frequently asked questions.', 'searchjet-instant-search'); ?></p>133 </a>134 99 </div> 135 100 -
searchjet-instant-search/tags/2.0.6/trunk/readme.txt
r3694855 r3772659 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.0. 57 Stable tag: 2.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 134 134 135 135 == Changelog == 136 137 = 2.0.6 = 138 * **IMPROVEMENT** - Streamlined the in-plugin Documentation page by removing the Admin Panel Guide, SearchJet Connect, AI Agents, Roadmap, and Troubleshooting cards 136 139 137 140 = 2.0.5 = -
searchjet-instant-search/tags/2.0.6/trunk/searchjet.php
r3694855 r3772659 4 4 * Plugin URI: https://searchjetengine.com/ 5 5 * Description: AI-powered instant search for WooCommerce & WordPress. Supports SKUs, smart filters, typo-tolerance & GA4 tracking. 6 * Version: 2.0. 56 * Version: 2.0.6 7 7 * Author: Maidul 8 8 * Author URI: https://searchjetengine.com/ … … 24 24 } 25 25 // Define plugin constants 26 define('SEARCHJET_VERSION', '2.0. 5');27 define('SEARCHJET_PLUGIN_VERSION', '2.0. 5');26 define('SEARCHJET_VERSION', '2.0.6'); 27 define('SEARCHJET_PLUGIN_VERSION', '2.0.6'); 28 28 define('SEARCHJET_PLUGIN_FILE', __FILE__); 29 29 define('SEARCHJET_PLUGIN_DIR', plugin_dir_path(__FILE__)); -
searchjet-instant-search/trunk/includes/Admin/DashboardPage.php
r3673342 r3772659 13 13 add_action('admin_enqueue_scripts', [self::class, 'enqueueAssets']); 14 14 add_action('admin_head', [self::class, 'hideSecondaryMenuItems']); 15 add_action('admin_footer', [self::class, 'maybeRenderChatbot']);16 15 add_action('wp_ajax_searchjet_save_api_key', [self::class, 'ajaxSaveApiKey']); 16 17 DashboardChatbot::init(); 17 18 } 18 19 … … 585 586 </div> 586 587 587 <!-- Live Search Journey --> 588 <script> 589 var searchjetImgUrl = '<?php echo esc_js(SEARCHJET_PLUGIN_URL . 'assets/img/'); ?>'; 590 var sampleQueries = [ 591 { typed: 'wirelss headphnes', corrected: 'wireless headphones', results: [ 592 { icon: 'dash-product-headphones', title: 'Wireless Headphones Pro', rating: '★★★★☆', reviews: '128', price: '$79.99', stock: 'In Stock', category: 'Electronics > Audio > Headphones' }, 593 { icon: 'dash-product-music', title: 'Wireless Earbuds Mini', rating: '★★★★★', reviews: '89', price: '$49.99', stock: 'In Stock', category: 'Electronics > Audio > Earbuds' } 594 ]}, 595 { typed: 'runing shoess', corrected: 'running shoes', results: [ 596 { icon: 'dash-product-shoe', title: 'Running Shoes Ultra', rating: '★★★★★', reviews: '256', price: '$129.99', stock: 'In Stock', category: 'Sports > Footwear > Running' }, 597 { icon: 'dash-product-runner', title: 'Marathon Pro Trainer', rating: '★★★★☆', reviews: '184', price: '$99.99', stock: 'Low Stock', category: 'Sports > Footwear > Running' } 598 ]}, 599 { typed: 'offee mugs', corrected: 'coffee mugs', results: [ 600 { icon: 'dash-product-coffee', title: 'Ceramic Coffee Mug Set', rating: '★★★★★', reviews: '312', price: '$24.99', stock: 'In Stock', category: 'Kitchen > Drinkware > Mugs' }, 601 { icon: 'dash-product-teapot', title: 'Travel Coffee Tumbler', rating: '★★★★☆', reviews: '167', price: '$34.99', stock: 'In Stock', category: 'Kitchen > Drinkware > Travel' } 602 ]} 603 ]; 604 var currentQueryIndex = 0; 605 var journeyRunning = false; 606 var journeyAnimInterval = null; 607 608 function startJourneyAnim() { 609 if (journeyRunning) return; 610 journeyRunning = true; 611 step1(); 612 } 613 614 function stopJourneyAnim() { 615 journeyRunning = false; 616 if (journeyAnimInterval) { clearInterval(journeyAnimInterval); journeyAnimInterval = null; } 617 } 618 619 function step1() { 620 var q = sampleQueries[currentQueryIndex]; 621 var el = document.getElementById('searchjet-typed-text'); 622 var list = document.getElementById('searchjet-results-list'); 623 if (!el || !list) { journeyRunning = false; return; } 624 625 list.innerHTML = ''; 626 document.querySelectorAll('.searchjet-journey-processing-item .check').forEach(function(c) { 627 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;">'; 628 }); 629 630 var i = 0; 631 el.textContent = ''; 632 journeyAnimInterval = setInterval(function() { 633 if (i < q.typed.length) { el.textContent += q.typed[i]; i++; } 634 else { clearInterval(journeyAnimInterval); setTimeout(step2, 400); } 635 }, 60); 636 } 637 638 function step2() { 639 var items = ['searchjet-proc-typo', 'searchjet-proc-intent', 'searchjet-proc-rank']; 640 var idx = 0; 641 var pi = setInterval(function() { 642 if (idx < items.length) { 643 var el = document.getElementById(items[idx]); 644 if (el) { 645 var c = el.querySelector('.check'); 646 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-check-green.svg" alt="" width="16" height="16" style="display:block;">'; 647 } 648 idx++; 649 } else { clearInterval(pi); setTimeout(step3, 300); } 650 }, 350); 651 } 652 653 function step3() { 654 var q = sampleQueries[currentQueryIndex]; 655 var list = document.getElementById('searchjet-results-list'); 656 if (!list) { journeyRunning = false; return; } 657 658 list.innerHTML = ''; 659 q.results.forEach(function(r, i) { 660 setTimeout(function() { 661 var card = document.createElement('div'); 662 card.className = 'searchjet-journey-result-card'; 663 card.innerHTML = '<div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 664 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 665 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 666 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 667 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div>' + 668 '<div style="font-size:12px;color:#64748b;margin-top:4px;">' + r.category + '</div></div>'; 669 list.appendChild(card); 670 }, i * 200); 671 }); 672 673 setTimeout(function() { 674 currentQueryIndex = (currentQueryIndex + 1) % sampleQueries.length; 675 journeyRunning = false; 676 setTimeout(startJourneyAnim, 3500); 677 }, q.results.length * 200 + 500); 678 } 679 680 function showHowItWorksModal() { 681 var overlay = document.createElement('div'); 682 overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(21,42,83,0.6);z-index:100000;display:flex;align-items:center;justify-content:center;animation:fadeIn 0.2s ease;'; 683 684 var modal = document.createElement('div'); 685 modal.style.cssText = 'background:#fff;border-radius:16px;max-width:800px;width:92%;max-height:88vh;box-shadow:0 25px 60px rgba(0,0,0,0.3);overflow:hidden;transform:translateY(0);animation:slideUp 0.3s ease;display:flex;flex-direction:column;'; 686 687 var header = document.createElement('div'); 688 header.style.cssText = 'background:linear-gradient(135deg,#152A53,#2563eb);padding:24px 28px;position:relative;flex-shrink:0;'; 689 header.innerHTML = '<div style="display:flex;align-items:center;gap:12px;">' + 690 '<div style="width:40px;height:40px;background:rgba(255,255,255,0.15);border-radius:10px;display:flex;align-items:center;justify-content:center;">' + 691 '<img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="22" height="22" style="display:block;"></div>' + 692 '<div><h2 style="margin:0;font-size:20px;font-weight:700;color:white;"><?php echo esc_js(__('Welcome to SearchJet!', 'searchjet-instant-search')); ?></h2>' + 693 '<p style="margin:4px 0 0;font-size:13px;color:rgba(255,255,255,0.75);"><?php echo esc_js(__('Watch what happens when a visitor searches on your site', 'searchjet-instant-search')); ?></p></div></div>' + 694 '<button id="how-it-works-close" style="position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(255,255,255,0.15);color:white;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s;" onmouseover="this.style.background=\'rgba(255,255,255,0.25)\'" onmouseout="this.style.background=\'rgba(255,255,255,0.15)\'">×</button>'; 695 696 var body = document.createElement('div'); 697 body.style.cssText = 'padding:28px;overflow-y:auto;flex:1;'; 698 body.innerHTML = 699 '<div class="searchjet-journey">' + 700 '<div class="searchjet-journey-story">' + 701 '<div class="searchjet-journey-step" id="modal-step-typing">' + 702 '<div class="searchjet-journey-step-label"><span class="step-icon typing"><img src="' + searchjetImgUrl + 'dash-message-blue.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 1: Visitor Types', 'searchjet-instant-search')); ?></div>' + 703 '<div class="searchjet-journey-typing"><div class="searchjet-journey-searchbox"><span class="searchjet-journey-typed-text" id="modal-typed-text"></span><span class="cursor"></span></div></div>' + 704 '</div>' + 705 '<div class="searchjet-journey-arrow"><img src="' + searchjetImgUrl + 'dash-arrowdown-light.svg" alt="" width="24" height="24" style="display:block;"></div>' + 706 '<div class="searchjet-journey-step" id="modal-step-processing">' + 707 '<div class="searchjet-journey-step-label"><span class="step-icon processing"><img src="' + searchjetImgUrl + 'dash-clock-amber.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 2: AI Processing (~30ms)', 'searchjet-instant-search')); ?></div>' + 708 '<div class="searchjet-journey-processing-content">' + 709 '<div class="searchjet-journey-processing-item" id="modal-proc-typo"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('Typo detected: wirelss → wireless', 'searchjet-instant-search')); ?></span></div>' + 710 '<div class="searchjet-journey-processing-item" id="modal-proc-intent"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('Intent understood: headphones', 'searchjet-instant-search')); ?></span></div>' + 711 '<div class="searchjet-journey-processing-item" id="modal-proc-rank"><span class="check pending"><img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;"></span><span><?php echo esc_js(__('AI ranking by relevance + popularity', 'searchjet-instant-search')); ?></span></div>' + 712 '</div></div>' + 713 '<div class="searchjet-journey-arrow"><img src="' + searchjetImgUrl + 'dash-arrowdown-light.svg" alt="" width="24" height="24" style="display:block;"></div>' + 714 '<div class="searchjet-journey-step" id="modal-step-results">' + 715 '<div class="searchjet-journey-step-label"><span class="step-icon results"><img src="' + searchjetImgUrl + 'dash-trending-green.svg" alt="" width="18" height="18" style="display:block;"></span><?php echo esc_js(__('Step 3: Results Appear (instantly)', 'searchjet-instant-search')); ?></div>' + 716 '<div class="searchjet-journey-results-list" id="modal-results-list"></div>' + 717 '</div></div>' + 718 '<div class="searchjet-journey-demo">' + 719 '<div class="searchjet-journey-demo-header"><h4><img src="' + searchjetImgUrl + 'dash-search-dark.svg" alt="" width="18" height="18" style="display:block;"><?php echo esc_js(__('Try It Yourself', 'searchjet-instant-search')); ?></h4><span class="try-badge"><?php echo esc_js(__('Interactive', 'searchjet-instant-search')); ?></span></div>' + 720 '<div class="searchjet-journey-demo-input-wrapper"><img class="searchjet-journey-demo-search-icon" src="' + searchjetImgUrl + 'dash-search-light.svg" alt="" width="20" height="20" style="display:block;"><input type="text" class="searchjet-journey-demo-input" id="modal-demo-search" placeholder="<?php echo esc_attr__('Try searching: wireless headphones, running shoes, coffee...', 'searchjet-instant-search'); ?>" /></div>' + 721 '<div class="searchjet-journey-demo-results" id="modal-demo-results"></div>' + 722 '</div>' + 723 '<div class="searchjet-journey-stats">' + 724 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-zap2-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><50ms</div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Search Speed', 'searchjet-instant-search')); ?></div></div>' + 725 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-activity-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value">99.9%</div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Uptime', 'searchjet-instant-search')); ?></div></div>' + 726 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-clock-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><?php echo esc_js(__('AI', 'searchjet-instant-search')); ?></div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Powered', 'searchjet-instant-search')); ?></div></div>' + 727 '<div class="searchjet-journey-stat"><div class="searchjet-journey-stat-icon"><img src="' + searchjetImgUrl + 'dash-monitor-dark.svg" alt="" width="20" height="20" style="display:block;"></div><div class="searchjet-journey-stat-value"><?php echo esc_js(__('Mobile', 'searchjet-instant-search')); ?></div><div class="searchjet-journey-stat-label"><?php echo esc_js(__('Optimized', 'searchjet-instant-search')); ?></div></div>' + 728 '</div></div>'; 729 730 modal.appendChild(header); 731 modal.appendChild(body); 732 overlay.appendChild(modal); 733 document.body.appendChild(overlay); 734 735 document.getElementById('how-it-works-close').onclick = function() { 736 document.body.removeChild(overlay); 737 stopJourneyAnim(); 738 }; 739 overlay.addEventListener('click', function(e) { 740 if (e.target === overlay) { 741 document.body.removeChild(overlay); 742 stopJourneyAnim(); 743 } 744 }); 745 746 setTimeout(startModalJourneyAnim, 300); 747 748 var demoInput = document.getElementById('modal-demo-search'); 749 if (demoInput) { 750 demoInput.addEventListener('input', function() { 751 var val = this.value.toLowerCase().trim(); 752 var rd = document.getElementById('modal-demo-results'); 753 if (!rd) return; 754 if (val.length < 2) { rd.innerHTML = ''; return; } 755 var all = []; 756 sampleQueries.forEach(function(q) { q.results.forEach(function(r) { all.push(r); }); }); 757 var m = all.filter(function(r) { return r.title.toLowerCase().indexOf(val) > -1 || r.category.toLowerCase().indexOf(val) > -1; }); 758 if (m.length === 0) { rd.innerHTML = '<div style="text-align:center;padding:16px;color:#64748b;font-size:14px;">No results found</div>'; return; } 759 rd.innerHTML = m.slice(0, 3).map(function(r) { 760 return '<div class="searchjet-journey-result-card"><div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 761 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 762 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 763 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 764 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div></div></div>'; 765 }).join(''); 766 }); 767 } 768 } 769 770 var modalQueryIndex = 0; 771 var modalJourneyRunning = false; 772 773 function startModalJourneyAnim() { 774 if (modalJourneyRunning) return; 775 modalJourneyRunning = true; 776 modalStep1(); 777 } 778 779 function modalStep1() { 780 var q = sampleQueries[modalQueryIndex]; 781 var el = document.getElementById('modal-typed-text'); 782 var list = document.getElementById('modal-results-list'); 783 if (!el || !list) { modalJourneyRunning = false; return; } 784 785 list.innerHTML = ''; 786 document.querySelectorAll('#modal-step-processing .check').forEach(function(c) { 787 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-clock-gray.svg" alt="" width="16" height="16" style="display:block;">'; 788 }); 789 790 var i = 0; 791 el.textContent = ''; 792 var t = setInterval(function() { 793 if (i < q.typed.length) { el.textContent += q.typed[i]; i++; } 794 else { clearInterval(t); setTimeout(modalStep2, 400); } 795 }, 60); 796 } 797 798 function modalStep2() { 799 var items = ['modal-proc-typo', 'modal-proc-intent', 'modal-proc-rank']; 800 var idx = 0; 801 var pi = setInterval(function() { 802 if (idx < items.length) { 803 var el = document.getElementById(items[idx]); 804 if (el) { 805 var c = el.querySelector('.check'); 806 c.innerHTML = '<img src="' + searchjetImgUrl + 'dash-check-green.svg" alt="" width="16" height="16" style="display:block;">'; 807 } 808 idx++; 809 } else { clearInterval(pi); setTimeout(modalStep3, 300); } 810 }, 350); 811 } 812 813 function modalStep3() { 814 var q = sampleQueries[modalQueryIndex]; 815 var list = document.getElementById('modal-results-list'); 816 if (!list) { modalJourneyRunning = false; return; } 817 818 list.innerHTML = ''; 819 q.results.forEach(function(r, i) { 820 setTimeout(function() { 821 var card = document.createElement('div'); 822 card.className = 'searchjet-journey-result-card'; 823 card.innerHTML = '<div class="searchjet-journey-result-img"><img src="' + searchjetImgUrl + r.icon + '.svg" alt="" width="24" height="24" style="display:block;"></div>' + 824 '<div class="searchjet-journey-result-info"><div class="searchjet-journey-result-title">' + r.title + '</div>' + 825 '<div class="searchjet-journey-result-meta"><span class="searchjet-journey-result-rating">' + r.rating + '</span>' + 826 '<span>(' + r.reviews + ')</span><span class="searchjet-journey-result-price">' + r.price + '</span>' + 827 '<span class="searchjet-journey-result-stock">' + r.stock + '</span></div>' + 828 '<div style="font-size:12px;color:#64748b;margin-top:4px;">' + r.category + '</div></div>'; 829 list.appendChild(card); 830 }, i * 200); 831 }); 832 833 setTimeout(function() { 834 modalQueryIndex = (modalQueryIndex + 1) % sampleQueries.length; 835 modalJourneyRunning = false; 836 setTimeout(startModalJourneyAnim, 3500); 837 }, q.results.length * 200 + 500); 838 } 839 840 document.addEventListener('DOMContentLoaded', function() { 841 var showBtn = document.getElementById('searchjet-show-how-it-works'); 842 if (showBtn) { 843 showBtn.addEventListener('click', function() { 844 showHowItWorksModal(); 845 }); 846 } 847 848 var hasSeenWelcome = localStorage.getItem('searchjet_welcome_seen'); 849 if (!hasSeenWelcome) { 850 localStorage.setItem('searchjet_welcome_seen', '1'); 851 setTimeout(function() { 852 showSetupWizard(); 853 }, 800); 854 } 855 }); 856 </script> 857 858 <script> 859 document.addEventListener('DOMContentLoaded', function() { 860 var setupBtn = document.getElementById('searchjet-start-setup'); 861 if (setupBtn) { 862 setupBtn.addEventListener('click', function() { showSetupWizard(); }); 863 } 864 865 function showSetupWizard() { 866 var overlay = document.createElement('div'); 867 overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(21,42,83,0.6);z-index:100000;display:flex;align-items:center;justify-content:center;animation:fadeIn 0.2s ease;'; 868 869 var modal = document.createElement('div'); 870 modal.style.cssText = 'background:#fff;border-radius:16px;max-width:520px;width:90%;box-shadow:0 25px 60px rgba(0,0,0,0.3);overflow:hidden;transform:translateY(0);animation:slideUp 0.3s ease;'; 871 872 var header = document.createElement('div'); 873 header.style.cssText = 'background:linear-gradient(135deg,#152A53,#2563eb);padding:28px 28px 24px;position:relative;'; 874 header.innerHTML = '<div style="display:flex;align-items:center;gap:12px;margin-bottom:6px;">' + 875 '<div style="width:40px;height:40px;background:rgba(255,255,255,0.15);border-radius:10px;display:flex;align-items:center;justify-content:center;">' + 876 '<img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="22" height="22" style="display:block;"></div>' + 877 '<h2 style="margin:0;font-size:20px;font-weight:700;color:white;">' + '<?php echo esc_js(__('Welcome to SearchJet!', 'searchjet-instant-search')); ?>' + '</h2></div>' + 878 '<p style="margin:0;font-size:14px;color:rgba(255,255,255,0.75);">' + '<?php echo esc_js(__('Get AI-powered instant search running in 2 minutes', 'searchjet-instant-search')); ?>' + '</p>' + 879 '<button id="wizard-close" style="position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(255,255,255,0.15);color:white;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s;" onmouseover="this.style.background=\'rgba(255,255,255,0.25)\'" onmouseout="this.style.background=\'rgba(255,255,255,0.15)\'">×</button>'; 880 881 var body = document.createElement('div'); 882 body.style.cssText = 'padding:28px;'; 883 884 var steps = document.createElement('div'); 885 steps.style.cssText = 'display:flex;gap:8px;margin-bottom:24px;'; 886 steps.innerHTML = '<div class="wiz-step active" data-step="1" style="flex:1;height:4px;border-radius:2px;background:#2563eb;transition:background 0.3s;"></div>' + 887 '<div class="wiz-step" data-step="2" style="flex:1;height:4px;border-radius:2px;background:#e9ecef;transition:background 0.3s;"></div>'; 888 body.appendChild(steps); 889 890 var content = document.createElement('div'); 891 content.id = 'wiz-content'; 892 body.appendChild(content); 893 894 var footer = document.createElement('div'); 895 footer.id = 'wiz-footer'; 896 footer.style.cssText = 'padding:0 28px 28px;'; 897 body.appendChild(footer); 898 899 showStep1(content, footer, steps); 900 901 modal.appendChild(header); 902 modal.appendChild(body); 903 overlay.appendChild(modal); 904 document.body.appendChild(overlay); 905 906 document.getElementById('wizard-close').onclick = function() { document.body.removeChild(overlay); }; 907 overlay.addEventListener('click', function(e) { 908 if (e.target === overlay) document.body.removeChild(overlay); 909 }); 910 911 var style = document.createElement('style'); 912 style.textContent = '@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes slideUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}'; 913 document.head.appendChild(style); 914 } 915 916 function showStep1(content, footer, steps, overlay) { 917 content.innerHTML = 918 '<h3 style="margin:0 0 8px;font-size:18px;font-weight:600;color:#152A53;">' + '<?php echo esc_js(__('Transform Your Site Search', 'searchjet-instant-search')); ?>' + '</h3>' + 919 '<p style="margin:0 0 20px;font-size:14px;color:#6c757d;">' + '<?php echo esc_js(__('Here\'s what SearchJet brings to your site:', 'searchjet-instant-search')); ?>' + '</p>' + 920 '<div style="display:flex;flex-direction:column;gap:10px;margin-bottom:20px;">' + 921 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #2563eb;">' + 922 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#2563eb,#667eea);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-zap2-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 923 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('Lightning Fast', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Instant search results as users type', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 924 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #667eea;">' + 925 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-clock-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 926 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('AI-Powered', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Smart typo tolerance and relevance ranking', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 927 '<div style="display:flex;align-items:center;gap:14px;padding:14px 16px;background:#f8f9fa;border-radius:10px;border-left:3px solid #28a745;">' + 928 '<div style="width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#28a745,#20c997);display:flex;align-items:center;justify-content:center;flex-shrink:0;"><img src="' + searchjetImgUrl + 'dash-barchart2-white.svg" alt="" width="18" height="18" style="display:block;"></div>' + 929 '<div><strong style="display:block;font-size:14px;color:#212529;">' + '<?php echo esc_js(__('Analytics', 'searchjet-instant-search')); ?>' + '</strong><span style="font-size:13px;color:#6c757d;">' + '<?php echo esc_js(__('Track search performance and insights', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 930 '</div>'; 931 932 footer.innerHTML = '<button class="searchjet-btn searchjet-btn-primary" id="wiz-next" style="width:100%;padding:14px;font-size:15px;">' + '<?php echo esc_js(__('Continue to Setup', 'searchjet-instant-search')); ?>' + '</button>'; 933 934 var next = footer.querySelector('#wiz-next'); 935 if (next) { 936 next.onclick = function() { 937 steps.querySelector('[data-step="1"]').style.background = '#28a745'; 938 steps.querySelector('[data-step="2"]').style.background = '#2563eb'; 939 showStep2(content, footer, steps, overlay); 940 }; 941 } 942 } 943 944 function showStep2(content, footer, steps, overlay) { 945 content.innerHTML = 946 '<h3 style="margin:0 0 8px;font-size:18px;font-weight:600;color:#152A53;">' + '<?php echo esc_js(__('Connect to SearchJet', 'searchjet-instant-search')); ?>' + '</h3>' + 947 '<p style="margin:0 0 16px;font-size:14px;color:#6c757d;">' + '<?php echo esc_js(__('Enter your API key to link your site with SearchJet\'s search engine.', 'searchjet-instant-search')); ?>' + '</p>' + 948 '<div style="background:#f0f7ff;border:1px solid #bfdbfe;border-radius:10px;padding:16px;margin-bottom:20px;display:flex;gap:12px;align-items:flex-start;">' + 949 '<img src="' + searchjetImgUrl + 'dash-help-blue.svg" alt="" width="20" height="20" style="display:block;flex-shrink:0;margin-top:1px;">' + 950 '<div><strong style="font-size:13px;color:#1e40af;display:block;margin-bottom:2px;">' + '<?php echo esc_js(__('Don\'t have an account?', 'searchjet-instant-search')); ?>' + '</strong>' + 951 '<span style="font-size:13px;color:#2563eb;"><a href="https://app.searchjetengine.com/register" target="_blank" style="color:#2563eb;font-weight:500;">' + '<?php echo esc_js(__('Sign up free', 'searchjet-instant-search')); ?>' + '</a> ' + '<?php echo esc_js(__('— no credit card required', 'searchjet-instant-search')); ?>' + '</span></div></div>' + 952 '<div style="margin-bottom:4px;">' + 953 '<label style="font-size:14px;font-weight:600;color:#212529;display:block;margin-bottom:6px;">' + '<?php echo esc_js(__('API Key', 'searchjet-instant-search')); ?>' + '</label>' + 954 '<input type="text" id="wizard-api-key" placeholder="' + '<?php echo esc_js(__('Paste your API key here', 'searchjet-instant-search')); ?>' + '" style="width:100%;padding:14px 16px;border:2px solid #e9ecef;border-radius:10px;font-size:14px;box-sizing:border-box;transition:border-color 0.2s;" onfocus="this.style.borderColor=\'#2563eb\'" onblur="this.style.borderColor=\'#e9ecef\'">' + 955 '<p style="margin:6px 0 0;font-size:12px;color:#6c757d;">' + '<?php echo esc_js(__('Found at', 'searchjet-instant-search')); ?>' + ' <a href="https://app.searchjetengine.com/dashboard" target="_blank" style="color:#2563eb;">app.searchjetengine.com/dashboard</a></p>' + 956 '</div>'; 957 958 footer.innerHTML = '<div style="display:flex;gap:10px;">' + 959 '<button id="wiz-back" class="searchjet-btn searchjet-btn-secondary" style="flex:1;padding:14px;font-size:14px;">' + '<?php echo esc_js(__('Back', 'searchjet-instant-search')); ?>' + '</button>' + 960 '<button id="wiz-save" class="searchjet-btn searchjet-btn-primary" style="flex:3;padding:14px;font-size:14px;position:relative;">' + '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>' + '</button>' + 961 '</div>'; 962 963 document.getElementById('wiz-back').onclick = function() { 964 steps.querySelector('[data-step="2"]').style.background = '#e9ecef'; 965 steps.querySelector('[data-step="1"]').style.background = '#2563eb'; 966 showStep1(content, footer, steps, overlay); 967 }; 968 969 document.getElementById('wiz-save').onclick = function() { 970 var key = document.getElementById('wizard-api-key').value.trim(); 971 if (!key) { 972 document.getElementById('wizard-api-key').style.borderColor = '#dc3545'; 973 document.getElementById('wizard-api-key').placeholder = '<?php echo esc_js(__('Please enter your API key', 'searchjet-instant-search')); ?>'; 974 return; 975 } 976 var btn = document.getElementById('wiz-save'); 977 btn.disabled = true; 978 btn.textContent = '<?php echo esc_js(__('Saving...', 'searchjet-instant-search')); ?>'; 979 jQuery.post(ajaxurl, { 980 action: 'searchjet_save_api_key', 981 nonce: '<?php echo esc_js(wp_create_nonce('searchjet_wizard_nonce')); ?>', 982 api_key: key 983 }, function(response) { 984 if (response.success) { 985 window.location.href = '<?php echo esc_js(admin_url('admin.php?page=searchjet-settings')); ?>'; 986 } else { 987 btn.disabled = false; 988 btn.textContent = '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>'; 989 alert(response.data.message || '<?php echo esc_js(__('Failed to save API key', 'searchjet-instant-search')); ?>'); 990 } 991 }).fail(function() { 992 btn.disabled = false; 993 btn.textContent = '<?php echo esc_js(__('Save & Go to Settings', 'searchjet-instant-search')); ?>'; 994 alert('<?php echo esc_js(__('Connection error. Please try again.', 'searchjet-instant-search')); ?>'); 995 }); 996 }; 997 } 998 }); 999 </script> 588 <?php DashboardScripts::renderInlineScripts(); ?> 1000 589 <?php 1001 590 } … … 1127 716 } 1128 717 1129 public static function maybeRenderChatbot(): void {1130 $screen = get_current_screen();1131 if (!$screen || strpos($screen->id, 'searchjet') === false) return;1132 if (!current_user_can('manage_options')) return;1133 1134 $faqs = [1135 ['q' => __('How do I get an API key?', 'searchjet-instant-search'),1136 'a' => __('Sign up free at app.searchjetengine.com/register (no credit card required). Copy your API key from the dashboard and paste it in SearchJet → Settings.', 'searchjet-instant-search'),1137 'l' => 'https://app.searchjetengine.com/register'],1138 ['q' => __('How do I connect SearchJet to my site?', 'searchjet-instant-search'),1139 'a' => __('Go to SearchJet → Settings, paste your API key, and click Save Settings. The connection status will update automatically.', 'searchjet-instant-search'),1140 'l' => admin_url('admin.php?page=searchjet-settings')],1141 ['q' => __('How do I index my content?', 'searchjet-instant-search'),1142 'a' => __('Go to SearchJet → Indexing and click "Start Indexing". SearchJet will automatically index your posts, pages, and products. You can also use Bulk Re-Index for targeted reindexing.', 'searchjet-instant-search'),1143 'l' => admin_url('admin.php?page=searchjet-indexing')],1144 ['q' => __('How long does indexing take?', 'searchjet-instant-search'),1145 'a' => __('For most sites, initial indexing completes within a few minutes. Large sites (10,000+ documents) may take longer. You can monitor progress in Task History.', 'searchjet-instant-search'),1146 'l' => admin_url('admin.php?page=searchjet-task-history')],1147 ['q' => __('How do I customize the search UI?', 'searchjet-instant-search'),1148 'a' => __('Go to SearchJet → Search UI to customize theme style, colors, display options (thumbnail, price, category, excerpt, rating, stock), and see a live preview of your changes.', 'searchjet-instant-search'),1149 'l' => admin_url('admin.php?page=searchjet-search-ui')],1150 ['q' => __('Does SearchJet work with WooCommerce?', 'searchjet-instant-search'),1151 'a' => __('Yes! SearchJet fully supports WooCommerce product search, including thumbnails, prices, ratings, stock status, and category filtering.', 'searchjet-instant-search'),1152 'l' => 'https://searchjetengine.com/docs/woocommerce'],1153 ['q' => __('What is Bulk Re-Index?', 'searchjet-instant-search'),1154 'a' => __('Bulk Re-Index lets you refresh your search index in three modes: Global Sync (everything), Targeted Sync (specific post types), and Differential Sync (specific date range).', 'searchjet-instant-search'),1155 'l' => admin_url('admin.php?page=searchjet-bulk-reindex')],1156 ['q' => __('What are AI Agents?', 'searchjet-instant-search'),1157 'a' => __('AI Agents are intelligent assistants for managing search. They include Configuration agents (setup), Content Analysis agents (quality scoring), and Merchandising agents (boost rules, synonyms).', 'searchjet-instant-search'),1158 'l' => admin_url('admin.php?page=searchjet-agents')],1159 ['q' => __('How do I view search analytics?', 'searchjet-instant-search'),1160 'a' => __('Go to SearchJet → Analytics to see search volume, top queries, zero-result queries, indexed documents, and reindex activity.', 'searchjet-instant-search'),1161 'l' => admin_url('admin.php?page=searchjet-analytics')],1162 ['q' => __('What plans are available?', 'searchjet-instant-search'),1163 'a' => __('Free: 10,000 searches/mo, 1,000 pages, 50 AI answers. Pro ($19/mo): 50,000 searches, 25,000 pages, semantic search. Growth ($79/mo): 250,000 searches, 100,000 pages. Enterprise ($299/mo): unlimited everything.', 'searchjet-instant-search'),1164 'l' => 'https://searchjetengine.com/pricing'],1165 ['q' => __('What is the free tier?', 'searchjet-instant-search'),1166 'a' => __('The free tier includes 10,000 searches/month, 1,000 indexed pages, 1 site, 7 days analytics, and 50 AI answers/month. No credit card required.', 'searchjet-instant-search'),1167 'l' => 'https://searchjetengine.com/pricing'],1168 ['q' => __('What does the Pro plan include?', 'searchjet-instant-search'),1169 'a' => __('Pro ($19/mo) includes 50,000 searches/month, 25,000 indexed pages, 5 sites, 30 days analytics, 500 AI answers/month, 8 reindexes/day, AI Semantic Search, and 24h priority support.', 'searchjet-instant-search'),1170 'l' => 'https://searchjetengine.com/pricing'],1171 ['q' => __('What does the Growth plan include?', 'searchjet-instant-search'),1172 'a' => __('Growth ($79/mo) includes 250,000 searches/month, 100,000 indexed pages, 3 sites, 90 days analytics, 5,000 AI answers/month, 20 reindexes/day, AI Semantic Search, and 4h priority support.', 'searchjet-instant-search'),1173 'l' => 'https://searchjetengine.com/pricing'],1174 ['q' => __('What does the Enterprise plan include?', 'searchjet-instant-search'),1175 'a' => __('Enterprise ($299/mo) includes unlimited searches, pages, sites, and analytics. 100,000 AI answers/month, unlimited reindexes, AI Semantic Search, 1h priority support, and a dedicated instance.', 'searchjet-instant-search'),1176 'l' => 'https://searchjetengine.com/pricing'],1177 ['q' => __('How do I upgrade my plan?', 'searchjet-instant-search'),1178 'a' => __('Visit searchjetengine.com/pricing to compare plans and upgrade. Your new limits activate instantly after payment.', 'searchjet-instant-search'),1179 'l' => 'https://searchjetengine.com/pricing'],1180 ['q' => __('What post types are indexed?', 'searchjet-instant-search'),1181 'a' => __('By default, SearchJet indexes posts, pages, and products (if WooCommerce is active). You can configure additional post types in Index Settings.', 'searchjet-instant-search'),1182 'l' => admin_url('admin.php?page=searchjet-index-settings')],1183 ['q' => __('How do I check index health?', 'searchjet-instant-search'),1184 'a' => __('Go to SearchJet → Index Health to monitor index status, error rates, document counts, and last sync times for each content type.', 'searchjet-instant-search'),1185 'l' => admin_url('admin.php?page=searchjet-index-health')],1186 ['q' => __('Can I use SearchJet with other search plugins?', 'searchjet-instant-search'),1187 'a' => __('SearchJet replaces WordPress default search. Disable other search plugins first if needed. Toggle "Disable Search Override" in Settings to fall back.', 'searchjet-instant-search'),1188 'l' => admin_url('admin.php?page=searchjet-settings')],1189 ['q' => __('How do I contact support?', 'searchjet-instant-search'),1190 'a' => __('Visit searchjetengine.com/contact for support. For documentation and guides, check searchjetengine.com/docs/.', 'searchjet-instant-search'),1191 'l' => 'https://searchjetengine.com/contact'],1192 ];1193 1194 ?>1195 <div class="searchjet-chatbot-float">1196 <div class="searchjet-chatbot-panel" id="searchjet-chatbot-panel">1197 <div class="searchjet-chatbot-panel-header">1198 <div class="sj-chatbot-header-avatar">1199 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-search-white.svg'); ?>" alt="" width="22" height="22" style="display:block;">1200 </div>1201 <div>1202 <h3><?php esc_html_e('SearchJet AI Bot', 'searchjet-instant-search'); ?></h3>1203 <span class="sj-chatbot-status"><?php esc_html_e('Ask me anything about SearchJet', 'searchjet-instant-search'); ?></span>1204 </div>1205 <button class="searchjet-chatbot-close" id="searchjet-chatbot-close">×</button>1206 </div>1207 <div class="searchjet-chatbot-panel-body" id="searchjet-chatbot-body">1208 <div class="searchjet-chatbot-message bot">1209 <div class="avatar sj-avatar-bot">1210 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-search-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1211 </div>1212 <div class="bubble"><?php esc_html_e('Hi! I\'m SearchJet Assistant. How can I help you today?', 'searchjet-instant-search'); ?></div>1213 </div>1214 <div class="sj-quick-questions" id="sj-quick-questions">1215 <button class="sj-quick-btn" data-query="How do I get started?">1216 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-rocket.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Getting Started', 'searchjet-instant-search'); ?>1217 </button>1218 <button class="sj-quick-btn" data-query="How do I index content?">1219 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-package.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Indexing', 'searchjet-instant-search'); ?>1220 </button>1221 <button class="sj-quick-btn" data-query="What plans are available?">1222 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-gem.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Plans & Pricing', 'searchjet-instant-search'); ?>1223 </button>1224 <button class="sj-quick-btn" data-query="How do I customize search UI?">1225 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-palette.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Customize UI', 'searchjet-instant-search'); ?>1226 </button>1227 <button class="sj-quick-btn" data-query="WooCommerce integration">1228 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-cart.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('WooCommerce', 'searchjet-instant-search'); ?>1229 </button>1230 <button class="sj-quick-btn" data-query="How do I contact support?">1231 <span class="sj-quick-icon"><img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-chat.svg'); ?>" alt="" width="13" height="13" style="display:block;"></span> <?php esc_html_e('Support', 'searchjet-instant-search'); ?>1232 </button>1233 </div>1234 <div id="searchjet-chatbot-matches"></div>1235 <div id="searchjet-chatbot-noresult" style="display:none;">1236 <div class="searchjet-chatbot-message bot">1237 <div class="avatar sj-avatar-bot">1238 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-help-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1239 </div>1240 <div class="bubble"><?php esc_html_e('I couldn\'t find a specific answer. Try these resources:', 'searchjet-instant-search'); ?></div>1241 </div>1242 <div class="searchjet-chatbot-links">1243 <a href="https://searchjetengine.com/docs/" target="_blank" class="searchjet-chatbot-link">1244 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-book-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1245 <?php esc_html_e('Full Documentation', 'searchjet-instant-search'); ?>1246 </a>1247 <a href="https://searchjetengine.com/contact" target="_blank" class="searchjet-chatbot-link">1248 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-phone-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1249 <?php esc_html_e('Contact Support', 'searchjet-instant-search'); ?>1250 </a>1251 <a href="<?php echo esc_url(admin_url('admin.php?page=searchjet-docs')); ?>" class="searchjet-chatbot-link">1252 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-help-blue.svg'); ?>" alt="" width="18" height="18" style="display:block;flex-shrink:0;">1253 <?php esc_html_e('Plugin Docs Hub', 'searchjet-instant-search'); ?>1254 </a>1255 </div>1256 </div>1257 </div>1258 <div class="searchjet-chatbot-panel-footer">1259 <input type="text" id="searchjet-chatbot-input" placeholder="<?php esc_attr_e('Type your question...', 'searchjet-instant-search'); ?>" autocomplete="off">1260 <button id="searchjet-chatbot-send">1261 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-send-white.svg'); ?>" alt="" width="16" height="16" style="display:block;">1262 </button>1263 </div>1264 </div>1265 <div class="searchjet-chatbot-tooltip" id="searchjet-chatbot-tooltip"><?php esc_html_e('Need help? I\'m here for you!', 'searchjet-instant-search'); ?></div>1266 <button class="searchjet-chatbot-btn" id="searchjet-chatbot-btn" aria-label="<?php esc_attr_e('Open help chat', 'searchjet-instant-search'); ?>">1267 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/dash-message-white.svg'); ?>" alt="" width="24" height="24" style="display:block;">1268 <span class="sj-chatbot-badge" id="sj-chatbot-badge">1</span>1269 </button>1270 </div>1271 1272 <script>1273 var searchjetFAQ = <?php echo wp_json_encode($faqs, JSON_UNESCAPED_UNICODE); ?>;1274 var searchjetAdminUrl = <?php echo wp_json_encode(admin_url('/')); ?>;1275 </script>1276 <script>1277 document.addEventListener('DOMContentLoaded', function() {1278 var chatBtn = document.getElementById('searchjet-chatbot-btn');1279 var chatPanel = document.getElementById('searchjet-chatbot-panel');1280 var chatClose = document.getElementById('searchjet-chatbot-close');1281 var chatInput = document.getElementById('searchjet-chatbot-input');1282 var chatSend = document.getElementById('searchjet-chatbot-send');1283 var matchesDiv = document.getElementById('searchjet-chatbot-matches');1284 var noresultDiv = document.getElementById('searchjet-chatbot-noresult');1285 var quickBtns = document.querySelectorAll('.sj-quick-btn');1286 var badge = document.getElementById('sj-chatbot-badge');1287 1288 function playNotifSound() {1289 try {1290 var ctx = new (window.AudioContext || window.webkitAudioContext)();1291 var osc = ctx.createOscillator();1292 var gain = ctx.createGain();1293 osc.connect(gain);1294 gain.connect(ctx.destination);1295 osc.frequency.value = 880;1296 osc.type = 'sine';1297 gain.gain.setValueAtTime(0.15, ctx.currentTime);1298 gain.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.3);1299 osc.start(ctx.currentTime);1300 osc.stop(ctx.currentTime + 0.3);1301 setTimeout(function() {1302 var osc2 = ctx.createOscillator();1303 var gain2 = ctx.createGain();1304 osc2.connect(gain2);1305 gain2.connect(ctx.destination);1306 osc2.frequency.value = 1320;1307 osc2.type = 'sine';1308 gain2.gain.setValueAtTime(0.12, ctx.currentTime);1309 gain2.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.25);1310 osc2.start(ctx.currentTime);1311 osc2.stop(ctx.currentTime + 0.25);1312 }, 150);1313 } catch(e) {}1314 }1315 1316 function togglePanel(open) {1317 if (!chatPanel) return;1318 chatPanel.classList.toggle('open', open);1319 if (open) {1320 if (badge) badge.style.display = 'none';1321 if (chatInput) chatInput.focus();1322 }1323 }1324 1325 if (chatBtn && chatPanel) {1326 chatBtn.addEventListener('click', function() {1327 togglePanel(!chatPanel.classList.contains('open'));1328 });1329 }1330 if (chatClose && chatPanel) {1331 chatClose.addEventListener('click', function() { togglePanel(false); });1332 }1333 document.addEventListener('click', function(e) {1334 if (chatPanel && chatPanel.classList.contains('open')) {1335 var f = document.querySelector('.searchjet-chatbot-float');1336 if (f && !f.contains(e.target)) togglePanel(false);1337 }1338 });1339 1340 quickBtns.forEach(function(btn) {1341 btn.addEventListener('click', function() {1342 var query = this.getAttribute('data-query');1343 if (chatInput) chatInput.value = query;1344 searchFAQ(query);1345 quickBtns.forEach(function(b) { b.classList.remove('sj-quick-active'); });1346 btn.classList.add('sj-quick-active');1347 });1348 });1349 1350 function searchFAQ(query) {1351 if (!matchesDiv || !noresultDiv) return;1352 var q = query.toLowerCase().trim();1353 if (!q) {1354 matchesDiv.innerHTML = '';1355 noresultDiv.style.display = 'none';1356 quickBtns.forEach(function(b) { b.classList.remove('sj-quick-active'); });1357 return;1358 }1359 var words = q.split(/\s+/).filter(Boolean);1360 var scored = searchjetFAQ.map(function(f) {1361 var haystack = (f.q + ' ' + f.a).toLowerCase();1362 var score = 0;1363 words.forEach(function(w) {1364 if (haystack.indexOf(w) > -1) score += 1;1365 });1366 return { faq: f, score: score };1367 }).filter(function(s) { return s.score > 0; });1368 scored.sort(function(a, b) { return b.score - a.score; });1369 var top = scored.slice(0, 3);1370 if (top.length === 0) {1371 matchesDiv.innerHTML = '';1372 noresultDiv.style.display = 'block';1373 return;1374 }1375 noresultDiv.style.display = 'none';1376 matchesDiv.innerHTML = top.map(function(s) {1377 var faq = s.faq;1378 var link = faq.l && faq.l.indexOf('http') === 0 ? faq.l : (searchjetAdminUrl.replace(/\/+$/, '') + '/' + (faq.l || '').replace(/^\//, ''));1379 var isExternal = faq.l && faq.l.indexOf('http') === 0;1380 return '<div class="searchjet-chatbot-message bot sj-msg-animate">' +1381 '<div class="avatar sj-avatar-bot"><img src="' + searchjetImgUrl + 'dash-search-white.svg" alt="" width="16" height="16" style="display:block;"></div>' +1382 '<div class="bubble"><strong>' + faq.q + '</strong><br>' + faq.a +1383 (link ? ' <a href="' + link + '" ' + (isExternal ? 'target="_blank"' : '') + ' class="sj-learn-more">' + '<?php echo esc_js(__('Learn more', 'searchjet-instant-search')); ?>' + ' →</a>' : '') +1384 '</div></div>';1385 }).join('');1386 }1387 1388 var debounceTimer;1389 if (chatInput) {1390 chatInput.addEventListener('input', function() {1391 clearTimeout(debounceTimer);1392 debounceTimer = setTimeout(function() { searchFAQ(chatInput.value); }, 200);1393 });1394 chatInput.addEventListener('keydown', function(e) {1395 if (e.key === 'Enter') searchFAQ(chatInput.value);1396 });1397 }1398 if (chatSend) {1399 chatSend.addEventListener('click', function() {1400 if (chatInput) searchFAQ(chatInput.value);1401 });1402 }1403 1404 var hasSeenHelp = localStorage.getItem('searchjet_help_seen');1405 if (!hasSeenHelp) {1406 localStorage.setItem('searchjet_help_seen', '1');1407 setTimeout(function() {1408 playNotifSound();1409 togglePanel(true);1410 if (badge) badge.style.display = 'flex';1411 }, 1200);1412 }1413 });1414 </script>1415 <?php1416 }1417 718 } -
searchjet-instant-search/trunk/includes/Admin/DocumentationPage.php
r3673342 r3772659 97 97 <p><?php esc_html_e('Get up and running in minutes. Install, connect, and start searching.', 'searchjet-instant-search'); ?></p> 98 98 </a> 99 <a href="https://searchjetengine.com/docs/guides/get-started/admin-panel-guide/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">100 <div class="searchjet-docs-card-icon">101 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-gear.svg'); ?>" alt="" width="24" height="24" style="display:block;">102 </div>103 <h3><?php esc_html_e('Admin Panel Guide', 'searchjet-instant-search'); ?></h3>104 <p><?php esc_html_e('Learn how to configure settings, manage exclusions, and customize your search.', 'searchjet-instant-search'); ?></p>105 </a>106 <a href="https://searchjetengine.com/docs/guides/features/searchjet-connect/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">107 <div class="searchjet-docs-card-icon">108 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-link.svg'); ?>" alt="" width="24" height="24" style="display:block;">109 </div>110 <h3><?php esc_html_e('SearchJet Connect', 'searchjet-instant-search'); ?></h3>111 <p><?php esc_html_e('Connect multiple sites to a single SearchJet account for unified management.', 'searchjet-instant-search'); ?></p>112 </a>113 <a href="https://searchjetengine.com/docs/guides/features/ai-agents/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">114 <div class="searchjet-docs-card-icon">115 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-robot.svg'); ?>" alt="" width="24" height="24" style="display:block;">116 </div>117 <h3><?php esc_html_e('AI Agents', 'searchjet-instant-search'); ?></h3>118 <p><?php esc_html_e('Create intelligent automation agents to optimize your search experience.', 'searchjet-instant-search'); ?></p>119 </a>120 <a href="https://searchjetengine.com/docs/guides/features/roadmap/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">121 <div class="searchjet-docs-card-icon">122 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-map.svg'); ?>" alt="" width="24" height="24" style="display:block;">123 </div>124 <h3><?php esc_html_e('Roadmap', 'searchjet-instant-search'); ?></h3>125 <p><?php esc_html_e('See what features are coming and vote on what matters most to you.', 'searchjet-instant-search'); ?></p>126 </a>127 <a href="https://searchjetengine.com/docs/guides/troubleshooting/common-issues/" target="_blank" rel="noopener noreferrer" class="searchjet-docs-card">128 <div class="searchjet-docs-card-icon">129 <img src="<?php echo esc_url(SEARCHJET_PLUGIN_URL . 'assets/img/docs-wrench.svg'); ?>" alt="" width="24" height="24" style="display:block;">130 </div>131 <h3><?php esc_html_e('Troubleshooting', 'searchjet-instant-search'); ?></h3>132 <p><?php esc_html_e('Solutions to common issues and answers to frequently asked questions.', 'searchjet-instant-search'); ?></p>133 </a>134 99 </div> 135 100 -
searchjet-instant-search/trunk/readme.txt
r3694855 r3772659 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.0. 57 Stable tag: 2.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 134 134 135 135 == Changelog == 136 137 = 2.0.6 = 138 * **IMPROVEMENT** - Streamlined the in-plugin Documentation page by removing the Admin Panel Guide, SearchJet Connect, AI Agents, Roadmap, and Troubleshooting cards 136 139 137 140 = 2.0.5 = -
searchjet-instant-search/trunk/searchjet.php
r3694855 r3772659 4 4 * Plugin URI: https://searchjetengine.com/ 5 5 * Description: AI-powered instant search for WooCommerce & WordPress. Supports SKUs, smart filters, typo-tolerance & GA4 tracking. 6 * Version: 2.0. 56 * Version: 2.0.6 7 7 * Author: Maidul 8 8 * Author URI: https://searchjetengine.com/ … … 24 24 } 25 25 // Define plugin constants 26 define('SEARCHJET_VERSION', '2.0. 5');27 define('SEARCHJET_PLUGIN_VERSION', '2.0. 5');26 define('SEARCHJET_VERSION', '2.0.6'); 27 define('SEARCHJET_PLUGIN_VERSION', '2.0.6'); 28 28 define('SEARCHJET_PLUGIN_FILE', __FILE__); 29 29 define('SEARCHJET_PLUGIN_DIR', plugin_dir_path(__FILE__));
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)