75 comments found.
hello. Can you do a job of customizing the search engine? thank you
Yes I can
a2621ba4-0c1c-4573-97e7-244038b366f9 Hello, in the manual it does not say how to create a new category or change the ones that already exist. And how to connect them. Thank you
There is no adding or changing in database. You must have it before.
Hi, Looks like this script could be handy for me.
Do you have a link to a working demo as codecanyon does not connect.
Regards
The demo link doesn’t appear to be working.
Is there is any stripe integration
No payment gateway is integrated.
In the pre-purchase question, you confirmed the possibility of adding a dropdown option, but I don’t see how it can be done. There is no documentation! The dropdown menu does not exist in the script.
Sorry for late reply. Yes it is possible. Go to aside.php file. And this block of code where you want the select box:
<?php if($offers->num_rows > 0){ ?>
<select name="thename" id="theid">
<?php while($offer = $offers->fetch_assoc()){ ?>
<option value="<?= $offer['id'] ?>"><?= $offer['name'] ?></option>
<?php } ?>
</select>
<?php } ?>
Change variables and key according to your query and database structure.
I add the code in aside.php, but the filter doesn’t work. The results do not change. Is there anything else that needs to be added?
Please try foreach instead of while loop
<?php foreach ($brands as $brand): ?>
<option value="<?= $brand['id'] ?>"><?= $brand['name'] ?></option>
<?php endforeach; ?>
aside.php
<select name=”type” id=”type” class=”form-select”> <?php foreach ($types as $type): ?> <option value=”<?= $type[‘id’] ?>”><?= $type[‘name’] ?></option> <?php endforeach; ?> </select>
index.php
<script> $(”#type”).on(“change”,function(){ faceted(); }) </script>
inside faceted funciton
var types = $(”#type”).val();
faceted.php
if(isset($_GET[‘types’]) && $_GET[‘types’] != ””){ $types = $_GET[‘types’]; $sql .=” AND `type_id` = ”.$types; }
This way you can add new select box in search. Feel free to contact me for any further assistance.
Hello. This compilation of scripts does not return search results. I guess there is some conflict in the script. Does not work!
Please, check my new script with select box that I’ve mailed you.
Sorry, there is no documentation on how to set up a script for my project?
There is a folder named documentation inside the project,
That documentation contains the user manual and file structure. I am interested in how to apply a script over my table and how to add dropdown menus with only one selectable option for filters?
I’ve answered in another comment.
Will this work with a codignitor e-commerce script?
I don’t have any idea about codignitor. If you can covert plain php to codeignitor you can think about this script.
Is it possible to have dropdown menus with only one selectable option for filters? Also, is it possible to include additional fields for the search field?
Yes, it is possible to add selectable option and it is also possible to add new search field.
Hey your demo isn’t working
Sometimes it’s not works from CodeCanyon. Try this link: https://needle.smartrahat.com/
Thanks for the quick reply. I actually need a script in php that’ll predict the search from items already in the database. example Amazon. Does Needle have this kind of functionality?
You mean in the search bar, when we try to write something there?
Yes, like in Amazon when you start searching for example TV’s, the whole list of suggestions available in the database shows up….or check out https://musicmanelectronic.com/ and type ” Fridge” in the search box…you’ll see a dropdown list of suggestions
Yes, I can do it. Please, give 2-3 days.
First off, thank you for this great work. I saved so much time using this.
I would just like to confirm I see on the demo that the spinner.gif displays when filtering. I have downloaded the source code and can see that the spinner.gif is present but nowhere in the code can I find reference to the spinner.gif.
https://www.needle.smartrahat.com/In summary the spinner doesn’t display at all
OK I managed to get it working. This portion of code was missing in the downloadable sourcecode compared to what has been implemented. here: https://www.needle.smartrahat.com/
beforeSend:function(){
$(”#result”).html(‘‘)
}
Hello sir,
Thank you for purchasing my script.
Is there anything I can do for you?
Don’t hesitate to contact me anytime if you need something.
Just tried to install your search engine script and it didn’t work. I created the mysql database, imported the sql file, modified the conn.php file to reflect my database connection details, username, password and browsed to https://mywebsite/search and got these errors:
[21-Apr-2023 16:46:06 UTC] PHP Warning: mysqli::__construct(): (HY000/1045): Access denied for user ‘myusername’@’localhost’ (using password: YES) in /home/mywebsite/search/conn.php on line 16 [21-Apr-2023 16:46:06 UTC] PHP Fatal error: Uncaught Error: mysqli object is already closed in /home/mywebsite/search/aside.php:9 Stack trace: #0 /home/mywebsite/search/aside.php(9): mysqli->query(‘SELECT * FROM `...’) #1 /home/mywebsite/search/index.php(22): include_once(’/home/myusername/...’) #2 {main} thrown in /home/mywebsite/search/aside.php on line 9
What did I do wrong?
Any ideas why your plugin isn’t working for me?
Sorry for late answer. I was busy celebrating Eid-ul-fitr.
The error is for wrong database settings. Please recheck the database setting.
Well I found some time to try this again and got the same result. Your plugin doesn’t work for me. I created a new database with a new username and password and still got the same error: when browsing to https://mywebsite.com/search/index.php.
Connection Failed: Access denied for user ‘username’@’localhost’ (using password: YES)
Not sure what to do next. I have many mysql database platforms installed on my server working just fine so I know it isn’t my database that is causing the problem.
According to your documentation all I have to do is upload files to server, create database, import sql tables, modify conn.php and I should be good to go. Seems simple enough but something is wrong. I dropped all the tables and used the exact same database to do a test with another plugin and it installed with no errors so it must be something else with your script or something I am missing.
I am going to have to ask for a refund as this plugin won’t work for me.
I’ve tried to visit your link but it is not working. If you still want for a refund you can ask for it.
Is there any way we can correspond via email so I can provide you with details without posting them here for security reasons? I would like to try and get this to work but obviously I am missing something.
Here is my email address smartrahat@gmail.com
Feel free to contact me anytime.
So I have tried to contact you via email a few times but you never responded and I see my support has now expired. I still haven’t gotten your script to work and I had to walk away for a while but I am ready to give it another try if you will answer my previous emails that were sent to you during my support period please.
Sorry for the problem. Normally I replied withing 1 day. I think I’ve missed some. Can you please give me a another mail or give me you email address.
Don’t worry about the support expire. I’ll always support you if there is any issue from my side.
Check your spam folder as I sent you an email Thursday. I sent it to this email address which you gave me via envato back in May. smartrahat at gmail dot com. My email is webmaster at vanislebc dot com.
Got your email in spam folder. Sorry for the misunderstanding. I’ve replied your email.
Sent you two more emails in the last 12 hours with no response.
Sorry brother, I just woke up. I’ve checked the link, looks like the database password is wrong. Make sure you are using database password instead of cPanel password.
Double checked my database username and password and both are correct. Even changed the password to be sure but I got the same result. Is your script compatible with mysql 8?
Yes, it’s compatible with MySQL 8. Are you entering your database credential in conn.php file?
I’ve figured it out. It was two things actually, one was an issue with my copy/paste in notepad++ that was adding an extra space that I wasn’t seeing and the other had to do with modsecurity. I’ll send you an email also.
I’m glad you figure it out.
I’ve got our email and replied.
Interested in your search engine script but I don’t have an ecommerce site just a html/css/php site. Will this still work for me or do I need a script that isn’t focused on ecommerce?
Also will this script work on older versions of php?
It will work on any PHP script.
One more question if you don’t mind? Will this script (v1) continue to be updated in the future or do you have plans to focus on the Laravel version (v2) instead?
No problem, you can ask my anything until you satisfied.
There is no v1 now.
I’ve two versions now. PHP version and Laravel V2 version.
I update them when they need to be updated.
Thank you.
Okay thanks for letting me know.
Was wondering how this script indexes my website? It is a very large one and the last time I tried to use a search engine script it kept timing out.
Okay never mind, found the info about how your script indexes websites.
I already have a search form built into my html nav bar.
Will I be able to use your script by adding one line to the “form action call”?
Yeah. And you have to enter the database information and columns name in proper places.
Okay thanks just purchased and will give it a try when I can free up some time.
Thanks for purchasing. Feel free contact me anytime if you need help.
When i set the price range and use the filtering checkboxes after that, the filtering does not work anymore. Any idea how to fix that?
Please, check the console for the error
XHRGEThttp://localhost:8080/hello/faceted.php?_token=bolOKge9ACHvDkXn7EeHYU2vHRAyqyyX04tSy1lo&search=&colors[]=3&price=241;604&entriesPerPage=6 [HTTP/1.0 500 Internal Server Error 2ms]
What’s interesting is: once i use the slider, the filtering works according to the values concerning the price, BUT: if I then click a couple of checkboxes, no matter which ones, brand or whatever, NOTHING happens, I don’t even get an error in the console, the console just keeps logging the events from the slider, while the slider still works. But if i THEN open the console and click any checkbox, an XHR GET error occurs immediately after clicking any checkbox with the console open. Odd. However, after resetting the filters, everything works fine, all checkboxes, etc. But once i use the slider at some point, the other filters don’t work anymore. This happens with the standard setup. Also one other thing: in the version I bought and downloaded from codecanyon, the loading gif is in the images folder but not integrated in the code of the application.
Thank you for detecting the issue. I’ve fixed it and update the project with the fix. Please, download again for a working version.
Hey smartrahat, thank you for your support! i’ve tested the new version, but unfortunately, now the “clear filters” button doesn’t work anymore. ERROR: XHRGEThttp://localhost:8080/j/faceted.php?search=&price=$0 – $500&sorting=category_id&direction=asc&qty=6 [HTTP/1.0 500 Internal Server Error 2ms]
The combination of range slider and other filtrers works now though!
Thanks buddy. I’ve uploaded the fix version. Please try again.
Thank you so much, i think it works like a dream now. 
You are welcome. If you like my script or my support, please don’t forget to give me a five star
Thank you again for pointing those issues.
Hi, I got this error, Connection Failed: Access denied for user ‘root’@’localhost’ (using password: NO)
Make sure database is running properly. And check the database configuration in conn.php file.
Hi, this seems to be working fine for me thanks. I am tweaking as I do know some php. I don’t want all ‘products’ to be displayed in the RESULTS page when search field empty. What I’m aiming to achieve is: Only show products when something is typed in the search field. When nothing is typed in the search field I would like the RESULTS page empty. Is this easy to do tweaks? Thanks
Hi, this works actually:
PAGE: faceted.php
if ($search) { YOUR CODE IS HERE } else { $result=null; echo json_encode([‘result’=>$result,0,0,0]); } Does this look ok. Or a better way to do this?
In index.php file search for this block of code.
<script>
$(window).on("load",function(){
$("#amount").val("$0 - $1000");
faceted();
})
</script>
Now, remove or comment the faceted() function.
I hope, this will solve your issue.
Please, contact me if you need any help.
Hi, thanks, not really what I was trying to do. My code seems to work as I wanted it too so all should be good. The point was when you’ve used the SEARCH field and then emptied it again, I don’t want all the posts showing – I wanted none showing…
Hi again, is there a way to limit the Ajax search so it doens’t begin searching until after the first 3 chars are typed? Thanks
Hi there,
Find the code block shown below.
<script>
$("#search").keyup(function(){
faceted();
})
</script>
And replace it with this code. It will trigger the faceted() function if the search field have 3 character or more.
<script>
$("#search").keyup(function(){
let search = $(this).val();
if(search.length >= 3 || search.length === 0){
faceted();
}
})
</script>
To solve your previous comment remove || search.length === 0 this from above code.
If you have more changes, don’t hesitate to knock me.
Great thank you. My client is concerned about security. I’ve heard stories of ‘DRO P DATABASE’ or similar being able to passed through to the Database from the SEARCH field. Can you let me know any security you have to avoid this sort of injection? Thanks
Also if you don’t mind, I have another one – how would I go about filtering out ‘functional’ words from the search. Words that are not really Search Terms such as, and, I we, have, we etc etc. Would you know of a class or function to add to this script of yours please?
Meant to say Rahat, very pleased with the script 
Hi, not heard any response to latest questions. Could you elaborate on the security side of things please?
I’m extremely sorry for the late. I was so busy finishing my next product. Good thought about the MySql Injection.
Though, the search field will connect with more queries (including joining and group by) there is less chance of drop or modify the database.
For better safety you can use mysqli_real_escape_string() in search queries. Go to faceted.php file and replace
$search = $conn,$_GET['search'];
With this line
$search = mysqli_real_escape_string($conn,$_GET['search']);
To omit certain words from string, you may create a new function with these code.
function trimmed($string)
{
$omit_words = ['and','we','or','have','is','i']; // remove the spaces
rsort($omit_words); // need to sort so that correct words are replaced
return str_replace($omit_words,'',$string);
}
I hope this will solve your problem.
Thanks for this. Where would the Search field call this from?
$newSearch = trimmed($search)
thanks, but I don’t see it in faceted? Or where to place the new function..
Thanks, I’ve worked this out.
Pleased to here that. Sorry for my delay. If you like my support or script don’t forget to rate me 5 
hi, demo not working?
Try the direct link https://needle.smartrahat.com/
Thanks, I just get a spinning logo and no results. Tried a few different times?
I’ve tested it. It’s absolutely fine.
Not for me unfortunately
Can you please tell me, which options you were choose when it not work?
Hi, I’ve tried all sorts. Can you tell me what to try to see it working?
I’ve built a bespoke blog. Would this work as a general search field to filter blogs? Thanks
Check your desire options like the screenshot.
Hi, its the SEARCH FIELD i’m interest in – if I could use this to bring up my blogs. That doesn’t return results…
Thanks brother, I’ve found the issue and fixed it.
Ahh yes working well now. A couple more questions if you don’t mind? I work with PHP MYSQL – would I be able to integrate with my bespoke blog you think? Secondly – hows the security for calling the Database. Has this been taken into account. Thanks.
- Ask as many question as you need.
- You can use this in bespoke blog. Need an extra page for details, if you have it then OK.
- Of course it’s secure for calling from database.
Thanks. Could you give me an example of integration for PHP please?
Are you talking about documentation?
yes exactly. Thanks
Any news on the integration? If it ties in with my Blog I will go ahead with this, but would need to look at how it ties in if possible?
Can you give me your email?
Hello friend
Thank you for reaching me.
Currently I have no plan to make anything like Moodle.
Needle and Moodle are far different in every way.
Hey there. Me again, lol. Tell me, I have more than 50 cards that I need to display. Problem is, I am finding that it wont load more than 50 cards. I have a total of about 130 items in my MySQL DB. But, it will only see the first 50. Anything more than that, the pagination just displays that “searching” animation. Am I missing something here?
Hello there,
Sorry for late reply. I was busy with Eid Festival.
There should be an error message in console while the searching is looking for data. Can you give the error from the console?
Hello, could this also be used as an affliate product search engine?
It could be, if you seed all affiliate data in the database.
what data do I need about affiliates to make it work?
Products data in products table. There is a default structure of the products table, you are free to modify this as you required.