View Single Post
  #1  
Old 07-03-2010, 02:43 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Search by OrderId or Name

Ok - This was something we had in our old 4.1.8 X Cart. Makes looking up customer's orders much easier.

Edit skin1/head_admin.tpl

Around line 55 - just past this code:

Code:
{foreach from=$all_languages item=l} <option value="{$l.code}"{if $current_language eq $l.code} selected="selected"{/if}>{$l.language}</option> {/foreach} </select> </td> </tr> </table> </form> {else}

but before:

Code:
&nbsp; {/if} </td> </tr>

Insert this code:

Code:
{* Search by OrderId or Customer Name *} <table> <form name="searchform" action="order.php" method="post"> <tr> <td>Order Number:</td> <td><input name="orderid" type="text" size="10" maxlength="8"></td> </form> <form name="searchform" action="orders.php" method="post"> <td>Name:</td> <td><input name="posted_data[customer]" type="text" size="10" maxlength="35"></td> <td><input name="posted_data[date_period]" value="" checked="checked" type="radio"></td> <td width="60">All dates</td> <td width="1"><input type="hidden" id="orderid2" name="orderid2" value=""><input type="hidden" name="posted_data[by_username]" value="on"><input type="hidden" name="posted_data[by_firstname]" value="on"><input type="hidden" name="posted_data[by_lastname]" value="on"><input type="hidden" name="posted_data[address_type]" value="Both">&nbsp;</td> </form> </tr> </table>

Now you will be able to look up your customer's Order by their orderid or last name.

If you do not mind it being a little crowded you can also insert this in there to quickly search for a product:
Code:
<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>
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote