Post by nodric » Wed Oct 12, 2011 1:33 am

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.

The Best 4x4xfar


Active Member

Posts

Joined
Wed Jul 06, 2011 10:39 pm

Post by nodric » Wed Oct 12, 2011 2:25 am

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 ;D

The Best 4x4xfar


Active Member

Posts

Joined
Wed Jul 06, 2011 10:39 pm

Post by dimko » Wed Oct 12, 2011 9:23 pm

Or just open the language files that contain:

Code: Select all

$_['text_search'] = 'Search';
and change it to:

Code: Select all

$_['text_search'] = 'Whatever You Want';
;)

Using OpenCart v1.5.1.3


Active Member

Posts

Joined
Sun Sep 25, 2011 2:10 am

Post by nodric » Wed Oct 12, 2011 10:24 pm

dimko wrote:Or just open the language files that contain:

Code: Select all

$_['text_search'] = 'Search';
and change it to:

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 ;D

Just in case anyone is searching for which file.

/html/youwebsite.com/catalog/language/english/common/header.php

The Best 4x4xfar


Active Member

Posts

Joined
Wed Jul 06, 2011 10:39 pm
Who is online

Users browsing this forum: No registered users and 2 guests