Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

AJAX Quick Search


assembler

Recommended Posts

i find where to fix the * Fixed non-latin charicters showing ???

 

 

This was in the old version:

// not strictly nessessary but output a header

header("Content-type: text/plain");

 

This is in new code to show norwegian ???, this you can also put inside ajax advansed search Contributions

// output a response header

header('Content-type: text/html; charset=ISO-8859-1');

 

Put this inside to fix the ??? problem, in attributeManager.php , quickfind.php or quickbox :

 

// output a response header

header('Content-type: text/html; charset=ISO-8859-1');

 

i saw this tip for ajax attribut manage,r maybe someone could be inspired and release a solution for the accent caracters not showing properly

MS2

Link to comment
Share on other sites

I've installed this contribution, ajax is great. however i get a huge latency from when when you type to when it displays (about 3 seconds). most customers have no clue what ajax is and i'm sure this ajax trick is novel for them, but if they type in a box and there is no submit button and nothing happens for a few seconds, i would think they would get confused. I have tried to call the quickfind.php?keyword=girl directly and that takes a fraction of a second, however when that is implemented through ajax, as i said, it takes a few seconds to show up.

 

anyone else have this problem? any solutions?

Link to comment
Share on other sites

Azer,

 

Not sure if you still need this, but you can use this string in place of the stock string in quickfind.php if you want the '-' to be searchable.. I too needed this as I had '-' in my part numbers

 

$q = addslashes(preg_replace("%[^0-9a-zA-Z ]-%", "", $_GET['keywords']) );

 

Hope that works for you. :D

 

For anyone that might know more about AJAX/JAVA/PHP... I have a couple of questions. :blush:

 

1. I'm trying to strip out speical characters such as ?, ?, etc from product names. Reason being is that if a customer does a search for 'Prolink' a number of products come up (around 60 or so...). The problem is that each Prolink product has a ? symbol after the Prolink word (ie-Prolink?). This keeps customers from inputing more text to narrow down their search. Any ideas?

 

2. Like many others, I too think if quick edit could search the product descriptionhave this could be of much use. I added pd.products_description to the query in the quickfind.php, but it seems like it makes no difference. Must it be added more places also?

 

   $query = tep_db_query("select pd.products_id, pd.products_name, pd.products_description, p.products_model from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS . " p on (p.products_id = pd.products_id) where (pd.products_name like '%" . tep_db_input($q) . "%' or p.products_model like '%" . tep_db_input($q) . "%') and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name asc limit " . $limit);

 

3. Is there some type of string that can be incorporated to allow an asterisk (*) to work as a universal character? Just an idea....

 

Thanks,

 

Nate

Link to comment
Share on other sites

godsilla , how did you add the image and buy now button , i got only the lines text , that is really nice like you did , ( intersting products ) :blush:

 

Well quicksearch.php essentially just spits out a number of product id's. Just use those the other information from that product (image, price, etc) to create a nice listing. If you are able to make you standard index.php page look nice, this is really the same thing (provided the ajax part works).

Link to comment
Share on other sites

  • 5 weeks later...

Assembler

 

I think this is a superb contribution - thank you. I dont know whether others would agree, but the search facilities in OSC dont seem to recieve the same attention as other areas and yet what can be more important

 

Question. Would it be difficult to remove the case sensitivity? Whilst I have highlighted this aspect by changing the text

 

Quick Find Results ...Are Case Sensitive ...Select By Mouse/Click ...Otherwise Use Buttons Below

 

I wonder how many people really stop and look

 

Any guidance would be appreciatted

 

Thank you

 

Nossum

Link to comment
Share on other sites

  • 2 months later...

Problem with this contrib

 

 

Line: 28

Char: 7

Error: Permission Denied

 

Browser: IE6

 

Server LINUX

 

Line 28, 29 and 30

 

var req;

function loadXMLDoc(key) {

 

var url="quickfind.php?osCsid=<?php echo tep_session_id();?>&keywords="+key;

 

 

Basically i cant get any search results via ajax... nothing pops up when i type

 

I have used the latest version

 

Any ideas???

 

Thanks

Indi

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I have some problem with the quick search. Here is a scenario: I'm on the advanced_search.php page, start typing a word for a search, quick search suggests some products containing that word, I select one of the suggestions, redirected to that product_info.php page, then, if I click Back button at the bottom of the page, I'm sent to quickfind.php?osCsid=139e0a11a30d17a74b2a321bced54e03&keywords=roll which is all blank just my suggested keywords at the upper left corner. Does anybody else have the same problem or it's just me?

 

Thanks.

Edited by Irin
Link to comment
Share on other sites

if I click Back button at the bottom of the page, I'm sent to quickfind.php?osCsid=139e0a11a30d17a74b2a321bced54e03&keywords=roll which is all blank just my suggested keywords at the upper left corner. Does anybody else have the same problem or it's just me?

 

I have the same problem :( Any help whit this would be appreciated :)

Link to comment
Share on other sites

  • 6 months later...
I have the same problem :( Any help whit this would be appreciated :)

 

I have the same pb with this back button on my site www.e-modelisme.com, so i guess I will remove the back boutton (not so usefull isn't it ?),

 

best regards.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...