Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How do I change a default in the search function?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-27-2009, 02:14 PM
 
Sandy Cummins Sandy Cummins is offline
 

Advanced Member
  
Join Date: Jan 2007
Location: Australia
Posts: 92
 

Default How do I change a default in the search function?

Hi all,

I wish to change an option in the search page to always default to selected, regardless of what the last person may have clicked in their last search. I had the x-cart people give me a "publisher" choice which goes on the same line as the Product Title etc (straight under the search box), I played with search.php so now it will come up as ticked if no-one else has chosen to untick it in their last search.

What file do I have to change to have it so it is always selected when someone first goes to the search? I have done a search for a particular publisher on my site, then chosen the "this url" link so I see the search parameters and then added that as a link to a list of publishers. Unfortunately that relies on the publisher option being selected to work, and sometimes it isn't automatically selected.

Can anyone help? Thanks
__________________
--
Sandy Cummins
XCart Pro 4.1.5 [linux]
Reply With Quote
  #2  
Old 01-28-2009, 12:27 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: How do I change a default in the search function?

We need to do to search options (when you update the page) were active always?
Reply With Quote
  #3  
Old 01-28-2009, 06:18 PM
 
Sandy Cummins Sandy Cummins is offline
 

Advanced Member
  
Join Date: Jan 2007
Location: Australia
Posts: 92
 

Default Re: How do I change a default in the search function?

Hi yes,

That is what I am after, that that particular search option is always active.
__________________
--
Sandy Cummins
XCart Pro 4.1.5 [linux]
Reply With Quote
  #4  
Old 01-29-2009, 12:37 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: How do I change a default in the search function?

Quote:
Originally Posted by Sandy Cummins
Hi yes,

That is what I am after, that that particular search option is always active.


1. First backup file "skin1/customer/main/search_result.tpl".

2. Please edit this file and add next line to begin of the file:
PHP Code:
{assign var="is_empty_search_prefilled" value="1"
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:56 PM.

   

 
X-Cart forums © 2001-2020