X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How do I change a default in the search function? (https://forum.x-cart.com/showthread.php?t=45123)

Sandy Cummins 01-27-2009 02:14 PM

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

Yurij 01-28-2009 12:27 AM

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?

Sandy Cummins 01-28-2009 06:18 PM

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.

Yurij 01-29-2009 12:37 AM

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"



All times are GMT -8. The time now is 07:43 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.