On many sites you often see 'Enter Part Number or Keyword Here' in the search bar. This then disappears when you click in the search bar and start to type.
Anyone have a way to achieve the same in OC 1.5.x?
I am already using the excellent 'free' Ajax Live Search to provide pre-emptive results. Maybe this can be modded in some additional way to achieve what I am attempting to do?
Thanks in advance.
I did some looking and found it myself, at least I think I did it right. It works so far
Open your header.tpl in your theme common folder.
Find
<input type="text" name="filter_name" value="<?php echo $text_search; ?>" onclick="this.value = '';" onkeydown="this.style.color = '#000000';" />
Change echo $text_search; to echo "YOUR TEXT";
I guess if I am wrong someone will shout out, or if I find I caused some weird behaviour elsewhere. As always document your changes and make backup files

Open your header.tpl in your theme common folder.
Find
<input type="text" name="filter_name" value="<?php echo $text_search; ?>" onclick="this.value = '';" onkeydown="this.style.color = '#000000';" />
Change echo $text_search; to echo "YOUR TEXT";
I guess if I am wrong someone will shout out, or if I find I caused some weird behaviour elsewhere. As always document your changes and make backup files

Or just open the language files that contain:
and change it to:

Code: Select all
$_['text_search'] = 'Search';
Code: Select all
$_['text_search'] = 'Whatever You Want';

Using OpenCart v1.5.1.3
dimko wrote:Or just open the language files that contain:
and change it to:Code: Select all
$_['text_search'] = 'Search';
Code: Select all
$_['text_search'] = 'Whatever You Want';
You see I knew there was an easier way! I always try and do it the 'clever' way... hmmmm

Just in case anyone is searching for which file.
/html/youwebsite.com/catalog/language/english/common/header.php
Who is online
Users browsing this forum: No registered users and 3 guests