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)
-   -   Search Box Code Question (https://forum.x-cart.com/showthread.php?t=53063)

sportscardkids 03-30-2010 10:25 AM

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

PhilJ 03-30-2010 02:17 PM

Re: Search Box Code Question
 
Try this
If you need help give us a shout

Pyro 03-30-2010 05:09 PM

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

sportscardkids 03-31-2010 03:44 PM

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

PhilJ 03-31-2010 04:24 PM

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.


All times are GMT -8. The time now is 11:51 AM.

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