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

Quick Search Boxes in Admin Header

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 07-20-2008, 11:28 PM
 
jaydee jaydee is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 37
 

Thumbs up Quick Search Boxes in Admin Header

Here's a mod I slapped together using code from this forum. It puts a search box in the header of your admin area so you can quickly finds products according to name or SKU.

http://i254.photobucket.com/albums/hh92/jaydee423/Picture3.png

In head_admin.tpl in your skin directory, after

Code:
{if $login ne ""}

add:

Code:
<td align="center"> <form method="post" action="search.php" name="searchform"> <input type="hidden" name="simple_search" value="Y" /> <input type="hidden" name="mode" value="search" /> <input type="hidden" name="posted_data[by_title]" value="Y" /> <input type="hidden" name="posted_data[by_shortdescr]" value="Y" /> <input type="hidden" name="posted_data[by_fulldescr]" value="Y" /> <input type="hidden" name="posted_data[including]" value="any" /> <input type="hidden" name="posted_data[by_sku]" value="Y" /> Product:&nbsp;<input type="search" size="30" name="posted_data[substring]" /> &nbsp;&nbsp;SKU:&nbsp;<input type="search" class="search" size="20" name="posted_data[productcode]" /> &nbsp;&nbsp;<input type="submit" name="submit" value="Search" /> </form> </td>

Done!

I left out the code that puts the search result back in the search box as this makes it quicker to do another search as you don't have to clear the field. If you want it back, add this to the input fields:

Code:
value="{$search_prefilled.substring|escape}"

Nothing flash, but oh-so handy!!

I tried to add a category drop down list, but it started taking me too long so if anybody's got any suggestions, do tell!

(Originally for 4.1.9.)
__________________
jd.
-
X-Cart Gold 4.1.9
Red-Hat Server
Reply With Quote
  #2  
Old 07-21-2008, 11:21 PM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: Quick Search Boxes in Admin Header

Add the following to it as well to be able to access order details quicker :

Code:
<form action="order.php"> Order ID: <input type="text" name="orderid"> &nbsp;&nbsp;<input type="submit" name="go" value="Go" /> </form>
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote
  #3  
Old 07-24-2008, 12:25 AM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: Quick Search Boxes in Admin Header

nice useful mod...thx
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
  #4  
Old 08-25-2008, 07:11 AM
 
sunset sunset is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 94
 

Default Re: Quick Search Boxes in Admin Header

Brilliant! Thank you so much!
__________________
Sunset
X-Cart Gold v4.1.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


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 06:05 PM.

   

 
X-Cart forums © 2001-2020