Hello,
I have a problem with Ajax Live Search for Virtuemart module (https://www.jeyamtemplates.com/joomla-modules/virtuemart-ajax-live-search.html).
I bought the extension Ajax Live Search for Virtuemart (1.0.6) few months ago, but it doesn't work on our website.
As you can see on the picture just below, when I write a product number in the search area, the ajax loader stay like that and there is no proposition of result.
(https://www.zupimages.net/up/22/37/16fo.jpg)
I work with Joomla 3.10.10 and Virtuemart 4.0.6 (I had VM 3 few days ago and the extension didn't work too).
Thank you in advance for your help
Valentin
no help,
ask developper - Jeyam Team - https://www.jeyamtemplates.com
Look in your browser console, if the module send back some ajax results
Perhpas you have PHP debug activated and you have mix of debug message and json result and this break the script
Thank you for your answer, I checked my browser console :
(https://zupimages.net/up/22/39/tulh.png)
you've got mixed https and http calls ... make sure the ajax search is using https
It is a cross-origin Ajax call issue of your site.
The search function will not work from this URL - https://senga.fr (https://senga.fr/). But if you try from this URL - https://www.senga.fr (https://www.senga.fr/) it will work fine.
It is a basic "www" and "non-www" prefix resolving issues.
Your domain name should never resolve both with "non-www" and "www". That means the site should be made accessible either using www.your-site.com or your-site.com.
It would help if you ensured that non-www requests are redirected to www. Which will also improve your search engine/crawler performance. Refer to this StackOverflow post for more details: https://stackoverflow.com/questions/12050590/redirect-non-www-to-www-in-htaccess. It will also resolve your problem. You need to add the following redirect rules to your .htaccess file.
# Redirect to www
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Thank you for your answers.
@GJC Web Design: Unless I am mistaken, I do not see any http calls. It's only https.
@Jumbo: I managed to make the www redirection on my website. That's a good point, but the Ajax Search module still doesn't work. I still have the Ajax loader running forever, without giving me any suggestions of results.
PS: For the moment I use an alternative module "Virtuemart Search Autocomplete" on my website. In this way, my customers can do research, but this is not the module I prefer.
Quote@GJC Web Design: Unless I am mistaken, I do not see any http calls. It's only https.
my mistake .. wrong glasses .. ;D
is this not the problem-> VM593:1 ERR SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
Your problem is that you send a JSON request but display HTML.
option: com_ajax
module: jp_vm_ajax_search
format: json
method: searchdata
jpsearchword: test
moduleid: 232
language_tag: fr-FR
format: json mean send back JSON in Joomla
Perhaps you should use a module that respect the basic rules
Quote from: Jumbo! on September 27, 2022, 08:10:01 AM
Your domain name should never resolve both with "non-www" and "www". That means the site should be made accessible either using www.your-site.com or your-site.com.
I see that different. It should work. Good code can that. I know, your code can that and standard vm code, too.
Yep, Patrick. JS dont like mixing variable types.
I hope this message finds you well. I wanted to share my experience in resolving a similar issue with the "Ajax Live Search for Virtuemart" module, and I believe this solution might be helpful for you.
Upon encountering the issue, I contacted the support team, and they promptly addressed it by adding the site URL to the configuration.php file. This simple adjustment proved to be effective in resolving the problem.