![]() |
Dynamic Product Search (ajax)
Hello,
I've just installed this mod and it's not working at all. :oops: Im installing this on v4.1.9 |
Re: Dynamic Product Search (ajax)
Well first we need to know what mod you are talking about...where you got it, what it is called. Next, you should be contacting the vendor where you purchased it for assistance.
|
Re: Dynamic Product Search (ajax)
Sorry I thought that I posted a link.
http://www.xcartmods.co.uk/x-cart-ajax-dynamic-product-search/ Its a free mod and I wouldnt think they offer support for free products. I installed it and it as it said and it didn't work. |
Re: Dynamic Product Search (ajax)
did you make sure that you renamed...
dsearch[v4.1.x].tpl to dsearch.tpl and have not used dsearch[v4.0.x].tpl by accident? Do you get any JS errors? |
Re: Dynamic Product Search (ajax)
Hello,
No it's not providing me with any errors. I still have the dsearch[v4.0.x].tpl file. I have it inside: skin1/dsearch 4 files are there. dsearch[v4.0.x].tpl dsearch.tpl ajax.js dsearch.css dsearch.js I have dsearch.php inside skin1 as well as root dir. I also ran: cleanup.php |
Re: Dynamic Product Search (ajax)
My head.tpl:
Quote:
home.tpl Quote:
I added 'a little before' to show you whats in the code. Everything is in place where it needs to go but it just don't want to work.. any advice/help? |
Re: Dynamic Product Search (ajax)
You're using the fashion mosaic template, so the template layout will be slightly different.
|
Re: Dynamic Product Search (ajax)
So because I use it means I cannot use this mod? Does anyone have a solution?
|
Re: Dynamic Product Search (ajax)
This mod will work with XC 4.1.8 with the Fashion Mosaic skin.
Follow in the mod installation file, with the following changes: STEP 1) SKIP THIS STEP STEP 2) EDIT /dsearch.php. REMOVE LINES 2 - 5 // SET MYSQL INFORMATION $conn = mysql_connect("LOCALHOST","USERNAME","PASSWORD"); // CONNECT TO MYSQL DATABASE mysql_select_db("DATABASE",$conn); ADD: require "./auth.php"; STEP 3) Upload all files, then rename dsearch[v4.0.x].tpl or dsearch[v4.1.x].tpl to dsearch.tpl, according to your version. STEP 4) Add this code to /skin1/customer/home.tpl before </head> <link rel="stylesheet" href="{$SkinDir}/dsearch/dsearch.css"> <script type="text/javascript" src="{$SkinDir}/dsearch/ajax.js"></script> <script type="text/javascript" src="{$SkinDir}/dsearch/dsearch.js"></script> STEP 5) SKIP THIS STEP STEP 6) SORRY HERE"S THE HACK Copy dsearch.tpl to "skin1/customer" directory Back-up skin1/customer/search.tpl (cp search.tpl search.tpl.old) Copy dsearch.tpl to search.tpl (cp dsearch.tpl search.tpl) NOTE ==== To reduce the load on your server, in skin1/dsearch/dsearch.js.... Modify... var minimumLettersBeforeLookup = 2; // Number of letters entered before a lookup is performed. DONE.. ALERT: AN MS IE Security message will pop-up. Answer yes or no, it doesn't matter. The search will work. Once I find the cause of the pop-up, I'll post the fix. |
Re: Dynamic Product Search (ajax)
*** UPDATED STEP 2 ***
This mod will work with XC 4.1.8 with the Fashion Mosaic skin. Follow in the mod installation file, with the following changes: STEP 1) SKIP THIS STEP STEP 2) EDIT /dsearch.php. REMOVE LINES 2 - 5 // SET MYSQL INFORMATION $conn = mysql_connect("LOCALHOST","USERNAME","PASSWORD"); // CONNECT TO MYSQL DATABASE mysql_select_db("DATABASE",$conn); ADD: require "./auth.php"; FIND THIS FOLLOWING LINE. (The search list will not display products with 0 available. If you are not using inventory tracking or want to display products no in stock in the search list make this change. Otherwise, skip this step.) $res = mysql_query("select productid,product from xcart_products where forsale='Y' AND avail>0 AND product like '".$letters."%'") or die(mysql_error()); REPLACE WITH THIS UPDATED LINE $res = mysql_query("select productid,product from xcart_products where forsale='Y' AND avail>=0 AND product like '".$letters."%'") or die(mysql_error()); STEP 3) Upload all files, then rename dsearch[v4.0.x].tpl or dsearch[v4.1.x].tpl to dsearch.tpl, according to your version. STEP 4) Add this code to /skin1/customer/home.tpl before </head> <link rel="stylesheet" href="{$SkinDir}/dsearch/dsearch.css"> <script type="text/javascript" src="{$SkinDir}/dsearch/ajax.js"></script> <script type="text/javascript" src="{$SkinDir}/dsearch/dsearch.js"></script> STEP 5) SKIP THIS STEP STEP 6) SORRY HERE"S THE HACK Copy dsearch.tpl to "skin1/customer" directory Back-up skin1/customer/search.tpl (cp search.tpl search.tpl.old) Copy dsearch.tpl to search.tpl (cp dsearch.tpl search.tpl) NOTE ==== To reduce the load on your server, in skin1/dsearch/dsearch.js.... Modify... var minimumLettersBeforeLookup = 2; // Number of letters entered before a lookup is performed. DONE.. ALERT: AN MS IE Security message will pop-up. Answer yes or no, it doesn't matter. The search will work. Once I find the cause of the pop-up, I'll post the fix. |
Re: Dynamic Product Search (ajax) - FIX
This mod will work with XC 4.1.8 with the Fashion Mosaic skin.
Follow in the mod installation file, with the following changes: STEP 1) SKIP THIS STEP STEP 2) EDIT /dsearch.php. REMOVE LINES 2 - 5 // SET MYSQL INFORMATION $conn = mysql_connect("LOCALHOST","USERNAME","PASSWORD"); // CONNECT TO MYSQL DATABASE mysql_select_db("DATABASE",$conn); ADD: require "./auth.php"; FIND THIS FOLLOWING LINE. (The search list will not display products with 0 available. If you are not using inventory tracking or want to display products no in stock in the search list make this change. Otherwise, skip this step.) $res = mysql_query("select productid,product from xcart_products where forsale='Y' AND avail>0 AND product like '".$letters."%'") or die(mysql_error()); REPLACE WITH THIS UPDATED LINE $res = mysql_query("select productid,product from xcart_products where forsale='Y' AND avail>=0 AND product like '".$letters."%'") or die(mysql_error()); STEP 3) Upload all files, then rename dsearch[v4.0.x].tpl or dsearch[v4.1.x].tpl to dsearch.tpl, according to your version. STEP 4) Add this code to /skin1/customer/home.tpl before </head> <link rel="stylesheet" href="{$SkinDir}/dsearch/dsearch.css"> <script type="text/javascript" src="{$SkinDir}/dsearch/ajax.js"></script> <script type="text/javascript" src="{$SkinDir}/dsearch/dsearch.js"></script> STEP 5) SKIP THIS STEP STEP 6) Modify 'skin1/dsearch/dsearch.js" file: CHANGE ajax_list_MSIE from true to false: ORIGINAL LINE: if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)ajax_list_M SIE=true; CHANGED LINE: if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)ajax_list_M SIE=false; STEP 7) Copy dsearch.tpl to "skin1/customer" directory Back-up skin1/customer/search.tpl (cp search.tpl search.tpl.old) Copy dsearch.tpl to search.tpl (cp dsearch.tpl search.tpl) NOTE ==== To reduce the load on your server, in "skin1/dsearch/dsearch.js", modify... var minimumLettersBeforeLookup = 2; // Number of letters entered before a lookup is performed. YOU'RE DONE. |
Re: Dynamic Product Search (ajax) - FIX
Quote:
Hi, when I installed this Dynamic Product Search (ajax) mod as it was instructed originally, everything worked fine but I wanted to illuminate $conn from dsearch.php code. I did it like you suggested by replacing it with require "./auth.php";. Also I changed "=true" to "=false". My x-cart is 4.0.11. :roll: Do you know what it might be wrong or missing? Thank you in advance, clik |
Re: Dynamic Product Search (ajax)
Mod updated and tested working fine with v4.3.x
Info - http://www.xcartmods.co.uk/x-cart-ajax-dynamic-product-search.html Demo - http://www.xcartmods.co.uk/demos/43x/home.php |
Re: Dynamic Product Search (ajax)
Quote:
This will work with Smart Search or only works with default x-cart search ? |
Re: Dynamic Product Search (ajax)
Quote:
|
Re: Dynamic Product Search (ajax)
Question - This instructions are written the following way:
Code:
1) If you are running v4.0.x, in search.php, However; there does not appear to be instructions for all other versions? I could probably figure it out, but rather play it safe. |
Re: Dynamic Product Search (ajax)
Skip that part, as you're using v4.3.2.
I'm taking that part out of the install.txt |
Re: Dynamic Product Search (ajax)
Show just move on to step 2 then... Cool. Checking out some of your other freebee stuff on your site. Very nice! Have downloaded a few of them and can't wait to check them out.
|
Re: Dynamic Product Search (ajax)
Quote:
Thanks for the answer. Very glad to know that it will work with Smart Search also. But can you please tell me how to configure this mod for Smart Search since the installation guide you provided is only for default x-cart search only. Thanks in advance for any help :) |
Re: Dynamic Product Search (ajax)
Dear PhilJ,
I installed this free mod on our website (4.2.0) and it's working perfect, thanks. One question though, when you enter a search term with a hyphen in it, followed by a character, the search doesn't seem to work anymore (read: doesn't display any results). For example, when I enter (I set the search trigger to only 2 characters): SP it gives me results like SP-LAMP-007 (a product name) SP- gives the same result SP-L no results anymore, while it should still display SP-LAMP-007 LAMP (no hypen) gives the SP-LAMP-007 result again, as it should. Any idea how to change this behavior? I suspect it has something to do with the preg_replace function ($letters = preg_replace("/[^a-z0-9 ]/si","",$letters); but no idea how to edit it)? Thanks a lot, Dennis |
Re: Dynamic Product Search (ajax)
Simply replace...
Code:
a-z0-9 Code:
a-z-0-9- |
Re: Dynamic Product Search (ajax)
8O that simple.. wow, it's terrible I can't figure this out myself. Thanks Phil.
Regards, Dennis |
Re: Dynamic Product Search (ajax)
no worries :) I've updated the mod since, so thanks :)
|
Re: Dynamic Product Search (ajax)
Thanks for the great free mod!
I have tried adding this to 4.4.1 and can not get it working. I know that it has only been upgraded to 4.3 but I figured that I would have a try with it anyways. Has anyone got it working with 4.4 yet? Thanks again, Marc |
Re: Dynamic Product Search (ajax)
It works fine with v4.4.1
|
Re: Dynamic Product Search (ajax)
Thanks for getting back to me. I must have monkeyed it up then. I will start over with the backup files.
|
Re: Dynamic Product Search (ajax)
I am pretty sure that I copied and pasted the code correctly but I think that I may have put the dsearch directory and dsearch.php file in the wrong locations seeing how there is no skin1 directory in 4.4.1 Where should these go and should I be modifying the files in skin/common_files/customer directory or the skin/MY_TEMPLATE/customer directory?
|
Re: Dynamic Product Search (ajax)
If I try it in IE I get this error:
Quote:
Can you tell me what I am missing? |
All times are GMT -8. The time now is 06:42 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.