You are here:  » How to remove?


How to remove?

Submitted by pgabriel on Mon, 2007-01-29 13:23 in

Hello,

After the search is made it shows this: "merchant:merchantname:product". How could i remove the query from the search?

Thanks.

Submitted by support on Mon, 2007-01-29 13:31

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.

Submitted by pgabriel on Mon, 2007-01-29 23:52

Thanks David,
But i want to remain only what the user search for.

Thanks,
Gabriel

Submitted by support on Tue, 2007-01-30 09:00

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.

Submitted by pgabriel on Tue, 2007-01-30 15:42

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

Submitted by support on Tue, 2007-01-30 16:01

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.

Submitted by pgabriel on Tue, 2007-01-30 19:01

Done with this one too.
I cant find the mod_rewrite for search.php on forum.

Thanks,
Gabriel

Submitted by support on Tue, 2007-01-30 23:19

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.

Submitted by pgabriel on Wed, 2007-01-31 21:52

Hy,

I`m trying to rewrite the search.

mydomain.com/search/searchquery

Thanks,
Gabriel

Submitted by support on Thu, 2007-02-01 12:10

Hi,

Try this rule:

RewriteRule ^search/(.*)$ search.php?q=$1%{QUERY_STRING} [L]

Submitted by pgabriel on Thu, 2007-02-01 22:08

Hi David,

It doesnt work this way.
Help needed.

Thanks,
Gabriel

Submitted by support on Fri, 2007-02-02 09:16

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.

Submitted by pgabriel on Fri, 2007-02-02 20:09

It doesnt change the url.
The url remains the same:

http://www.mydomain.com/search.php?q=tel

Thanks,
Gabriel

Submitted by support on Sat, 2007-02-03 00:24

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.