Hello,
After the search is made it shows this: "merchant:merchantname:product". How could i remove the query from the search?
Thanks.
Thanks David,
But i want to remain only what the user search for.
Thanks,
Gabriel
Hi Gabriel,
Try the following version - this should only display the query in the search box when the user types a query themselves:
<input type='text' name='q' size='35' value='<?php print (isset($parts[1])?"":$q); ?>' />
Cheers,
David.
Thanks, it works very well.
Another thing. How to translate "merchant", "brand", "categories" "products", "reviews" and "search" everywhere they appear? I have to change the language for all. Just tell me where to modify. In "translate.php" i have translated all the words that appear. Maybe with a rewrite module for what i said above?
Thanks,
Gabriel
Hi Gabriel,
I would not recommend trying to do translate "merchant", "category" and "brand" because the words used have to match the field names in the database.
For other words; it's not normally the words on their own that have to go in translate.php but the phrases that they are used in. For example, the word "Search" on the search button would by translated by adding the following entry in translate.php:
$translate["Search"] = "Translation";
For others, the easiest thing to do is study the files in the html/ directory, and look for the words and phrases that are in used in calls to the translate() function; then setup entries in the array as above...
Cheers,
David.
Done with this one too.
I cant find the mod_rewrite for search.php on forum.
Thanks,
Gabriel
Hi Gabriel,
I'm sorry I don't really understand your question.
Can you give some examples of what you're trying to do?
Thanks,
David.
Hy,
I`m trying to rewrite the search.
mydomain.com/search/searchquery
Thanks,
Gabriel
Hi,
Try this rule:
RewriteRule ^search/(.*)$ search.php?q=$1%{QUERY_STRING} [L]
Hi Gabriel,
What actually happens when you have this rule in place and you go to /search/widgets ? For example;
- Does the search page display but there are no results
- Does the web server return an error
If you can describe what happens that will help try and work out why the rule isn't working..
Cheers,
David.
It doesnt change the url.
The url remains the same:
http://www.mydomain.com/search.php?q=tel
Thanks,
Gabriel
Hi Gabriel,
Having the rewrite rule in place won't change the URL that the search form submits to. Is this what you want to do - so that when a new search is typed in the script will redirect to your /search/widget page?
I could post the code to do this; but I know that you have made quite a few modifications already to html/searchform.php and search.php so it would be difficult to describe where to put the changes.
Therefore, can you email me these 2 files as you have them at the moment and I will add the code to go to the rewritten URL for a normal search...
Cheers,
David.
Hello Gabriel,
In html/searchform.php, you need to remove the value attribute for the text box. It is currently as follows:
<input type='text' name='q' size='35' value='<?php print (isset($q)?$q:""); ?>' />
Change this to:
<input type='text' name='q' size='35' />
Cheers,
David.