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

Search Box Code Question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-30-2010, 10:25 AM
 
sportscardkids sportscardkids is offline
 

Member
  
Join Date: Sep 2009
Posts: 14
 

Default Search Box Code Question

Hello, I had a custom search box created for my site. It works great, but I would like to make one little change. I would like for the search criteria that a person enters to remain the next time they return to do a search. For example, if under "player name" they enter Derek Jeter and then click search, it returns all products with Derek Jeter in the name. When they go back to the home page and the search box, it currently resets. I would like for Derek Jeter to still appear in the "player name" section when they return.

Here is the current code for the "player search" portion:
<b>{$lng.lbl_player_name}</b><br />
<input name="posted_data[player]" id="search_player" value="" />

Is there a simple piece of coding I can use to accomplish this? Thanks in advance, Jeremy
__________________
Jeremy
www.sportscardkids.com
x-cart 4.1.10
Reply With Quote
  #2  
Old 03-30-2010, 02:17 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Search Box Code Question

Try this
If you need help give us a shout
__________________
xcartmods.co.uk
Reply With Quote
  #3  
Old 03-30-2010, 05:09 PM
 
Pyro Pyro is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 506
 

Default Re: Search Box Code Question

Phil,

Could this script also be used to remember the username of a customer at login, but not their password?


Thanks in advance
__________________
Best Wishes,
James

4.5.2 Gold (work in progress)
Reply With Quote
  #4  
Old 03-31-2010, 03:44 PM
 
sportscardkids sportscardkids is offline
 

Member
  
Join Date: Sep 2009
Posts: 14
 

Default Re: Search Box Code Question

Phil, thanks, but I'm looking for something that the user doesn't have to opt-in/out, and I also have some drop-down selection boxes that I'd like to be remembered. I know the x-cart "product management" search in admin has this capability. Does anyone have any ideas? Thanks, Jeremy
__________________
Jeremy
www.sportscardkids.com
x-cart 4.1.10
Reply With Quote
  #5  
Old 03-31-2010, 04:24 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Search Box Code Question

It can be modified so that it's not opt in/out - you just have to change the checkbox into a hidden form field.
__________________
xcartmods.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:00 PM.

   

 
X-Cart forums © 2001-2020